 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
38 {}, {}, {}, {calibratorParent}, {}, {}, {}, {}, {}, {}),
40 myRoute(calibratorParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(
SUMO_TAG_ROUTE).begin()->second) {
47 const RGBColor& color,
const std::string& departLane,
const std::string& departPos,
const std::string& departSpeed,
const std::string& arrivalLane,
48 const std::string& arrivalPos,
const std::string& arrivalSpeed,
const std::string& line,
int personNumber,
int containerNumber,
bool reroute,
49 const std::string& departPosLat,
const std::string& arrivalPosLat,
SUMOTime begin,
SUMOTime end) :
51 {}, {}, {}, {calibratorParent}, {}, {}, {}, {}, {}, {}),
52 myVehicleType(vehicleType),
54 myVehsPerHour(vehsPerHour),
57 myDepartLane(departLane),
58 myDepartPos(departPos),
59 myDepartSpeed(departSpeed),
60 myArrivalLane(arrivalLane),
61 myArrivalPos(arrivalPos),
62 myArrivalSpeed(arrivalSpeed),
64 myPersonNumber(personNumber),
65 myContainerNumber(containerNumber),
67 myDepartPosLat(departPosLat),
68 myArrivalPosLat(arrivalPosLat),
224 }
else if (canParse<double>(value)) {
225 return (parse<double>(value) >= 0);
237 }
else if (canParse<double>(value)) {
238 return (parse<double>(value) >= 0);
243 return canParse<RGBColor>(value);
245 return canParse<SUMOTime>(value);
247 return canParse<SUMOTime>(value);
249 if ((value ==
"random") || (value ==
"free") || (value ==
"allowed") || (value ==
"best") || (value ==
"first")) {
255 if ((value ==
"random") || (value ==
"free") || (value ==
"random_free") || (value ==
"base") || (value ==
"last")) {
258 return canParse<double>(value);
261 if ((value ==
"random") || (value ==
"max")) {
264 return canParse<double>(value);
267 if (value ==
"current") {
273 if ((value ==
"random") || (value ==
"max")) {
276 return canParse<double>(value);
279 if (value ==
"current") {
282 return canParse<double>(value);
287 return canParse<int>(value) && parse<int>(value) >= 0;
289 return canParse<int>(value) && parse<int>(value) >= 0;
291 return canParse<bool>(value);
338 myColor = parse<RGBColor>(value);
341 myBegin = parse<SUMOTime>(value);
344 myEnd = parse<SUMOTime>(value);
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
std::string myVehsPerHour
flows per hour (String instead float because can be empty)
const std::string & getAdditionalID() const
const std::string getID() const
function to support debugging
std::string myArrivalSpeed
arrival speed
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
std::string myArrivalPosLat
int myPersonNumber
number of person
std::string myDepartPos
depart position
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
std::string myArrivalLane
arrival lane
int myContainerNumber
number of container
description of a vehicle type
void changeAdditionalID(const std::string &newID)
change ID of additional
std::string mySpeed
flow speed (String instead float because can be empty)
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
weights: time range begin
friend class GNEChange_Attribute
declare friend class
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GNENet * getNet() const
get the net object
void updateGeometry()
update pre-computed geometry information
GNEDemandElement * myVehicleType
type of flow
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
const std::string DEFAULT_VTYPE_ID
A class that stores a 2D geometrical boundary.
std::string myDepartSpeed
depart speed
A point in 2D or 3D with translation and scaling methods.
std::string time2string(SUMOTime t)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string getParentName() const
Returns the name of the parent object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Position getPositionInView() const
Returns position of additional in view.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GNEDemandElement * myRoute
route in which this flow is used
RGBColor myColor
color of flow
static bool isValidTypeID(const std::string &value)
whether the given string is a valid id for an edge or vehicle type
a flow definition within in Calibrator (used in NETEDIT)
GNECalibratorFlow(GNEAdditional *calibratorParent)
default constructor (used only in GNECalibratorDialog)
std::string myDepartLane
depart lane
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators)
std::string getGenericParametersStr() const
return generic parameters in string format
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
~GNECalibratorFlow()
destructor
begin/end of the description of a route
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
bool hasString(const std::string &str) const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SUMOTime myEnd
time step end
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
std::string myDepartPosLat
departPosLat
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
const std::string & getTagStr() const
get tag assigned to this object in string format
Stores the information about how to visualize structures.
std::string myLine
line of bus/container stop
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string myArrivalPos
arrival pos
parent of an additional element