688 bool parsedOk =
true;
690 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
691 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
id.c_str(), parsedOk);
696 const std::vector<std::string> lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
id.c_str(), parsedOk, std::vector<std::string>());
723 bool parsedOk =
true;
725 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
726 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
id.c_str(), parsedOk);
731 const std::vector<std::string> lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
id.c_str(), parsedOk, std::vector<std::string>());
758 bool parsedOk =
true;
783 bool parsedOk =
true;
785 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
786 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
id.c_str(), parsedOk);
791 const std::vector<std::string> lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
id.c_str(), parsedOk, std::vector<std::string>());
818 bool parsedOk =
true;
820 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
821 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
id.c_str(), parsedOk);
826 const std::vector<std::string> lines = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LINES,
id.c_str(), parsedOk, std::vector<std::string>());
855 bool parsedOk =
true;
857 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
858 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
id.c_str(), parsedOk);
896 bool parsedOk =
true;
929 bool parsedOk =
true;
931 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
932 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
id.c_str(), parsedOk);
935 const std::string file = attrs.
get<std::string>(
SUMO_ATTR_FILE,
id.c_str(), parsedOk);
938 const std::vector<std::string> vehicleTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk, std::vector<std::string>());
960 bool parsedOk =
true;
963 writeError(
TL(
"'lane' and 'length' must be defined together in a lane area detector."));
968 writeError(
TL(
"'lanes' and 'endPos' must be defined together in a lane area detector."));
972 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
974 const std::string file = attrs.
get<std::string>(
SUMO_ATTR_FILE,
id.c_str(), parsedOk);
977 const std::vector<std::string> laneIds = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_LANES,
id.c_str(), parsedOk, std::vector<std::string>());
982 const std::string trafficLight = attrs.
getOpt<std::string>(
SUMO_ATTR_TLID,
id.c_str(), parsedOk,
"");
987 const std::vector<std::string> vehicleTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk, std::vector<std::string>());
1020 bool parsedOk =
true;
1022 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1023 const std::string file = attrs.
get<std::string>(
SUMO_ATTR_FILE,
id.c_str(), parsedOk);
1027 const std::vector<std::string> vehicleTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk, std::vector<std::string>());
1051 bool parsedOk =
true;
1053 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
"", parsedOk);
1074 bool parsedOk =
true;
1076 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
"", parsedOk);
1097 bool parsedOk =
true;
1099 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1100 const std::string laneId = attrs.
get<std::string>(
SUMO_ATTR_LANE,
id.c_str(), parsedOk);
1102 const std::string file = attrs.
get<std::string>(
SUMO_ATTR_FILE,
id.c_str(), parsedOk);
1105 const std::vector<std::string> vehicleTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk, std::vector<std::string>());
1126 bool parsedOk =
true;
1128 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1133 const std::vector<std::string> edges = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_EDGES,
id.c_str(), parsedOk, std::vector<std::string>());
1155 bool parsedOk =
true;
1157 const std::string edgeID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1175 bool parsedOk =
true;
1177 const std::string edgeID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1195 bool parsedOk =
true;
1197 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1198 const std::vector<std::string> lanes = attrs.
get<std::vector<std::string> >(
SUMO_ATTR_LANES,
id.c_str(), parsedOk);
1202 const std::vector<std::string> vehicleTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk, std::vector<std::string>());
1220 bool parsedOk =
true;
1241 bool parsedOk =
true;
1245 writeError(
TL(
"Calibrators need either an edge or a lane"));
1249 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1260 const std::vector<std::string> vehicleTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk, std::vector<std::string>());
1286 bool parsedOk =
true;
1292 writeError(
TL(
"CalibratorFlows need either the attribute vehsPerHour or speed or type (or any combination of these)"));
1296 if (flowParameter) {
1315 delete flowParameter;
1325 bool parsedOk =
true;
1327 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1328 const std::vector<std::string> edges = attrs.
get<std::vector<std::string> >(
SUMO_ATTR_EDGES,
id.c_str(), parsedOk);
1334 const std::vector<std::string> vehicleTypes = attrs.
getOpt<std::vector<std::string> >(
SUMO_ATTR_VTYPES,
id.c_str(), parsedOk, std::vector<std::string>());
1356 bool parsedOk =
true;
1376 bool parsedOk =
true;
1378 const std::string laneID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1381 const std::string allow = attrs.
getOpt<std::string>(
SUMO_ATTR_ALLOW,
"", parsedOk, !disallow.size() ?
"authority" :
"");
1399 bool parsedOk =
true;
1401 const std::string edgeID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1404 const std::string allow = attrs.
getOpt<std::string>(
SUMO_ATTR_ALLOW,
"", parsedOk, !disallow.size() ?
"authority" :
"");
1422 bool parsedOk =
true;
1424 const std::string edgeID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1430 if (probability < 0) {
1446 bool parsedOk =
true;
1448 const std::string parkingAreaID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1456 if (probability < 0) {
1473 bool parsedOk =
true;
1475 const std::string routeID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1481 if (probability < 0) {
1497 bool parsedOk =
true;
1499 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1500 const std::string edge = attrs.
get<std::string>(
SUMO_ATTR_EDGE,
id.c_str(), parsedOk);
1501 const std::string file = attrs.
get<std::string>(
SUMO_ATTR_FILE,
id.c_str(), parsedOk);
1524 bool parsedOk =
true;
1526 const std::string edgeID = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1530 const std::string name = attrs.
getOpt<std::string>(
SUMO_ATTR_NAME, edgeID.c_str(), parsedOk,
"");
1547 bool parsedOk =
true;
1549 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1570 bool parsedOk =
true;
1572 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1574 const std::vector<std::string> laneIDs = attrs.
get<std::vector<std::string> >(
SUMO_ATTR_LANES,
id.c_str(), parsedOk);
1599 bool parsedOk =
true;
1601 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1625 bool parsedOk =
true;
1627 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1664 bool parsedOk =
true;
1668 writeError(
TL(
"X and Y must be be defined together in POIs"));
1674 writeError(
TL(
"lane and position must be be defined together in POIs"));
1680 writeError(
TL(
"lon and lat must be be defined together in POIs"));
1684 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
"", parsedOk);
1739 bool parsedOk =
true;
1741 const std::string key = attrs.
get<std::string>(
SUMO_ATTR_KEY,
nullptr, parsedOk);
1745 if (SumoBaseObjectParent ==
nullptr) {
1746 writeError(
TL(
"Parameters must be defined within an object."));
1748 writeError(
TL(
"Parameters cannot be defined in the additional file's root."));
1750 writeError(
TL(
"Parameters cannot be defined within another parameter."));
1751 }
else if (parsedOk) {
1753 const std::string parentTagStr =
toString(SumoBaseObjectParent->getTag());
1758 WRITE_WARNINGF(
TL(
"Error parsing key from % generic parameter. Key cannot be empty."), parentTagStr);
1760 WRITE_WARNINGF(
TL(
"Error parsing key from % generic parameter. Key contains invalid characters."), parentTagStr);
1762 WRITE_DEBUG(
"Inserting generic parameter '" + key +
"|" + value +
"' into " + parentTagStr);
1764 SumoBaseObjectParent->addParameter(key, value);
1774 if ((parent !=
nullptr) &&
1775 (parentTags.size() > 0) &&
1776 (std::find(parentTags.begin(), parentTags.end(), parent->
getTag()) == parentTags.end())) {
#define WRITE_WARNINGF(...)
#define SUMOTime_MAX_PERIOD
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
const int VEHPARS_VPH_SET
const int VEHPARS_CALIBRATORSPEED_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_TRACTION_SUBSTATION
A traction substation.
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_ROUTEPROBE
a routeprobe detector
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_E2DETECTOR
an e2 detector
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_ROOTFILE
root file
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_STEP
trigger: a step description
@ SUMO_TAG_OVERHEAD_WIRE_CLAMP
An overhead wire clamp (connection of wires in opposite directions)
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ GNE_TAG_CALIBRATOR_LANE
A calibrator placed over lane.
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ SUMO_TAG_PARKING_SPACE
A parking space for a single vehicle within a parking area.
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_OVERHEAD_WIRE_SECTION
An overhead wire section.
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destination of a reroute
@ SUMO_TAG_PARAM
parameter associated to a certain key
@ SUMO_TAG_E1DETECTOR
an e1 detector
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
@ SUMO_TAG_E3DETECTOR
an e3 detector
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_ATTR_SUBSTATIONID
id of a traction substation substation
@ SUMO_ATTR_JAM_DIST_THRESHOLD
@ SUMO_ATTR_PARKING_LENGTH
@ SUMO_ATTR_VOLTAGE
voltage of the traction substation [V]
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_OVERHEAD_WIRE_FORBIDDEN
forbidden lanes for overhead wire segment
@ SUMO_ATTR_HALTING_TIME_THRESHOLD
@ SUMO_ATTR_OVERHEAD_WIRECLAMP_END
id of the overhead wire, to the end of which the overhead wire clamp is connected
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
@ SUMO_ATTR_OVERHEAD_WIRECLAMP_LANESTART
id of the overhead wire lane, to the start of which the overhead wire clamp is connected
@ SUMO_ATTR_CHARGEINTRANSIT
Allow/disallow charge in transit in Charging Stations.
@ SUMO_ATTR_OVERHEAD_WIRECLAMP_START
id of the overhead wire, to the start of which the overhead wire clamp is connected
@ SUMO_ATTR_CONTAINER_CAPACITY
@ SUMO_ATTR_FILL
Fill the polygon.
@ SUMO_ATTR_LAYER
A layer number.
@ SUMO_ATTR_HALTING_SPEED_THRESHOLD
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_ROADSIDE_CAPACITY
@ SUMO_ATTR_CURRENTLIMIT
current limit of the traction substation [A]
@ SUMO_ATTR_TLID
link,node: the traffic light id responsible for this link
@ SUMO_ATTR_CHARGINGPOWER
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_EFFICIENCY
Eficiency of the charge in Charging Stations.
@ SUMO_ATTR_PERSON_CAPACITY
@ SUMO_ATTR_CHARGEDELAY
Delay in the charge of charging stations.
@ SUMO_ATTR_TIME
trigger: the time of the step
@ SUMO_ATTR_OVERHEAD_WIRECLAMP_LANEEND
id of the overhead wire lane, to the end of which the overhead wire clamp is connected
const double INVALID_DOUBLE
invalid double
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual void buildDestProbReroute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &newEdgeDestinationID, const double probability)=0
builds a dest prob reroute
void parseE1InstantAttributes(const SUMOSAXAttributes &attrs)
parse E1 instant attributes
void parseCalibratorAttributes(const SUMOSAXAttributes &attrs)
parse calibrator attributes
virtual void buildMultiLaneDetectorE2(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::vector< std::string > &lanes, const double pos, const double endPos, const SUMOTime period, const std::string &trafficLight, const std::string &filename, const std::vector< std::string > &vehicleTypes, const std::string &name, const SUMOTime timeThreshold, const double speedThreshold, const double jamThreshold, const bool friendlyPos, const Parameterised::Map ¶meters)=0
Builds a multi-lane Area Detector (E2)
void parseChargingStationAttributes(const SUMOSAXAttributes &attrs)
parse chargingStation attributes
virtual void buildRouteProbReroute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &newRouteID, const double probability)=0
builds a route prob reroute
virtual void buildVariableSpeedSign(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const Position &pos, const std::vector< std::string > &laneIDs, const std::string &name, const std::vector< std::string > &vTypes, const Parameterised::Map ¶meters)=0
Builds a VariableSpeedSign (lane speed additional)
virtual void buildTrainStop(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double startPos, const double endPos, const std::string &name, const std::vector< std::string > &lines, const int personCapacity, const double parkingLength, const RGBColor &color, const bool friendlyPosition, const Parameterised::Map ¶meters)=0
Builds a train stop.
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
virtual void buildEdgeCalibrator(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &edgeID, const double pos, const std::string &name, const std::string &outfile, const SUMOTime period, const std::string &routeprobe, const double jamThreshold, const std::vector< std::string > &vTypes, const Parameterised::Map ¶meters)=0
builds a microscopic calibrator over an edge
virtual void buildDetectorE3(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const Position &pos, const SUMOTime period, const std::string &filename, const std::vector< std::string > &vehicleTypes, const std::string &name, const SUMOTime timeThreshold, const double speedThreshold, const Parameterised::Map ¶meters)=0
Builds a multi entry exit detector (E3)
virtual void buildParkingArea(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double startPos, const double endPos, const std::string &departPos, const std::string &name, const bool friendlyPosition, const int roadSideCapacity, const bool onRoad, const double width, const double length, const double angle, const bool lefthand, const Parameterised::Map ¶meters)=0
Builds a Parking Area.
virtual void buildRerouterInterval(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOTime begin, const SUMOTime end)=0
builds a rerouter interval
virtual void buildParkingSpace(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const double x, const double y, const double z, const std::string &name, const std::string &width, const std::string &length, const std::string &angle, const double slope, const Parameterised::Map ¶meters)=0
Builds a Parking Space.
void parseRouteProbRerouteAttributes(const SUMOSAXAttributes &attrs)
parse route prob reroute attributes
virtual void buildPOILane(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &type, const RGBColor &color, const std::string &laneID, const double posOverLane, const bool friendlyPosition, const double posLat, const double layer, const double angle, const std::string &imgFile, const bool relativePath, const double width, const double height, const std::string &name, const Parameterised::Map ¶meters)=0
Builds a POI over lane using the given values.
void parseCalibratorFlowAttributes(const SUMOSAXAttributes &attrs)
parse calibrator flow attributes
virtual void buildSingleLaneDetectorE2(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double pos, const double length, const SUMOTime period, const std::string &trafficLight, const std::string &filename, const std::vector< std::string > &vehicleTypes, const std::string &name, const SUMOTime timeThreshold, const double speedThreshold, const double jamThreshold, const bool friendlyPos, const Parameterised::Map ¶meters)=0
Builds a single-lane Area Detector (E2)
void parseParkingAreaRerouteAttributes(const SUMOSAXAttributes &attrs)
parse parking area reroute attributes
void parseTAZAttributes(const SUMOSAXAttributes &attrs)
parse TAZ attributes
AdditionalHandler()
Constructor.
virtual void buildPOI(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &type, const RGBColor &color, const double x, const double y, const double layer, const double angle, const std::string &imgFile, bool relativePath, const double width, const double height, const std::string &name, const Parameterised::Map ¶meters)=0
Builds a POI using the given values.
virtual void buildLaneCalibrator(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double pos, const std::string &name, const std::string &outfile, const SUMOTime period, const std::string &routeprobe, const double jamThreshold, const std::vector< std::string > &vTypes, const Parameterised::Map ¶meters)=0
builds a microscopic calibrator over a lane
void checkParent(const SumoXMLTag currentTag, const std::vector< SumoXMLTag > &parentTags, bool &ok)
check parents
void parseOverheadWire(const SUMOSAXAttributes &attrs)
parse overhead wire segment
CommonXMLStructure myCommonXMLStructure
common XML Structure
virtual void buildOverheadWireClamp(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &overheadWireIDStartClamp, const std::string &laneIDStartClamp, const std::string &overheadWireIDEndClamp, const std::string &laneIDEndClamp, const Parameterised::Map ¶meters)=0
build overhead wire clamp
void parseTractionSubstation(const SUMOSAXAttributes &attrs)
parse traction substation
void parseE3Attributes(const SUMOSAXAttributes &attrs)
parse E3 attributes
void parseE2Attributes(const SUMOSAXAttributes &attrs)
parse E2 attributes
void parseTAZSinkAttributes(const SUMOSAXAttributes &attrs)
parse TAZ sink attributes
virtual void buildRerouter(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const Position &pos, const std::vector< std::string > &edgeIDs, const double prob, const std::string &name, const bool off, const SUMOTime timeThreshold, const std::vector< std::string > &vTypes, const Parameterised::Map ¶meters)=0
builds a rerouter
void parseOverheadWireClamp(const SUMOSAXAttributes &attrs)
parse overhead wire clamp
void writeError(const std::string &error)
write error and enable error creating element
bool beginParseAttributes(SumoXMLTag tag, const SUMOSAXAttributes &attrs)
begin parse attributes
void parseTrainStopAttributes(const SUMOSAXAttributes &attrs)
parse trainStop attributes
virtual void buildVariableSpeedSignStep(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOTime time, const std::string &speed)=0
Builds a VariableSpeedSign Step.
virtual void buildDetectorEntry(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &laneID, const double pos, const bool friendlyPos, const Parameterised::Map ¶meters)=0
Builds a entry detector (E3)
void parsePOIAttributes(const SUMOSAXAttributes &attrs)
parse POI attributes
bool myErrorCreatingElement
flag for check if a element wasn't created
void endParseAttributes()
end parse attributes
virtual void buildE1Detector(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double position, const SUMOTime period, const std::string &file, const std::vector< std::string > &vehicleTypes, const std::string &name, const bool friendlyPos, const Parameterised::Map ¶meters)=0
Builds a induction loop detector (E1)
void parseVariableSpeedSignAttributes(const SUMOSAXAttributes &attrs)
parse variable speed sign attributes
virtual ~AdditionalHandler()
Destructor.
virtual void buildAccess(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &laneID, const double pos, const double length, const bool friendlyPos, const Parameterised::Map ¶meters)=0
Builds an Access.
virtual void buildTAZ(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const PositionVector &shape, const Position ¢er, const bool fill, const RGBColor &color, const std::vector< std::string > &edgeIDs, const std::string &name, const Parameterised::Map ¶meters)=0
Builds a TAZ (Traffic Assignment Zone)
void parseDestProbRerouteAttributes(const SUMOSAXAttributes &attrs)
parse dest prob reroute attributes
virtual void buildCalibratorFlow(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter &vehicleParameter)=0
builds a calibrator flow
void parseE1Attributes(const SUMOSAXAttributes &attrs)
parse E1 attributes
virtual void buildOverheadWire(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &substationId, const std::vector< std::string > &laneIDs, const double startPos, const double endPos, const bool friendlyPos, const std::vector< std::string > &forbiddenInnerLanes, const Parameterised::Map ¶meters)=0
build overhead wire
void parseVariableSpeedSignStepAttributes(const SUMOSAXAttributes &attrs)
parse variable speed sign step attributes
void parseParameters(const SUMOSAXAttributes &attrs)
parse generic parameters
void parseParkingSpaceAttributes(const SUMOSAXAttributes &attrs)
parse parking space attributes
void parseExitAttributes(const SUMOSAXAttributes &attrs)
parse exist attributes
virtual void buildClosingLaneReroute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &closedLane, SVCPermissions permissions)=0
builds a closing lane reroute
virtual void buildTAZSink(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &edgeID, const double arrivalWeight)=0
Builds a TAZSink (Traffic Assignment Zone)
void parseRerouterAttributes(const SUMOSAXAttributes &attrs)
parse rerouter attributes
void parseBusStopAttributes(const SUMOSAXAttributes &attrs)
virtual void buildClosingReroute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &closedEdgeID, SVCPermissions permissions)=0
builds a closing edge reroute
void parseContainerStopAttributes(const SUMOSAXAttributes &attrs)
parse containerStop attributes
virtual void buildChargingStation(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double startPos, const double endPos, const std::string &name, const double chargingPower, const double efficiency, const bool chargeInTransit, const SUMOTime chargeDelay, const bool friendlyPosition, const Parameterised::Map ¶meters)=0
Builds a charging Station.
void parseParkingAreaAttributes(const SUMOSAXAttributes &attrs)
parse parking area attributes
virtual void buildDetectorE1Instant(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double pos, const std::string &filename, const std::vector< std::string > &vehicleTypes, const std::string &name, const bool friendlyPos, const Parameterised::Map ¶meters)=0
Builds a Instant Induction Loop Detector (E1Instant)
virtual void buildVaporizer(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &edgeID, const SUMOTime from, const SUMOTime endTime, const std::string &name, const Parameterised::Map ¶meters)=0
Builds a vaporizer (lane speed additional)
virtual void buildDetectorExit(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &laneID, const double pos, const bool friendlyPos, const Parameterised::Map ¶meters)=0
Builds a exit detector (E3)
virtual void buildContainerStop(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double startPos, const double endPos, const std::string &name, const std::vector< std::string > &lines, const int containerCapacity, const double parkingLength, const RGBColor &color, const bool friendlyPosition, const Parameterised::Map ¶meters)=0
Builds a container stop.
virtual void buildTractionSubstation(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const Position &pos, const double voltage, const double currentLimit, const Parameterised::Map ¶meters)=0
build traction substation
virtual void buildBusStop(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &laneID, const double startPos, const double endPos, const std::string &name, const std::vector< std::string > &lines, const int personCapacity, const double parkingLength, const RGBColor &color, const bool friendlyPosition, const Parameterised::Map ¶meters)=0
Builds a bus stop.
void parseRouteProbeAttributes(const SUMOSAXAttributes &attrs)
parse route probe attributes
void parseAccessAttributes(const SUMOSAXAttributes &attrs)
parse access attributes
void parseTAZSourceAttributes(const SUMOSAXAttributes &attrs)
parse TAZ source attributes
void parseVaporizerAttributes(const SUMOSAXAttributes &attrs)
parse vaporizer attributes
virtual void buildParkingAreaReroute(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &newParkignAreaID, const double probability, const bool visible)=0
builds a parking area reroute
virtual void buildRouteProbe(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &edgeID, const SUMOTime period, const std::string &name, const std::string &file, const SUMOTime begin, const Parameterised::Map ¶meters)=0
builds a Route probe
void parseClosingLaneRerouteAttributes(const SUMOSAXAttributes &attrs)
parse closing lane reroute attributes
void parseRerouterIntervalAttributes(const SUMOSAXAttributes &attrs)
parse rerouter interval attributes
bool isErrorCreatingElement() const
get flag for check if a element wasn't created
virtual void buildPOIGeo(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &type, const RGBColor &color, const double lon, const double lat, const double layer, const double angle, const std::string &imgFile, bool relativePath, const double width, const double height, const std::string &name, const Parameterised::Map ¶meters)=0
Builds a POI in GEO coordinaten using the given values.
void parseEntryAttributes(const SUMOSAXAttributes &attrs)
parse entry attributes
virtual void buildTAZSource(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &edgeID, const double departWeight)=0
Builds a TAZSource (Traffic Assignment Zone)
void parsePolyAttributes(const SUMOSAXAttributes &attrs)
void parseClosingRerouteAttributes(const SUMOSAXAttributes &attrs)
parse closing reroute attributes
virtual void buildPolygon(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &type, const RGBColor &color, const double layer, const double angle, const std::string &imgFile, const bool relativePath, const PositionVector &shape, const bool geo, const bool fill, const double lineWidth, const std::string &name, const Parameterised::Map ¶meters)=0
Builds a polygon using the given values.
void addIntAttribute(const SumoXMLAttr attr, const int value)
add int attribute into current SumoBaseObject node
const RGBColor & getColorAttribute(const SumoXMLAttr attr) const
get color attribute
SUMOTime getTimeAttribute(const SumoXMLAttr attr) const
get time attribute
const PositionVector & getPositionVectorAttribute(const SumoXMLAttr attr) const
get PositionVector attribute
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
const Position & getPositionAttribute(const SumoXMLAttr attr) const
get Position attribute
void addPositionVectorAttribute(const SumoXMLAttr attr, const PositionVector &value)
add PositionVector attribute into current SumoBaseObject node
const std::map< std::string, std::string > & getParameters() const
get parameters
void addBoolAttribute(const SumoXMLAttr attr, const bool value)
add bool attribute into current SumoBaseObject node
SumoXMLTag getTag() const
void addTimeAttribute(const SumoXMLAttr attr, const SUMOTime value)
add time attribute into current SumoBaseObject node
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
int getIntAttribute(const SumoXMLAttr attr) const
get int attribute
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
bool hasDoubleAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given double attribute
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
bool getBoolAttribute(const SumoXMLAttr attr) const
get bool attribute
SUMOTime getPeriodAttribute() const
get 'period' attribute
void setVehicleParameter(const SUMOVehicleParameter *vehicleParameter)
set vehicle parameters
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
double getDoubleAttribute(const SumoXMLAttr attr) const
get double attribute
const SUMOVehicleParameter & getVehicleParameter() const
get vehicle parameters
const std::vector< std::string > & getStringListAttribute(const SumoXMLAttr attr) const
get string list attribute
void addColorAttribute(const SumoXMLAttr attr, const RGBColor &value)
add color attribute into current SumoBaseObject node
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
const std::vector< SumoBaseObject * > & getSumoBaseObjectChildren() const
get SumoBaseObject children
CommonXMLStructure::SumoBaseObject * getCurrentSumoBaseObject() const
get current editedSumoBaseObject
void openSUMOBaseOBject()
open SUMOBaseOBject
void closeSUMOBaseOBject()
close myTag
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
static const RGBColor INVISIBLE
static const RGBColor RED
named colors
Encapsulated SAX-Attributes.
virtual std::string getString(int id, bool *isPresent=nullptr) const =0
Returns the string-value of the named (by its enum-value) attribute.
SUMOTime getOptPeriod(const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read the SUMOTime 'period' attribute.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue=T(), bool report=true) const
Tries to read given attribute assuming it is an int.
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
SUMOTime getSUMOTimeReporting(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
Structure representing possible vehicle parameter.
int parametersSet
Information for the router which parameter were set, TraCI may modify this (when changing color)
SUMOTime repetitionOffset
The time offset between vehicle reinsertions.
SUMOTime repetitionEnd
The time at which the flow ends (only needed when using repetitionProbability)
double calibratorSpeed
speed (used by calibrator flows
static SUMOVehicleParameter * parseVehicleAttributes(int element, const SUMOSAXAttributes &attrs, const bool hardFail, const bool optionalID=false, const bool skipDepart=false)
Parses a vehicle's attributes.
static bool isValidParameterKey(const std::string &value)
whether the given string is a valid key for a parameter
static const bool DEFAULT_RELATIVEPATH
static const double DEFAULT_LAYER
static const double DEFAULT_LAYER_POI
static const double DEFAULT_IMG_WIDTH
static const std::string DEFAULT_IMG_FILE
static const double DEFAULT_LINEWIDTH
static const double DEFAULT_ANGLE
static const double DEFAULT_IMG_HEIGHT
static const std::string DEFAULT_TYPE