34 {}, {}, {}, {calibratorParent}, {}, {}, {}, {}),
36 myRoute(calibratorParent->getNet()->getAttributeCarriers()->getDemandElements().at(
SUMO_TAG_ROUTE).begin()->second) {
38 updateCenteringBoundary(
false);
45 const RGBColor& color,
const std::string& departLane,
const std::string& departPos,
const std::string& departSpeed,
const std::string& arrivalLane,
46 const std::string& arrivalPos,
const std::string& arrivalSpeed,
const std::string& line,
int personNumber,
int containerNumber,
bool reroute,
47 const std::string& departPosLat,
const std::string& arrivalPosLat,
SUMOTime begin,
SUMOTime end) :
49 {}, {}, {}, {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),
70 updateCenteringBoundary(
false);
234 }
else if (canParse<double>(value)) {
235 return (parse<double>(value) >= 0);
247 }
else if (canParse<double>(value)) {
248 return (parse<double>(value) >= 0);
253 return canParse<RGBColor>(value);
255 return canParse<SUMOTime>(value);
257 return canParse<SUMOTime>(value);
259 if ((value ==
"random") || (value ==
"free") || (value ==
"allowed") || (value ==
"best") || (value ==
"first")) {
265 if ((value ==
"random") || (value ==
"free") || (value ==
"random_free") || (value ==
"base") || (value ==
"last")) {
268 return canParse<double>(value);
271 if ((value ==
"random") || (value ==
"max")) {
274 return canParse<double>(value);
277 if (value ==
"current") {
283 if ((value ==
"random") || (value ==
"max")) {
286 return canParse<double>(value);
289 if (value ==
"current") {
292 return canParse<double>(value);
297 return canParse<int>(value) && parse<int>(value) >= 0;
299 return canParse<int>(value) && parse<int>(value) >= 0;
301 return canParse<bool>(value);
354 myColor = parse<RGBColor>(value);
357 myBegin = parse<SUMOTime>(value);
360 myEnd = parse<SUMOTime>(value);
@ GLO_CALIBRATOR
a Calibrator
std::string time2string(SUMOTime t)
convert SUMOTime to string
const std::string DEFAULT_VTYPE_ID
@ SUMO_TAG_VTYPE
description of a vehicle type
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator (used in NETEDIT)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_DEPARTPOS_LAT
@ GNE_ATTR_PARENT
parent of an additional element
@ SUMO_ATTR_BEGIN
weights: time range begin
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_CONTAINER_NUMBER
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_PERSON_NUMBER
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_ARRIVALPOS_LAT
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
GNEGeometry::Geometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
Boundary myBoundary
Additional Boundary.
const GNEGeometry::Geometry & getAdditionalGeometry() const
obtain additional geometry
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
friend class GNEChange_Attribute
declare friend class
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * myNet
pointer to net
double getAttributeDouble(SumoXMLAttr key) const
std::string myDepartSpeed
depart speed
std::string myArrivalPos
arrival pos
int myContainerNumber
number of container
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string myArrivalLane
arrival lane
~GNECalibratorFlow()
destructor
std::string myDepartLane
depart lane
RGBColor myColor
color of flow
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
std::string myArrivalPosLat
void updateGeometry()
update pre-computed geometry information
GNECalibratorFlow(GNEAdditional *calibratorParent)
default constructor (used only in GNECalibratorDialog)
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
SUMOTime myEnd
time step end
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string myLine
line of bus/container stop
int myPersonNumber
number of person
std::string mySpeed
flow speed (String instead float because can be empty)
std::string myArrivalSpeed
arrival speed
GNEDemandElement * myVehicleType
type of flow
bool isAttributeEnabled(SumoXMLAttr key) const
GNEMoveOperation * getMoveOperation(const double shapeOffset)
get move operation for the given shapeOffset
GNEDemandElement * myRoute
route in which this flow is used
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string myDepartPosLat
departPosLat
std::string getParentName() const
Returns the name of the parent object.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
std::string myVehsPerHour
flows per hour (String instead float because can be empty)
std::string myDepartPos
depart position
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
void updateGeometry(const PositionVector &shape, double startPos=-1, double endPos=-1, const Position &extraFirstPosition=Position::INVALID, const Position &extraLastPosition=Position::INVALID)
update geometry shape
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
void updateID(GNEAttributeCarrier *AC, const std::string newID)
update ID
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
Stores the information about how to visualize structures.
static bool areParametersValid(const std::string &value, bool report=false, ParameterisedAttrType attrType=ParameterisedAttrType::STRING, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
void setParametersStr(const std::string ¶msString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
static bool isValidTypeID(const std::string &value)
whether the given string is a valid id for an edge or vehicle type
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
bool hasString(const std::string &str) const