59 myTagPropertyParent(nullptr),
61 myAttributeProperty(ATTRPROPERTY_STRING),
70 myAttribute(attribute),
71 myTagPropertyParent(nullptr),
73 myAttributeProperty(attributeProperty),
74 myDefinition(definition),
75 myDefaultValue(defaultValue),
80 if (definition.empty()) {
89 throw FormatException(
"Default value for attribute '" +
toString(attribute) +
"' cannot be static and mutable at the same time");
93 throw FormatException(
"Attribute '" +
toString(attribute) +
"' requires a either static or mutable default value");
97 throw FormatException(
"Attribute '" +
toString(attribute) +
"' cannot be flowdefinition and activatable at the same time");
108 if (isPositive() && !(isInt() || isFloat() || isSUMOTime())) {
109 throw FormatException(
"Only int, floats or SUMOTimes can be positive");
112 if (isSecuential() && !isList()) {
113 throw FormatException(
"Secuential property only is compatible with list properties");
120 if (hasAttrRange()) {
121 if (myMinimumRange == myMaximumRange) {
123 }
else if ((myMinimumRange == 0) && (myMaximumRange == 0)) {
125 }
else if ((myMaximumRange - myMinimumRange) <= 0) {
130 if (isOptional() && !(hasStaticDefaultValue() || hasMutableDefaultValue())) {
131 throw FormatException(
"if attribute is optional, must have either a static or dynamic default value");
139 myDiscreteValues = discreteValues;
141 throw FormatException(
"AttributeProperty doesn't support discrete values values");
148 if (hasAttrSynonym()) {
149 myAttrSynonym = synonym;
158 if (hasAttrRange()) {
159 myMinimumRange = minimum;
160 myMaximumRange = maximum;
162 if (myMinimumRange == myMaximumRange) {
164 }
else if ((myMinimumRange == 0) && (myMaximumRange == 0)) {
166 }
else if ((myMaximumRange - myMinimumRange) <= 0) {
177 myTagPropertyParent = tagPropertyParent;
195 return *myTagPropertyParent;
201 for (
auto i = myTagPropertyParent->begin(); i != myTagPropertyParent->end(); i++) {
202 if (i->getAttr() == myAttribute) {
203 return (
int)(i - myTagPropertyParent->begin());
206 throw ProcessError(
"Attribute wasn't found in myTagPropertyParent");
218 return myDefaultValue;
281 type =
"probability";
288 return pre + type + plural + last;
292 const std::vector<std::string>&
294 return myDiscreteValues;
300 if (hasAttrSynonym()) {
301 return myAttrSynonym;
310 if (hasAttrRange()) {
311 return myMinimumRange;
320 if (hasAttrRange()) {
321 return myMaximumRange;
514 myParentTag(parentTag),
515 myTagSynonym(tagSynonym) {
537 if (!isNetElement() && !isAdditional() && !isShape() && !isTAZ() && !isDemandElement()) {
538 throw ProcessError(
"element must be at leas netElement, additional, TAZ, shape or demandElement");
541 if ((isNetElement() + isAdditional() + isShape() + isTAZ() + isDemandElement()) > 1) {
542 throw ProcessError(
"element can be only a netElement, additional, shape or demandElement at the same time");
546 throw ProcessError(
"If attribute mask the start and end position, bot attribute has to be defined");
557 for (
auto i : myAttributeProperties) {
558 i.checkAttributeIntegrity();
560 if (i.isVClasses()) {
564 throw ProcessError(
"allow need a disallow attribute in the same tag");
566 throw ProcessError(
"disallow need an allow attribute in the same tag");
576 for (
const auto& i : myAttributeProperties) {
577 if (i.getAttr() == attr) {
578 if (!i.hasStaticDefaultValue()) {
579 throw ProcessError(
"attribute '" + i.getAttrStr() +
"' doesn't have a default value");
581 return i.getDefaultValue();
591 if (isAttributeDeprecated(attributeProperty.
getAttr())) {
592 throw ProcessError(
"Attribute '" + attributeProperty.
getAttrStr() +
"' is deprecated and cannot be inserted");
594 throw ProcessError(
"Maximum number of attributes for tag " + attributeProperty.
getAttrStr() +
" exceeded");
597 for (
auto i : myAttributeProperties) {
598 if (i.getAttr() == attributeProperty.
getAttr()) {
603 myAttributeProperties.push_back(attributeProperty);
604 myAttributeProperties.back().setTagPropertyParent(
this);
612 for (
auto i : myAttributeProperties) {
613 if (i.getAttr() == attr) {
614 throw ProcessError(
"Attribute '" +
toString(attr) +
"' is deprecated but was inserted in list of attributes");
618 myDeprecatedAttributes.push_back(attr);
625 for (
const auto& i : myAttributeProperties) {
626 if ((i.getAttr() == attr) || (i.hasAttrSynonym() && (i.getAttrSynonym() == attr))) {
635 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
637 return myAttributeProperties.begin();
641 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
643 return myAttributeProperties.end();
649 return (
int)myAttributeProperties.size();
671 if (hasTagSynonym()) {
682 for (
const auto& i : myAttributeProperties) {
683 if (i.getAttr() == attr) {
914 return (std::find(myDeprecatedAttributes.begin(), myDeprecatedAttributes.end(), attr) != myDeprecatedAttributes.end());
959 template<> std::string
967 if (
string.size() == 0) {
985 if (
string.size() == 0) {
990 if (!ok || (pos.size() != 1)) {
1003 if (
string.empty()) {
1027 template<> std::vector<std::string>
1033 template<> std::set<std::string>
1036 std::set<std::string> solution;
1037 for (
const auto& i : vectorString) {
1044 template<> std::vector<int>
1046 std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1047 std::vector<int> parsedIntValues;
1048 for (
const auto& i : parsedValues) {
1049 parsedIntValues.push_back(parse<int>(i));
1051 return parsedIntValues;
1055 template<> std::vector<double>
1057 std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1058 std::vector<double> parsedDoubleValues;
1059 for (
const auto& i : parsedValues) {
1060 parsedDoubleValues.push_back(parse<double>(i));
1062 return parsedDoubleValues;
1066 template<> std::vector<bool>
1068 std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1069 std::vector<bool> parsedBoolValues;
1070 for (
const auto& i : parsedValues) {
1071 parsedBoolValues.push_back(parse<bool>(i));
1073 return parsedBoolValues;
1077 template<> std::vector<GNEEdge*>
1080 std::vector<std::string> edgeIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
1081 std::vector<GNEEdge*> parsedEdges;
1083 for (
const auto& i : edgeIds) {
1085 if (retrievedEdge) {
1095 template<> std::vector<GNELane*>
1098 std::vector<std::string> laneIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
1099 std::vector<GNELane*> parsedLanes;
1101 for (
const auto& i : laneIds) {
1103 if (retrievedLane) {
1113 template<> std::string
1116 std::vector<std::string> edgeIDs;
1117 for (
const auto& i : ACs) {
1118 edgeIDs.push_back(i->getID());
1124 template<> std::string
1127 std::vector<std::string> laneIDs;
1128 for (
const auto& i : ACs) {
1129 laneIDs.push_back(i->getID());
1138 if (lanes.size() > 1) {
1140 int currentLane = 0;
1141 while (currentLane < ((
int)lanes.size() - 1)) {
1144 for (
int i = 0; (i < (int)lanes.at(currentLane)->getParentEdge()->getGNEJunctionDestiny()->getGNEOutgoingEdges().size()) && (nextLane == -1); i++) {
1146 for (
int j = 0; (j < (int)lanes.at(currentLane)->getParentEdge()->getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().size()) && (nextLane == -1); j++) {
1148 if (lanes.at(currentLane)->getParentEdge()->getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().at(j) == lanes.at(currentLane + 1)) {
1149 nextLane = currentLane;
1153 if (nextLane == -1) {
1177 if (direction ==
"s") {
1178 return "Straight (s)";
1179 }
else if (direction ==
"t") {
1181 }
else if (direction ==
"l") {
1183 }
else if (direction ==
"r") {
1185 }
else if (direction ==
"L") {
1186 return "Partially left (L)";
1187 }
else if (direction ==
"R") {
1188 return "Partially right (R)";
1189 }
else if (direction ==
"invalid") {
1190 return "No direction (Invalid))";
1199 return "Dead end (-)";
1200 }
else if (state ==
"=") {
1202 }
else if (state ==
"m") {
1203 return "Minor link (m)";
1204 }
else if (state ==
"M") {
1205 return "Major link (M)";
1206 }
else if (state ==
"O") {
1207 return "TLS controller off (O)";
1208 }
else if (state ==
"o") {
1209 return "TLS yellow flashing (o)";
1210 }
else if (state ==
"y") {
1211 return "TLS yellow minor link (y)";
1212 }
else if (state ==
"Y") {
1213 return "TLS yellow major link (Y)";
1214 }
else if (state ==
"r") {
1215 return "TLS red (r)";
1216 }
else if (state ==
"g") {
1217 return "TLS green minor (g)";
1218 }
else if (state ==
"G") {
1219 return "TLS green major (G)";
1233 return "not together with number and period or probability";
1235 return "not together with end and period or probability";
1239 return "not together with number and vehsPerHour or probability";
1241 return "not together with end and vehsPerHour or probability";
1245 return "not together with number and vehsPerHour or period";
1247 return "not together with end and vehsPerHour or period";
1250 return "not together with end and number";
1315 std::vector<SumoXMLTag>
1317 std::vector<SumoXMLTag> allTags;
1324 if (!onlyDrawables || i.second.isDrawable()) {
1325 allTags.push_back(i.first);
1332 std::vector<SumoXMLTag>
1342 if (i.second.isNetElement() && (!onlyDrawables || i.second.isDrawable())) {
1350 if (i.second.isAdditional() && (!onlyDrawables || i.second.isDrawable())) {
1358 if (i.second.isShape() && (!onlyDrawables || i.second.isDrawable())) {
1366 if (i.second.isTAZ() && (!onlyDrawables || i.second.isDrawable())) {
1374 if (i.second.isDemandElement() && (!onlyDrawables || i.second.isDrawable())) {
1382 if (i.second.isRoute() && (!onlyDrawables || i.second.isDrawable())) {
1390 if (i.second.isVehicle() && (!onlyDrawables || i.second.isDrawable())) {
1398 if (i.second.isStop() && (!onlyDrawables || i.second.isDrawable())) {
1406 if (i.second.isPerson() && (!onlyDrawables || i.second.isDrawable())) {
1414 if (i.second.isPersonPlan() && (!onlyDrawables || i.second.isDrawable())) {
1422 if (i.second.isPersonTrip() && (!onlyDrawables || i.second.isDrawable())) {
1430 if (i.second.isWalk() && (!onlyDrawables || i.second.isDrawable())) {
1438 if (i.second.isRide() && (!onlyDrawables || i.second.isDrawable())) {
1446 if (i.second.isPersonStop() && (!onlyDrawables || i.second.isDrawable())) {
1472 i.second.checkTagIntegrity();
1496 "The id of the edge");
1501 "The name of a node within the nodes-file the edge shall start at");
1506 "The name of a node within the nodes-file the edge shall end at");
1511 "The maximum speed allowed on the edge in m/s",
1517 "The priority of the edge",
1523 "The number of lanes of the edge",
1529 "The name of a type within the SUMO edge type file");
1534 "Explicitly allows the given vehicle classes (not given will be not allowed)",
1541 "Explicitly disallows the given vehicle classes (not given will be allowed)");
1547 "If the shape is given it should start and end with the positions of the from-node and to-node");
1552 "The length of the edge in meter");
1557 "Lane width for all lanes of this edge in meters (used for visualization)",
1564 "street name (need not be unique, used for visualization)");
1569 "Lane width for all lanes of this edge in meters (used for visualization)",
1575 "Move the stop line back from the intersection by the given amount",
1581 "Custom position in which shape start (by default position of junction from)");
1586 "Custom position in which shape end (by default position of junction from)");
1591 "Show if edge is bidireccional",
1608 "The id of the node");
1613 "The x-y-z position of the node on the plane in meters");
1618 "An optional type for the node");
1624 "A custom shape for that node");
1629 "Optional turning radius (for all corners) for that node in meters",
1635 "Whether the junction-blocking-heuristic should be activated at this node",
1641 "How to compute right of way rules at this node",
1648 "Whether this junction is at the fringe of the network",
1655 "An optional type for the traffic light algorithm");
1661 "An optional id for the traffic light program");
1671 "ID of lane (Automatic, non editable)");
1676 "The enumeration index of the lane (0 is the rightmost lane, <NUMBER_LANES>-1 is the leftmost one)");
1681 "Speed in meters per second",
1687 "Explicitly allows the given vehicle classes (not given will be not allowed)",
1694 "Explicitly disallows the given vehicle classes (not given will be allowed)");
1700 "Width in meters (used for visualization)",
1706 "Move the stop line back from the intersection by the given amount",
1712 "Enable or disable lane as acceleration lane",
1718 "If the shape is given it overrides the computation based on edge shape");
1728 "The ID of Crossing");
1733 "The (road) edges which are crossed");
1738 "Whether the pedestrians have priority over the vehicles (automatically set to true at tls-controlled intersections)",
1744 "The width of the crossings",
1750 "sets the tls-index for this crossing",
1756 "sets the opposite-direction tls-index for this crossing",
1762 "Overrids default shape of pedestrian crossing");
1772 "The name of the edge the vehicles leave");
1777 "The name of the edge the vehicles may reach when leaving 'from'");
1782 "the lane index of the incoming lane (numbers starting with 0)");
1787 "the lane index of the outgoing lane (numbers starting with 0)");
1792 "if set, vehicles which pass this (lane-2-lane) connection) will not wait",
1798 "if set to false, vehicles which pass this (lane-2-lane) connection) will not worry about blocking the intersection",
1804 "If set to a more than 0 value, an internal junction will be built at this position (in m) from the start of the internal lane for this connection",
1810 "If set to true, This connection will not be TLS-controlled despite its node being controlled",
1816 "Vision distance between vehicles",
1822 "sets index of this connection within the controlling trafficlight",
1828 "sets index for the internal junction of this connection within the controlling trafficlight",
1834 "Explicitly allows the given vehicle classes (not given will be not allowed)",
1841 "Explicitly disallows the given vehicle classes (not given will be allowed)");
1847 "sets custom speed limit for the connection",
1853 "sets custom shape for the connection");
1858 "turning direction for this connection (computed)");
1863 "link state for this connection (computed)");
1881 "The id of bus stop");
1886 "The name of the lane the bus stop shall be located at");
1891 "The begin position on the lane (the lower position on the lane) in meters");
1896 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1901 "Name of " +
toString(currentTag));
1906 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
1912 "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes");
1917 "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes",
1928 "The name of the lane the stop access shall be located at");
1933 "The position on the lane (the lower position on the lane) in meters",
1939 "The walking length of the access in meters");
1944 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
1956 "The id of container stop");
1961 "The name of the lane the container stop shall be located at");
1966 "The begin position on the lane (the lower position on the lane) in meters");
1971 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1976 "Name of " +
toString(currentTag));
1981 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
1987 "meant to be the names of the bus lines that stop at this container stop. This is only used for visualization purposes");
1997 "The id of charging station");
2002 "Lane of the charging station location");
2007 "Begin position in the specified lane");
2012 "End position in the specified lane");
2017 "Name of " +
toString(currentTag));
2022 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2028 "Charging power in W",
2034 "Charging efficiency [0,1]",
2041 "Enable or disable charge in transit, i.e. vehicle must or must not to stop for charging",
2047 "Time delay after the vehicles has reached / stopped on the charging station, before the energy transfer (charging) begins",
2058 "The id of ParkingArea");
2063 "The name of the lane the Parking Area shall be located at");
2068 "The begin position on the lane (the lower position on the lane) in meters");
2073 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
2078 "Name of " +
toString(currentTag));
2083 " The number of parking spaces for road-side parking",
2089 "If set, vehicles will park on the road lane and thereby reducing capacity",
2095 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2101 "The width of the road-side parking spaces",
2107 "The length of the road-side parking spaces. By default (endPos - startPos) / roadsideCapacity");
2112 "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
2124 "The x-y-z position of the parking vehicle on the plane");
2129 "The width of the road-side parking spaces",
2135 "The length of the road-side parking spaces",
2141 "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
2158 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2163 "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length");
2168 "The aggregation period the values the detector collects shall be summed up",
2174 "Name of " +
toString(currentTag));
2179 "The path to the output file");
2184 "Space separated list of vehicle type ids to consider");
2189 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2207 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2212 "The position on the lane the detector shall be laid on in meters");
2217 "The length of the detector in meters",
2223 "The aggregation period the values the detector collects shall be summed up",
2229 "Name of " +
toString(currentTag));
2234 "The path to the output file");
2239 "Space separated list of vehicle type ids to consider");
2244 "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
2250 "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2256 "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
2262 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2275 "The id of Multilane E2");
2280 "The list of secuencial lane ids in which the detector shall be laid on");
2285 "The position on the lane the detector shall be laid on in meters");
2290 "The end position on the lane the detector shall be laid on in meters");
2295 "The aggregation period the values the detector collects shall be summed up",
2301 "Name of " +
toString(currentTag));
2306 "The path to the output file");
2311 "Space separated list of vehicle type ids to consider");
2316 "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
2322 "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2328 "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
2334 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2351 "X-Y position of detector in editor (Only used in NETEDIT)",
2357 "The aggregation period the values the detector collects shall be summed up",
2363 "Name of " +
toString(currentTag));
2368 "The path to the output file");
2373 "Space separated list of vehicle type ids to consider");
2378 "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting) in s",
2384 "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2395 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2400 "The position on the lane the detector shall be laid on in meters");
2405 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2417 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2422 "The position on the lane the detector shall be laid on in meters");
2427 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2439 "The id of Instant Induction Loop (E1Instant)");
2444 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2449 "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length");
2454 "Name of " +
toString(currentTag));
2459 "The path to the output file");
2464 "Space separated list of vehicle type ids to consider");
2469 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2483 "The id of Variable Speed Signal");
2488 "X-Y position of detector in editor (Only used in NETEDIT)",
2494 "list of lanes of Variable Speed Sign");
2499 "Name of " +
toString(currentTag));
2525 "The id of Calibrator");
2530 "The id of edge in the simulation network");
2535 "The position of the calibrator on the specified lane",
2541 "The aggregation interval in which to calibrate the flows. Default is step-length",
2547 "Name of " +
toString(currentTag));
2552 "The id of the routeProbe element from which to determine the route distribution for generated vehicles");
2557 "The output file for writing calibrator information or NULL");
2567 "The id of Calibrator");
2572 "The id of lane in the simulation network");
2577 "The position of the calibrator on the specified lane",
2583 "The aggregation interval in which to calibrate the flows. Default is step-length",
2589 "Name of " +
toString(currentTag));
2594 "The id of the routeProbe element from which to determine the route distribution for generated vehicles");
2599 "The output file for writing calibrator information or NULL");
2609 "The id of the vehicle type to use for this " +
toString(currentTag),
2615 "The id of the route the vehicle shall drive along");
2623 "First " +
toString(currentTag) +
" departure time",
2629 "End of departure interval",
2635 "Number of " +
toString(currentTag) +
"s per hour, equally spaced");
2640 "Speed of " +
toString(currentTag) +
"s");
2650 "The id of Rerouter");
2655 "An edge id or a list of edge ids where vehicles shall be rerouted");
2660 "X,Y position in editor (Only used in NETEDIT)",
2666 "Name of " +
toString(currentTag));
2671 "The path to the definition file (alternatively, the intervals may defined as children of the rerouter)");
2676 "The probability for vehicle rerouting (0-1)",
2682 "The waiting time threshold (in s) that must be reached to activate rerouting (default -1 which disables the threshold)",
2688 "The list of vehicle types that shall be affected by this rerouter (empty to affect all types)");
2693 "Whether the router should be inactive initially (and switched on in the gui)",
2727 "allowed vehicles");
2732 "disallowed vehicles");
2748 "allowed vehicles");
2753 "disallowed vehicles");
2792 "Enable or disable visibility for parking area reroutes",
2820 "The id of RouteProbe");
2825 "The id of an edge in the simulation network");
2830 "The frequency in which to report the distribution",
2836 "Name of " +
toString(currentTag));
2841 "The file for generated output");
2846 "The time at which to start generating output",
2857 "Edge in which vaporizer is placed");
2874 "Name of " +
toString(currentTag));
2884 "The id of the TAZ");
2889 "The shape of the TAZ");
2894 "The RGBA color with which the TAZ shall be displayed",
2905 "The id of edge in the simulation network");
2911 "Depart weight associated to this Edge",
2922 "The id of edge in the simulation network");
2928 "Arrival weight associated to this Edget",
2947 "The id of the polygon");
2952 "The shape of the polygon");
2957 "The RGBA color with which the polygon shall be displayed",
2963 "An information whether the polygon shall be filled",
2969 "The default line width for drawing an unfilled polygon",
2975 "The layer in which the polygon lies",
2981 "A typename for the polygon",
2987 "A bitmap to use for rendering this polygon",
2993 "Enable or disable use image file as a relative path",
2999 "Angle of rendered image in degree",
3010 "The id of the " +
toString(currentTag));
3015 "The position in view");
3020 "The color with which the " +
toString(currentTag) +
" shall be displayed",
3026 "A typename for the " +
toString(currentTag),
3032 "The layer of the " +
toString(currentTag) +
" for drawing and selecting",
3038 "Width of rendered image in meters",
3044 "Height of rendered image in meters",
3050 "A bitmap to use for rendering this " +
toString(currentTag),
3056 "Enable or disable use image file as a relative path",
3062 "Angle of rendered image in degree",
3073 "The id of the " +
toString(currentTag));
3078 "The name of the lane at which the " +
toString(currentTag) +
" is located at");
3083 "The position on the named lane or in the net in meters at which the " +
toString(currentTag) +
" is located at");
3088 "The lateral offset on the named lane at which the " +
toString(currentTag) +
" is located at",
3094 "The color with which the " +
toString(currentTag) +
" shall be displayed",
3100 "A typename for the " +
toString(currentTag),
3106 "The layer of the " +
toString(currentTag) +
" for drawing and selecting",
3112 "Width of rendered image in meters",
3118 "Height of rendered image in meters",
3124 "A bitmap to use for rendering this " +
toString(currentTag),
3130 "Enable or disable use image file as a relative path",
3136 "Angle of rendered image in degree",
3146 std::vector<std::string> vClassesVehicles, vClassesPersons;
3148 for (
const auto& i : vClasses) {
3150 vClassesPersons.push_back(i);
3152 vClassesVehicles.push_back(i);
3172 "The edges the vehicle shall drive along, given as their ids, separated using spaces");
3177 "This route's color",
3189 "The edges the vehicle shall drive along, given as their ids, separated using spaces");
3194 "This route's color",
3206 "The id of VehicleType");
3211 "An abstract vehicle class",
3218 "This vehicle type's color",
3224 "The vehicle's netto-length (length) [m]");
3229 "Empty space after leader [m]");
3234 "The vehicle's maximum velocity [m/s]");
3239 "The vehicles expected multiplicator for lane speed limits");
3244 "The deviation of the speedFactor");
3249 "An abstract emission class");
3255 "How this vehicle is rendered");
3261 "The vehicle's width [m] (only used for drawing)",
3267 "The vehicle's height [m] (only used for drawing)",
3273 "Image file for rendering vehicles of this type (should be grayscale to allow functional coloring)");
3278 "The model used for changing lanes",
3285 "The model used for car following",
3292 "The number of persons (excluding an autonomous driver) the vehicle can transport");
3297 "The number of containers the vehicle can transport");
3302 "The time required by a person to board the vehicle",
3308 "The time required to load a container onto the vehicle",
3314 "The preferred lateral alignment when using the sublane-model",
3321 "The minimum lateral gap at a speed difference of 50km/h when using the sublane-model",
3327 "The maximum lateral speed when using the sublane-model",
3333 "The interval length for which vehicle performs its decision logic (acceleration and lane-changing)",
3339 "The probability when being added to a distribution without an explicit probability",
3345 "3D model file for this class",
3351 "Carriage lengths");
3356 "Locomotive lengths");
3361 "GAP between carriages",
3382 "The id of PersonType");
3387 "An abstract person class",
3394 "This person type's color",
3400 "The person's width [m] (only used for drawing)");
3405 "The person's netto-length (length) [m]");
3410 "Empty space after leader [m]");
3415 "The person's maximum velocity [m/s]");
3420 "This value causes persons to violate a red light if the duration of the red phase is lower than the given threshold.",
3426 "Image file for rendering persons of this type (should be grayscale to allow functional coloring)");
3444 "The name of the " +
toString(currentTag));
3449 "The id of the vehicle type to use for this " +
toString(currentTag),
3455 "The id of the route the " +
toString(currentTag) +
" shall drive along");
3463 "The time step at which the " +
toString(currentTag) +
" shall enter the network",
3474 "The name of the " +
toString(currentTag));
3479 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag),
3485 "The id of the route the " +
toString(currentTag) +
" shall drive along");
3501 "The name of " +
toString(currentTag) +
"s that will be generated using this trip definition");
3506 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag),
3512 "The name of the edge the " +
toString(currentTag) +
" starts at");
3517 "The name of the edge the " +
toString(currentTag) +
" ends at");
3522 "List of intermediate edge ids which shall be part of the " +
toString(currentTag));
3530 "The departure time of the (first) " +
toString(currentTag) +
" which is generated using this " +
toString(currentTag) +
" definition",
3541 "The name of the " +
toString(currentTag));
3546 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag),
3552 "The name of the edge the " +
toString(currentTag) +
" starts at");
3557 "The name of the edge the " +
toString(currentTag) +
" ends at");
3562 "List of intermediate edge ids which shall be part of the " +
toString(currentTag));
3593 "The name of the lane the stop shall be located at");
3598 "The begin position on the lane (the lower position on the lane) in meters",
3604 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m",
3610 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
3624 "BusStop associated with this stop");
3637 "ContainerStop associated with this stop");
3650 "ChargingStation associated with this stop");
3663 "ParkingArea associated with this stop");
3688 "The time step at which the " +
toString(currentTag) +
" shall enter the network",
3711 "The name of the edge the " +
toString(currentTag) +
" starts at");
3716 "The name of the edge the " +
toString(currentTag) +
" ends at");
3721 "List of possible vehicle types to take");
3726 "List of possible traffic modes. Walking is always possible regardless of this value");
3731 "arrival position on the destination edge",
3742 "The name of the edge the " +
toString(currentTag) +
" starts at");
3752 "List of possible vehicle types to take");
3757 "List of possible traffic modes. Walking is always possible regardless of this value");
3767 "The name of the edge the " +
toString(currentTag) +
" starts at");
3772 "The name of the edge the " +
toString(currentTag) +
" ends at");
3777 "list of vehicle alternatives to take for the " +
toString(currentTag),
3783 "arrival position on the destination edge",
3794 "The name of the edge the " +
toString(currentTag) +
" starts at");
3804 "list of vehicle alternatives to take for the ride",
3815 "id of the edges to walk");
3820 "Arrival position on the destination edge",
3832 "The id of the route to walk");
3837 "Arrival position on the destination edge",
3848 "Id of the start edge");
3853 "Id of the destination edge");
3858 "Ids of the intermediate edges");
3864 "Arrival position on the destination edge",
3876 "Id of the start edge");
3899 "The name of the lane the stop shall be located at");
3904 "The begin position on the lane (the lower position on the lane) in meters");
3909 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
3914 "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
3928 "BusStop associated with this stop");
3944 "This " +
toString(currentTag) +
"'s color",
3950 "The lane on which the " +
toString(currentTag) +
" shall be inserted",
3956 "The position at which the " +
toString(currentTag) +
" shall enter the net",
3962 "The speed with which the " +
toString(currentTag) +
" shall enter the network",
3968 "The lane at which the " +
toString(currentTag) +
" shall leave the network",
3974 "The position at which the " +
toString(currentTag) +
" shall leave the network",
3980 "The speed with which the " +
toString(currentTag) +
" shall leave the network",
3986 "A string specifying the id of a public transport line which can be used when specifying person rides");
3991 "The number of occupied seats when the " +
toString(currentTag) +
" is inserted",
3997 "The number of occupied container places when the " +
toString(currentTag) +
" is inserted",
4003 "The lateral position on the departure lane at which the " +
toString(currentTag) +
" shall enter the net",
4009 "The lateral position on the arrival lane at which the " +
toString(currentTag) +
" shall arrive",
4022 "First " +
toString(currentTag) +
" departure time",
4028 "End of departure interval",
4034 "probability for emitting a " +
toString(currentTag) +
" each second (not together with vehsPerHour or period)",
4040 "Number of " +
toString(currentTag) +
"s per hour, equally spaced (not together with period or probability)",
4046 "Insert equally spaced " +
toString(currentTag) +
"s at that period (not together with vehsPerHour or probability)",
4052 "probability for emitting a " +
toString(currentTag) +
" each second (not together with vehsPerHour or period)",
4065 "The acceleration ability of vehicles of this type [m/s^2]",
4071 "The deceleration ability of vehicles of this type [m/s^2]",
4077 "The apparent deceleration of the vehicle as used by the standard model [m/s^2]",
4083 "The maximal physically possible deceleration for the vehicle [m/s^2]",
4089 "Car-following model parameter",
4096 "Car-following model parameter",
4102 "SKRAUSSX parameter 1",
4108 "SKRAUSSX parameter 2",
4114 "SKRAUSSX parameter 3",
4120 "SKRAUSSX parameter 4",
4126 "SKRAUSSX parameter 5",
4132 "Peter Wagner 2009 parameter",
4138 "Peter Wagner 2009 parameter",
4156 "Wiedemann parameter",
4162 "Wiedemann parameter",
4168 "MinGap factor parameter",
4181 "Kerner Phi parameter",
4187 "IDM Delta parameter",
4193 "IDM Stepping parameter",
4212 "Minimum distance to pedestrians that are walking towards the conflict point with the ego vehicle.",
4218 "The accumulated waiting time after which a vehicle will drive onto an intersection even though this might cause jamming.",
4224 "This value causes vehicles to violate a yellow light if the duration of the yellow phase is lower than the given threshold.",
4230 "This value causes vehicles to violate a red light if the duration of the red phase is lower than the given threshold.",
4236 "This value causes vehicles affected by jmDriveAfterRedTime to slow down when violating a red light.",
4242 "This value causes vehicles to ignore foe vehicles that have right-of-way with the given probability.",
4248 "This value is used in conjunction with jmIgnoreFoeProb. Only vehicles with a speed below or equal to the given value may be ignored.",
4254 "This value configures driving imperfection (dawdling) while passing a minor link.",
4260 "This value defines the minimum time gap when passing ahead of a prioritized vehicle. ",
4266 "Willingess of drivers to impede vehicles with higher priority",
4279 "The eagerness for performing strategic lane changing. Higher values result in earlier lane-changing.",
4285 "The willingness for performing cooperative lane changing. Lower values result in reduced cooperation.",
4291 "The eagerness for performing lane changing to gain speed. Higher values result in more lane-changing.",
4297 "The eagerness for following the obligation to keep right. Higher values result in earlier lane-changing.",
4303 "The eagerness for using the configured lateral alignment within the lane. Higher values result in increased willingness to sacrifice speed for alignment.",
4309 "The eagerness for overtaking through the opposite-direction lane. Higher values result in more lane-changing.",
4315 "Willingness to encroach laterally on other drivers.",
4321 "Minimum lateral gap when encroaching laterally on other drives (alternative way to define lcPushy)",
4327 "Willingness to accept lower front and rear gaps on the target lane.",
4333 "Dynamic factor for modifying lcAssertive and lcPushy.",
4339 "Time to reach maximum impatience (of 1). Impatience grows whenever a lane-change manoeuvre is blocked.",
4345 "Maximum lateral acceleration per second.",
4351 "Factor for configuring the strategic lookahead distance when a change to the left is necessary (relative to right lookahead).",
4357 "Factor for configuring the treshold asymmetry when changing to the left or to the right for speed gain.",
4363 "Upper bound on lateral speed when standing.",
4369 "Upper bound on lateral speed while moving computed as lcMaxSpeedLatStanding + lcMaxSpeedLatFactor * getSpeed()",
4375 "Distance to an upcoming turn on the vehicles route, below which the alignment should be dynamically adapted to match the turn direction.",
4381 "The probability for violating rules gainst overtaking on the right.",
4402 "The name of the " +
toString(currentTag));
4407 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag) +
4413 "This " +
toString(currentTag) +
"'s color",
4419 "The position at which the " +
toString(currentTag) +
" shall enter the net",
4432 "Minimum duration for stopping",
4438 "The time step at which the route continues",
4444 "If set to a non-negative time value, then the stop duration can be extended at most by the extension value in seconds",
4450 "Where to insert the stop in the vehicle's list of stops",
4456 "Whether a person may end the stop",
4462 "List of persons that must board the vehicle before it may continue");
4467 "Whether a container may end the stop",
4473 "List of containers that must be loaded onto the vehicle before it may continue");
4478 "whether the vehicle stops on the road or beside ",
4484 "Activity displayed for stopped person in GUI and output files ",
4500 std::string& defaultValue, std::string& parsedAttribute, std::string& warningMessage) {
4502 std::string errorFormat;
4505 if (parsedAttribute.empty()) {
4506 errorFormat =
"ID cannot be empty; ";
4510 errorFormat =
"Detector ID contains invalid characters; ";
4515 errorFormat =
"Demand Element ID contains invalid characters; ";
4518 errorFormat =
"ID contains invalid characters; ";
4522 if (attrProperties.
isInt()) {
4523 if (canParse<int>(parsedAttribute)) {
4525 int parsedIntAttribute = parse<int>(parsedAttribute);
4527 if (attrProperties.
isPositive() && (parsedIntAttribute < 0)) {
4528 errorFormat =
"Cannot be negative; ";
4530 }
else if (canParse<double>(parsedAttribute)) {
4531 errorFormat =
"Float cannot be reinterpreted as int; ";
4533 errorFormat =
"Cannot be parsed to int; ";
4537 if (attrProperties.
isFloat()) {
4538 if (canParse<double>(parsedAttribute)) {
4540 double parsedDoubleAttribute = parse<double>(parsedAttribute);
4542 if (attrProperties.
isPositive() && (parsedDoubleAttribute < 0)) {
4543 errorFormat =
"Cannot be negative; ";
4546 errorFormat =
"Cannot be parsed to float; ";
4550 if (attrProperties.
isBool()) {
4551 if (!canParse<bool>(parsedAttribute)) {
4552 errorFormat =
"Cannot be parsed to boolean; ";
4558 if (attrProperties.
isList()) {
4560 if (!canParse<PositionVector>(parsedAttribute)) {
4561 errorFormat =
"List of Positions aren't neither x,y nor x,y,z; ";
4563 }
else if (!canParse<Position>(parsedAttribute)) {
4564 errorFormat =
"Position is neither x,y nor x,y,z; ";
4569 if (!canParse<SUMOTime>(parsedAttribute)) {
4570 errorFormat =
"Cannot be parsed to SUMOTime; ";
4575 if (canParse<double>(parsedAttribute)) {
4577 double probability = parse<double>(parsedAttribute);
4578 if (probability < 0) {
4579 errorFormat =
"Probability cannot be smaller than 0; ";
4580 }
else if (probability > 1) {
4581 errorFormat =
"Probability cannot be greather than 1; ";
4584 errorFormat =
"Cannot be parsed to probability; ";
4589 if (canParse<double>(parsedAttribute)) {
4591 double range = parse<double>(parsedAttribute);
4598 errorFormat =
"Cannot be parsed to float; ";
4607 errorFormat =
"value is not within the set of allowed values for attribute '" +
toString(attribute) +
"'";
4611 if (attrProperties.
isColor() && !canParse<RGBColor>(parsedAttribute)) {
4612 errorFormat =
"Invalid RGB format or named color; ";
4617 errorFormat =
"Filename contains invalid characters; ";
4618 }
else if (parsedAttribute.empty() && !attrProperties.
isOptional()) {
4619 errorFormat =
"Filename cannot be empty; ";
4624 errorFormat =
"name contains invalid characters; ";
4629 errorFormat =
"List of VClasses isn't valid; ";
4630 parsedAttribute = defaultValue;
4635 errorFormat =
"RouteProbe ID contains invalid characters; ";
4639 errorFormat =
"List of edges cannot be empty; ";
4643 errorFormat =
"List of lanes cannot be empty; ";
4647 errorFormat =
"List of vTypes contains invalid characters; ";
4651 errorFormat =
"RouteProbe ID contains invalid characters; ";
4654 if (errorFormat.size() > 0) {
4658 warningMessage +
" is invalid; " + errorFormat +
"Default value will be used.");
4663 warningMessage +
" is invalid; " + errorFormat + tagProperties.
getTagStr() +
" cannot be created");
4665 parsedAttribute = defaultValue;
4677 const AttributeProperties& attrProperties, std::string& parsedAttribute, std::string& warningMessage) {
4679 std::string x, y, z;
4680 bool parsedOk =
true;
4682 parsedAttribute =
"0,0";
4684 x = attrs.
get<std::string>(
SUMO_ATTR_X, objectID.c_str(), parsedOk,
false);
4686 if (!canParse<double>(x)) {
4688 warningMessage +
" is invalid; Cannot be parsed to float; " + tagProperties.
getTagStr() +
" cannot be created");
4694 warningMessage +
" is missing; " + tagProperties.
getTagStr() +
" cannot be created");
4699 y = attrs.
get<std::string>(
SUMO_ATTR_Y, objectID.c_str(), parsedOk,
false);
4701 if (!canParse<double>(y)) {
4703 warningMessage +
" is invalid; Cannot be parsed to float; " + tagProperties.
getTagStr() +
" cannot be created");
4709 warningMessage +
" is missing; " + tagProperties.
getTagStr() +
" cannot be created");
4715 z = attrs.
get<std::string>(
SUMO_ATTR_Z, objectID.c_str(), parsedOk,
false);
4717 if (!canParse<double>(z)) {
4719 warningMessage +
" is invalid; Cannot be parsed to float; " + tagProperties.
getTagStr() +
" cannot be created");
4726 parsedAttribute = x +
"," + y;
4728 parsedAttribute = x +
"," + y +
"," + z;