SUMO - Simulation of Urban MObility
GNECalibratorFlow.h
Go to the documentation of this file.
1 /****************************************************************************/
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 
36 // ===========================================================================
37 // class declaration
38 // ===========================================================================
39 
40 class GNECalibrator;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
50 public:
51 
53  enum TypeOfFlow {
58  };
59 
61  GNECalibratorFlow(GNECalibrator* calibratorParent);
62 
64  GNECalibratorFlow(GNECalibrator* calibratorParent, std::string flowID, std::string vehicleType, std::string route, std::string color, std::string departLane,
65  std::string departPos, std::string departSpeed, std::string arrivalLane, std::string arrivalPos, std::string arrivalSpeed, std::string line,
66  int personNumber, int containerNumber, bool reroute, std::string departPosLat, std::string arrivalPosLat, double begin, double end,
67  double vehsPerHour, double period, double probability, int number);
68 
71 
74 
76  SumoXMLTag getTag() const;
77 
79  const std::string& getFlowID() const;
80 
82  const std::string& getVehicleType() const;
83 
85  const std::string& getRoute() const;
86 
88  const std::string& getColor() const;
89 
91  const std::string& getDepartLane() const;
92 
94  const std::string& getDepartPos() const;
95 
97  const std::string& getDepartSpeed() const;
98 
100  const std::string& getArrivalLane() const;
101 
103  const std::string& getArrivalPos() const;
104 
106  const std::string& getArrivalSpeed() const;
107 
109  const std::string& getLine() const;
110 
112  int getPersonNumber() const;
113 
115  int getContainerNumber() const;
116 
118  bool getReroute() const;
119 
121  std::string getDepartPosLat() const;
122 
124  std::string getArrivalPosLat() const;
125 
129  double getBegin() const;
130 
132  double getEnd() const;
133 
135  double getVehsPerHour() const;
136 
138  double getPeriod() const;
139 
141  double getProbability() const;
142 
144  int getNumber() const;
145 
147  TypeOfFlow getFlowType() const;
149 
153  bool setFlowID(std::string ID);
154 
158  bool setVehicleType(std::string vehicleType);
159 
163  bool setRoute(std::string route);
164 
168  bool setColor(std::string color = "");
169 
173  bool setDepartLane(std::string departLane = "first");
174 
178  bool setDepartPos(std::string departPos = "base");
179 
183  bool setDepartSpeed(std::string departSpeed = "0");
184 
188  bool setArrivalLane(std::string arrivalLane = "current");
189 
193  bool setArrivalPos(std::string arrivalPos = "max");
194 
198  bool setArrivalSpeed(std::string arrivalSpeed = "current");
199 
203  bool setLine(std::string line = "");
204 
208  bool setPersonNumber(int personNumber = 0);
209 
213  bool setPersonNumber(std::string personNumber = "0");
214 
218  bool setContainerNumber(int containerNumber = 0);
219 
223  bool setContainerNumber(std::string containerNumber = "0");
224 
228  bool setReroute(bool value);
229 
233  bool setReroute(std::string value);
234 
238  bool setDepartPosLat(std::string departPosLat = "center");
239 
243  bool setArrivalPosLat(std::string arrivalPosLat = "");
244 
247 
250  bool setBegin(double begin);
251 
255  bool setBegin(std::string begin);
256 
260  bool setEnd(double end);
261 
265  bool setEnd(std::string end);
266 
270  bool setVehsPerHour(double vehsPerHour);
271 
275  bool setVehsPerHour(std::string vehsPerHour);
276 
280  bool setPeriod(double period);
281 
285  bool setPeriod(std::string period);
286 
290  bool setProbability(double probability);
291 
295  bool setProbability(std::string probability);
296 
300  bool setNumber(int number);
301 
305  bool setNumber(std::string number);
306 
310  bool setTypeOfFlow(TypeOfFlow type);
312 
314  bool operator==(const GNECalibratorFlow& calibratorFlow) const;
315 
316 private:
319 
321  std::string myFlowID;
322 
324  std::string myVehicleType;
325 
327  std::string myRoute;
328 
330  std::string myColor;
331 
333  std::string myDepartLane;
334 
336  std::string myDepartPos;
337 
339  std::string myDepartSpeed;
340 
342  std::string myArrivalLane;
343 
345  std::string myArrivalPos;
346 
348  std::string myArrivalSpeed;
349 
351  std::string myLine;
352 
355 
358 
360  bool myReroute;
361 
363  std::string myDepartPosLat;
364 
366  std::string myArrivalPosLat;
367 
371  double myBegin;
372 
374  double myEnd;
375 
378 
380  double myPeriod;
381 
384 
386  int myNumber;
388 
391 };
392 
393 #endif
394 /****************************************************************************/
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
const std::string & getArrivalLane() const
get arrival lane
bool setColor(std::string color="")
set color of flow
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
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 myColor
color of flow
std::string myArrivalSpeed
arrival speed
const std::string & getColor() const
get color of flow
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
double getEnd() const
get end time step