 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
37 {}, {}, {}, {calibratorParent}, {}, {}, {}, {}, {}, {}),
39 myRoute(calibratorParent->getViewNet()->getNet()->getAttributeCarriers().demandElements.at(
SUMO_TAG_ROUTE).begin()->second) {
46 const RGBColor& color,
const std::string& departLane,
const std::string& departPos,
const std::string& departSpeed,
const std::string& arrivalLane,
47 const std::string& arrivalPos,
const std::string& arrivalSpeed,
const std::string& line,
int personNumber,
int containerNumber,
bool reroute,
48 const std::string& departPosLat,
const std::string& arrivalPosLat,
SUMOTime begin,
SUMOTime end) :
49 GNEAdditional(calibratorParent, calibratorParent->getViewNet(),
GLO_CALIBRATOR,
SUMO_TAG_FLOW_CALIBRATOR,
"", false, {}, {}, {}, {calibratorParent}, {}, {}, {}, {}, {}, {}),
50 myVehicleType(vehicleType),
52 myVehsPerHour(vehsPerHour),
55 myDepartLane(departLane),
56 myDepartPos(departPos),
57 myDepartSpeed(departSpeed),
58 myArrivalLane(arrivalLane),
59 myArrivalPos(arrivalPos),
60 myArrivalSpeed(arrivalSpeed),
62 myPersonNumber(personNumber),
63 myContainerNumber(containerNumber),
65 myDepartPosLat(departPosLat),
66 myArrivalPosLat(arrivalPosLat),
241 }
else if (canParse<double>(value)) {
242 return (parse<double>(value) >= 0);
254 }
else if (canParse<double>(value)) {
255 return (parse<double>(value) >= 0);
260 return canParse<RGBColor>(value);
262 return canParse<SUMOTime>(value);
264 return canParse<SUMOTime>(value);
266 if ((value ==
"random") || (value ==
"free") || (value ==
"allowed") || (value ==
"best") || (value ==
"first")) {
272 if ((value ==
"random") || (value ==
"free") || (value ==
"random_free") || (value ==
"base") || (value ==
"last")) {
275 return canParse<double>(value);
278 if ((value ==
"random") || (value ==
"max")) {
281 return canParse<double>(value);
284 if (value ==
"current") {
290 if ((value ==
"random") || (value ==
"max")) {
293 return canParse<double>(value);
296 if (value ==
"current") {
299 return canParse<double>(value);
304 return canParse<int>(value) && parse<int>(value) >= 0;
306 return canParse<int>(value) && parse<int>(value) >= 0;
308 return canParse<bool>(value);
361 myColor = parse<RGBColor>(value);
364 myBegin = parse<SUMOTime>(value);
367 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.
std::string getParametersStr() const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
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
@ SUMO_ATTR_ARRIVALPOS_LAT
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
bool isAttributeEnabled(SumoXMLAttr key) const
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
@ SUMO_ATTR_COLOR
A color information.
std::string myArrivalLane
arrival lane
int myContainerNumber
number of container
@ SUMO_TAG_VTYPE
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.
@ SUMO_ATTR_BEGIN
weights: time range begin
friend class GNEChange_Attribute
declare friend class
@ SUMO_ATTR_PERSON_NUMBER
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
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
double getAttributeDouble(SumoXMLAttr key) const
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
@ SUMO_ATTR_DEPARTPOS_LAT
A class that stores a 2D geometrical boundary.
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
std::string myDepartSpeed
depart speed
@ SUMO_ATTR_CONTAINER_NUMBER
A point in 2D or 3D with translation and scaling methods.
std::string time2string(SUMOTime t)
void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)
split geometry
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.
void setParametersStr(const std::string ¶msString)
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
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
@ SUMO_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator (used in NETEDIT)
GNECalibratorFlow(GNEAdditional *calibratorParent)
default constructor (used only in GNECalibratorDialog)
std::string myDepartLane
depart lane
static bool areParametersValid(const std::string &value, bool report=false)
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
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
@ GLO_CALIBRATOR
a Calibrator
~GNECalibratorFlow()
destructor
@ SUMO_TAG_ROUTE
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
@ SUMO_ATTR_END
weights: time range 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
@ GNE_ATTR_PARENT
parent of an additional element