SUMO - Simulation of Urban MObility
GNECalibratorFlow.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // Flow used by GNECalibrators
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNECalibratorFlow_h
21 #define GNECalibratorFlow_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
35 #include <utils/common/RGBColor.h>
36 
37 // ===========================================================================
38 // class declaration
39 // ===========================================================================
40 
41 class GNECalibrator;
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
51 public:
52 
54  enum TypeOfFlow {
59  };
60 
62  GNECalibratorFlow(GNECalibrator* calibratorParent);
63 
65  GNECalibratorFlow(GNECalibrator* calibratorParent, std::string flowID, std::string vehicleType, std::string route, const RGBColor& color, std::string departLane,
66  std::string departPos, std::string departSpeed, std::string arrivalLane, std::string arrivalPos, std::string arrivalSpeed, std::string line,
67  int personNumber, int containerNumber, bool reroute, std::string departPosLat, std::string arrivalPosLat, double begin, double end,
68  double vehsPerHour, double period, double probability, int number);
69 
72 
75 
77  SumoXMLTag getTag() const;
78 
80  const std::string& getFlowID() const;
81 
83  const std::string& getVehicleType() const;
84 
86  const std::string& getRoute() const;
87 
89  const RGBColor& getColor() const;
90 
92  const std::string& getDepartLane() const;
93 
95  const std::string& getDepartPos() const;
96 
98  const std::string& getDepartSpeed() const;
99 
101  const std::string& getArrivalLane() const;
102 
104  const std::string& getArrivalPos() const;
105 
107  const std::string& getArrivalSpeed() const;
108 
110  const std::string& getLine() const;
111 
113  int getPersonNumber() const;
114 
116  int getContainerNumber() const;
117 
119  bool getReroute() const;
120 
122  std::string getDepartPosLat() const;
123 
125  std::string getArrivalPosLat() const;
126 
130  double getBegin() const;
131 
133  double getEnd() const;
134 
136  double getVehsPerHour() const;
137 
139  double getPeriod() const;
140 
142  double getProbability() const;
143 
145  int getNumber() const;
146 
148  TypeOfFlow getFlowType() const;
150 
154  bool setFlowID(std::string ID);
155 
159  bool setVehicleType(std::string vehicleType);
160 
164  bool setRoute(std::string route);
165 
169  bool setColor(const RGBColor& color);
170 
174  bool setColor(std::string = "black");
175 
179  bool setDepartLane(std::string departLane = "first");
180 
184  bool setDepartPos(std::string departPos = "base");
185 
189  bool setDepartSpeed(std::string departSpeed = "0");
190 
194  bool setArrivalLane(std::string arrivalLane = "current");
195 
199  bool setArrivalPos(std::string arrivalPos = "max");
200 
204  bool setArrivalSpeed(std::string arrivalSpeed = "current");
205 
209  bool setLine(std::string line = "");
210 
214  bool setPersonNumber(int personNumber = 0);
215 
219  bool setPersonNumber(std::string personNumber = "0");
220 
224  bool setContainerNumber(int containerNumber = 0);
225 
229  bool setContainerNumber(std::string containerNumber = "0");
230 
234  bool setReroute(bool value);
235 
239  bool setReroute(std::string value);
240 
244  bool setDepartPosLat(std::string departPosLat = "center");
245 
249  bool setArrivalPosLat(std::string arrivalPosLat = "");
250 
253 
256  bool setBegin(double begin);
257 
261  bool setBegin(std::string begin);
262 
266  bool setEnd(double end);
267 
271  bool setEnd(std::string end);
272 
276  bool setVehsPerHour(double vehsPerHour);
277 
281  bool setVehsPerHour(std::string vehsPerHour);
282 
286  bool setPeriod(double period);
287 
291  bool setPeriod(std::string period);
292 
296  bool setProbability(double probability);
297 
301  bool setProbability(std::string probability);
302 
306  bool setNumber(int number);
307 
311  bool setNumber(std::string number);
312 
316  bool setTypeOfFlow(TypeOfFlow type);
318 
320  bool operator==(const GNECalibratorFlow& calibratorFlow) const;
321 
322 private:
325 
327  std::string myFlowID;
328 
330  std::string myVehicleType;
331 
333  std::string myRoute;
334 
337 
339  std::string myDepartLane;
340 
342  std::string myDepartPos;
343 
345  std::string myDepartSpeed;
346 
348  std::string myArrivalLane;
349 
351  std::string myArrivalPos;
352 
354  std::string myArrivalSpeed;
355 
357  std::string myLine;
358 
361 
364 
366  bool myReroute;
367 
369  std::string myDepartPosLat;
370 
372  std::string myArrivalPosLat;
373 
377  double myBegin;
378 
380  double myEnd;
381 
384 
386  double myPeriod;
387 
390 
392  int myNumber;
394 
397 };
398 
399 #endif
400 /****************************************************************************/
bool setLine(std::string line="")
set line of busStop/containerStop
bool setDepartSpeed(std::string departSpeed="0")
set depart speed
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool operator==(const GNECalibratorFlow &calibratorFlow) const
overload operator ==
SumoXMLTag getTag() const
get tag
RGBColor myColor
color of flow
const std::string & getArrivalLane() const
get arrival lane
bool setContainerNumber(int containerNumber=0)
set number of container
int getNumber() const
get number of flows
bool setVehicleType(std::string vehicleType)
set vehicleType of flow
const std::string & getArrivalSpeed() const
get arrival speed
~GNECalibratorFlow()
destructor
std::string myLine
line of bus/container stop
const std::string & getDepartSpeed() const
get arrival speed
std::string getArrivalPosLat() const
const std::string & getArrivalPos() const
get arrival position
std::string myDepartPosLat
departPosLat
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
bool setPeriod(double period)
set period of flows
bool setArrivalLane(std::string arrivalLane="current")
set arrival lane
bool setArrivalPos(std::string arrivalPos="max")
set arrival position
const std::string & getVehicleType() const
get vehicle type of flow
double getBegin() const
double myPeriod
period
int myNumber
number of flow
bool myReroute
reroute
std::string myArrivalPos
arrival pos
std::string getDepartPosLat() const
get departPosLat
bool setVehsPerHour(double vehsPerHour)
set flows per hour
const std::string & getRoute() const
get route in which this flow is used
double myEnd
time step end
std::string myArrivalPosLat
int myPersonNumber
number of person
bool setPersonNumber(int personNumber=0)
set number of persons
std::string myDepartPos
depart position
TypeOfFlow
type of flow
bool setBegin(double begin)
set begin step
TypeOfFlow getFlowType() const
get type of flow
bool setDepartPosLat(std::string departPosLat="center")
set departPosLat
std::string myRoute
route in which this flow is used
std::string myDepartLane
depart lane
bool setRoute(std::string route)
set route in which this flow is used
bool setColor(const RGBColor &color)
set color of flow
double getPeriod() const
get period of flow
std::string myArrivalLane
arrival lane
const std::string & getDepartPos() const
get depart position
bool setDepartPos(std::string departPos="base")
set depart position
bool setReroute(bool value)
set reroute
double myVehsPerHour
flows per hour
const std::string & getFlowID() const
get ID of flow
std::string myFlowID
ID of flow.
int myContainerNumber
number of container
bool setArrivalSpeed(std::string arrivalSpeed="current")
set arrival speed
bool setFlowID(std::string ID)
set ID of flow
const std::string & getDepartLane() const
get depart lane
GNECalibratorFlow(GNECalibrator *calibratorParent)
constructor
int getContainerNumber() const
get number of containers
double getVehsPerHour() const
get flows per hour
bool setProbability(double probability)
set probability of flow
double myProbability
probability
GNECalibrator * myCalibratorParent
pointer to calibrator parent
std::string myArrivalSpeed
arrival speed
int getPersonNumber() const
get number of persons
bool setTypeOfFlow(TypeOfFlow type)
set type of flow
std::string myDepartSpeed
depart speed
const std::string & getLine() const
get line of busStop/containerStop
bool setDepartLane(std::string departLane="first")
set depart lane
bool setNumber(int number)
set number of flows
TypeOfFlow myTypeOfFlow
type of flow
double getProbability() const
get probability of flow
bool setArrivalPosLat(std::string arrivalPosLat="")
set arrivalPosLat
bool getReroute() const
get reroute
std::string myVehicleType
type of flow
bool setEnd(double end)
set end step
const RGBColor & getColor() const
get color of flow
double getEnd() const
get end time step