60 myTagPropertyParent(nullptr),
62 myAttributeProperty(ATTRPROPERTY_STRING),
71 myAttribute(attribute),
72 myTagPropertyParent(nullptr),
74 myAttributeProperty(attributeProperty),
75 myDefinition(definition),
76 myDefaultValue(defaultValue),
81 if (definition.empty()) {
90 throw FormatException(
"Default value for attribute '" +
toString(attribute) +
"' cannot be static and mutable at the same time");
94 throw FormatException(
"Attribute '" +
toString(attribute) +
"' requieres a either static or mutable default value");
105 if (isPositive() && !(isInt() || isFloat() || isSUMOTime())) {
106 throw FormatException(
"Only int, floats or SUMOTimes can be positive");
109 if (isSecuential() && !isList()) {
110 throw FormatException(
"Secuential property only is compatible with list properties");
117 if (hasAttrRange()) {
118 if ((myMinimumRange == 0) && (myMaximumRange == 0)) {
120 }
else if ((myMaximumRange - myMinimumRange) <= 0) {
130 myDiscreteValues = discreteValues;
132 throw FormatException(
"AttributeProperty doesn't support discrete values values");
139 if (hasAttrSynonym()) {
140 myAttrSynonym = synonym;
149 if (hasAttrRange()) {
150 myMinimumRange = minimum;
151 myMaximumRange = maximum;
160 myTagPropertyParent = tagPropertyParent;
178 return *myTagPropertyParent;
184 for (
auto i = myTagPropertyParent->begin(); i != myTagPropertyParent->end(); i++) {
185 if (i->getAttr() == myAttribute) {
186 return (
int)(i - myTagPropertyParent->begin());
189 throw ProcessError(
"Attribute wasn't found in myTagPropertyParent");
201 return myDefaultValue;
224 pre +=
"non editable ";
236 pre +=
"combinable ";
267 type =
"probability";
274 return pre + type + plural + last;
278 const std::vector<std::string>&
280 return myDiscreteValues;
286 if (hasAttrSynonym()) {
287 return myAttrSynonym;
296 if (hasAttrRange()) {
297 return myMinimumRange;
306 if (hasAttrRange()) {
307 return myMaximumRange;
512 myParentTag(parentTag),
513 myTagSynonym(tagSynonym) {
535 if (!isNetElement() && !isAdditional() && !isShape() && !isTAZ() && !isDemandElement()) {
536 throw ProcessError(
"element must be at leas netElement, additional, TAZ, shape or demandElement");
539 if ((isNetElement() + isAdditional() + isShape() + isTAZ() + isDemandElement()) > 1) {
540 throw ProcessError(
"element can be only a netElement, additional, shape or demandElement at the same time");
544 throw ProcessError(
"If attribute mask the start and end position, bot attribute has to be defined");
555 for (
auto i : myAttributeProperties) {
556 i.checkAttributeIntegrity();
558 if (i.isCombinable()) {
562 throw ProcessError(
"allow need a disallow attribute in the same tag");
564 throw ProcessError(
"disallow need an allow attribute in the same tag");
574 for (
const auto& i : myAttributeProperties) {
575 if (i.getAttr() == attr) {
576 if (!i.hasStaticDefaultValue()) {
577 throw ProcessError(
"attribute '" + i.getAttrStr() +
"' doesn't have a default value");
579 return i.getDefaultValue();
589 if (isAttributeDeprecated(attributeProperty.
getAttr())) {
590 throw ProcessError(
"Attribute '" + attributeProperty.
getAttrStr() +
"' is deprecated and cannot be inserted");
592 throw ProcessError(
"Maximum number of attributes for tag " + attributeProperty.
getAttrStr() +
" exceeded");
595 for (
auto i : myAttributeProperties) {
596 if (i.getAttr() == attributeProperty.
getAttr()) {
601 myAttributeProperties.push_back(attributeProperty);
602 myAttributeProperties.back().setTagPropertyParent(
this);
610 for (
auto i : myAttributeProperties) {
611 if (i.getAttr() == attr) {
612 throw ProcessError(
"Attribute '" +
toString(attr) +
"' is deprecated but was inserted in list of attributes");
616 myDeprecatedAttributes.push_back(attr);
623 for (
const auto& i : myAttributeProperties) {
624 if ((i.getAttr() == attr) || (i.hasAttrSynonym() && (i.getAttrSynonym() == attr))) {
633 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
635 return myAttributeProperties.begin();
639 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
641 return myAttributeProperties.end();
647 return (
int)myAttributeProperties.size();
669 if (hasTagSynonym()) {
680 for (
const auto& i : myAttributeProperties) {
681 if (i.getAttr() == attr) {
906 return (std::find(myDeprecatedAttributes.begin(), myDeprecatedAttributes.end(), attr) != myDeprecatedAttributes.end());
951 template<> std::string
959 if (
string.size() == 0) {
977 if (
string.size() == 0) {
982 if (!ok || (pos.size() != 1)) {
995 if (
string.empty()) {
1019 template<> std::vector<std::string>
1025 template<> std::set<std::string>
1028 std::set<std::string> solution;
1029 for (
const auto& i : vectorString) {
1036 template<> std::vector<int>
1038 std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1039 std::vector<int> parsedIntValues;
1040 for (
const auto& i : parsedValues) {
1041 parsedIntValues.push_back(parse<int>(i));
1043 return parsedIntValues;
1047 template<> std::vector<double>
1049 std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1050 std::vector<double> parsedDoubleValues;
1051 for (
const auto& i : parsedValues) {
1052 parsedDoubleValues.push_back(parse<double>(i));
1054 return parsedDoubleValues;
1058 template<> std::vector<bool>
1060 std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1061 std::vector<bool> parsedBoolValues;
1062 for (
const auto& i : parsedValues) {
1063 parsedBoolValues.push_back(parse<bool>(i));
1065 return parsedBoolValues;
1069 template<> std::vector<GNEEdge*>
1072 std::vector<std::string> edgeIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
1073 std::vector<GNEEdge*> parsedEdges;
1075 for (
const auto& i : edgeIds) {
1077 if (retrievedEdge) {
1087 template<> std::vector<GNELane*>
1090 std::vector<std::string> laneIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
1091 std::vector<GNELane*> parsedLanes;
1093 for (
const auto& i : laneIds) {
1095 if (retrievedLane) {
1105 template<> std::string
1108 std::vector<std::string> edgeIDs;
1109 for (
const auto& i : ACs) {
1110 edgeIDs.push_back(i->getID());
1116 template<> std::string
1119 std::vector<std::string> laneIDs;
1120 for (
const auto& i : ACs) {
1121 laneIDs.push_back(i->getID());
1130 if (lanes.size() > 1) {
1132 int currentLane = 0;
1133 while (currentLane < ((
int)lanes.size() - 1)) {
1136 for (
int i = 0; (i < (int)lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().size()) && (nextLane == -1); i++) {
1138 for (
int j = 0; (j < (int)lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().size()) && (nextLane == -1); j++) {
1140 if (lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().at(j) == lanes.at(currentLane + 1)) {
1141 nextLane = currentLane;
1145 if (nextLane == -1) {
1213 std::vector<SumoXMLTag>
1215 std::vector<SumoXMLTag> allTags;
1222 if (!onlyDrawables || i.second.isDrawable()) {
1223 allTags.push_back(i.first);
1230 std::vector<SumoXMLTag>
1240 if (i.second.isNetElement() && (!onlyDrawables || i.second.isDrawable())) {
1248 if (i.second.isAdditional() && (!onlyDrawables || i.second.isDrawable())) {
1256 if (i.second.isShape() && (!onlyDrawables || i.second.isDrawable())) {
1264 if (i.second.isTAZ() && (!onlyDrawables || i.second.isDrawable())) {
1272 if (i.second.isDemandElement() && (!onlyDrawables || i.second.isDrawable())) {
1280 if (i.second.isRoute() && (!onlyDrawables || i.second.isDrawable())) {
1288 if (i.second.isVehicle() && (!onlyDrawables || i.second.isDrawable())) {
1296 if (i.second.isStop() && (!onlyDrawables || i.second.isDrawable())) {
1304 if (i.second.isPerson() && (!onlyDrawables || i.second.isDrawable())) {
1312 if (i.second.isPersonPlan() && (!onlyDrawables || i.second.isDrawable())) {
1320 if (i.second.isPersonTrip() && (!onlyDrawables || i.second.isDrawable())) {
1328 if (i.second.isWalk() && (!onlyDrawables || i.second.isDrawable())) {
1336 if (i.second.isRide() && (!onlyDrawables || i.second.isDrawable())) {
1344 if (i.second.isPersonStop() && (!onlyDrawables || i.second.isDrawable())) {
1356 std::vector<std::string> parsedValues;
1359 parsedValues.push_back(stValues.
next());
1362 for (
auto i : parsedValues) {
1363 std::vector<std::string> parsedParameters;
1366 parsedParameters.push_back(stParam.
next());
1369 if (parsedParameters.size() == 2) {
1399 i.second.checkTagIntegrity();
1423 "The id of the edge");
1428 "The name of a node within the nodes-file the edge shall start at");
1433 "The name of a node within the nodes-file the edge shall end at");
1438 "The maximum speed allowed on the edge in m/s");
1444 "The priority of the edge");
1450 "The number of lanes of the edge");
1456 "The name of a type within the SUMO edge type file");
1461 "Explicitly allows the given vehicle classes (not given will be not allowed)",
1468 "Explicitly disallows the given vehicle classes (not given will be allowed)");
1474 "If the shape is given it should start and end with the positions of the from-node and to-node");
1479 "The length of the edge in meter");
1484 "Lane width for all lanes of this edge in meters (used for visualization)",
1491 "street name (need not be unique, used for visualization)");
1496 "Lane width for all lanes of this edge in meters (used for visualization)",
1502 "Move the stop line back from the intersection by the given amount",
1508 "Custom position in which shape start (by default position of junction from)");
1513 "Custom position in which shape end (by default position of junction from)");
1518 "Show if edge is bidireccional",
1535 "The id of the node");
1540 "The x-y-z position of the node on the plane in meters");
1545 "An optional type for the node");
1551 "A custom shape for that node");
1556 "Optional turning radius (for all corners) for that node in meters",
1562 "Whether the junction-blocking-heuristic should be activated at this node",
1568 "How to compute right of way rules at this node",
1575 "Whether this junction is at the fringe of the network",
1582 "An optional type for the traffic light algorithm");
1588 "An optional id for the traffic light program");
1598 "ID of lane (Automatic, non editable)");
1603 "The enumeration index of the lane (0 is the rightmost lane, <NUMBER_LANES>-1 is the leftmost one)");
1608 "Speed in meters per second",
1614 "Explicitly allows the given vehicle classes (not given will be not allowed)",
1621 "Explicitly disallows the given vehicle classes (not given will be allowed)");
1627 "Width in meters (used for visualization)",
1633 "Move the stop line back from the intersection by the given amount",
1639 "Enable or disable lane as acceleration lane",
1645 "If the shape is given it overrides the computation based on edge shape");
1655 "The ID of Crossing");
1660 "The (road) edges which are crossed");
1665 "Whether the pedestrians have priority over the vehicles (automatically set to true at tls-controlled intersections)",
1671 "The width of the crossings",
1677 "sets the tls-index for this crossing",
1683 "sets the opposite-direction tls-index for this crossing",
1689 "Overrids default shape of pedestrian crossing");
1699 "The name of the edge the vehicles leave");
1704 "The name of the edge the vehicles may reach when leaving 'from'");
1709 "the lane index of the incoming lane (numbers starting with 0)");
1714 "the lane index of the outgoing lane (numbers starting with 0)");
1719 "if set, vehicles which pass this (lane-2-lane) connection) will not wait",
1725 "if set to false, vehicles which pass this (lane-2-lane) connection) will not worry about blocking the intersection",
1731 "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",
1737 "If set to true, This connection will not be TLS-controlled despite its node being controlled",
1743 "Vision distance between vehicles",
1749 "sets the distance to the connection at which all relevant foes are visible",
1755 "sets custom speed limit for the connection",
1761 "sets custom shape for the connection");
1766 "turning direction for this connection (computed)");
1771 "link state for this connection (computed)");
1789 "The id of bus stop");
1794 "The name of the lane the bus stop shall be located at");
1799 "The begin position on the lane (the lower position on the lane) in meters");
1804 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1809 "Name of " +
toString(currentTag));
1814 "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",
1820 "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes");
1825 "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes",
1836 "The name of the lane the stop access shall be located at");
1841 "The position on the lane (the lower position on the lane) in meters",
1847 "The walking length of the access in meters");
1852 "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",
1864 "The id of container stop");
1869 "The name of the lane the container stop shall be located at");
1874 "The begin position on the lane (the lower position on the lane) in meters");
1879 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1884 "Name of " +
toString(currentTag));
1889 "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",
1895 "meant to be the names of the bus lines that stop at this container stop. This is only used for visualization purposes");
1905 "The id of charging station");
1910 "Lane of the charging station location");
1915 "Begin position in the specified lane");
1920 "End position in the specified lane");
1925 "Name of " +
toString(currentTag));
1930 "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",
1936 "Charging power in W",
1942 "Charging efficiency [0,1]",
1949 "Enable or disable charge in transit, i.e. vehicle must or must not to stop for charging",
1955 "Time delay after the vehicles has reached / stopped on the charging station, before the energy transfer (charging) begins",
1966 "The id of ParkingArea");
1971 "The name of the lane the Parking Area shall be located at");
1976 "The begin position on the lane (the lower position on the lane) in meters");
1981 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1986 "Name of " +
toString(currentTag));
1991 " The number of parking spaces for road-side parking",
1997 "If set, vehicles will park on the road lane and thereby reducing capacity",
2003 "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",
2009 "The width of the road-side parking spaces",
2015 "The length of the road-side parking spaces. By default (endPos - startPos) / roadsideCapacity");
2020 "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
2032 "The x-y-z position of the parking vehicle on the plane");
2037 "The width of the road-side parking spaces",
2043 "The length of the road-side parking spaces",
2049 "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
2066 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2071 "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");
2076 "The aggregation period the values the detector collects shall be summed up",
2082 "Name of " +
toString(currentTag));
2087 "The path to the output file");
2092 "Space separated list of vehicle type ids to consider");
2097 "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",
2116 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2121 "The position on the lane the detector shall be laid on in meters");
2126 "The length of the detector in meters",
2132 "The aggregation period the values the detector collects shall be summed up",
2138 "Name of " +
toString(currentTag));
2143 "The path to the output file");
2148 "Space separated list of vehicle type ids to consider");
2153 "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
2159 "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2165 "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
2171 "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",
2184 "The id of Multilane E2");
2189 "The list of secuencial lane ids in which the detector shall be laid on");
2194 "The position on the lane the detector shall be laid on in meters");
2199 "The end position on the lane the detector shall be laid on in meters");
2204 "The aggregation period the values the detector collects shall be summed up",
2210 "Name of " +
toString(currentTag));
2215 "The path to the output file");
2220 "Space separated list of vehicle type ids to consider");
2225 "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
2231 "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2237 "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
2243 "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",
2260 "X-Y position of detector in editor (Only used in NETEDIT)",
2266 "The aggregation period the values the detector collects shall be summed up",
2272 "Name of " +
toString(currentTag));
2277 "The path to the output file");
2282 "Space separated list of vehicle type ids to consider");
2287 "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting) in s",
2293 "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2304 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2309 "The position on the lane the detector shall be laid on in meters");
2314 "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",
2326 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2331 "The position on the lane the detector shall be laid on in meters");
2336 "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",
2348 "The id of Instant Induction Loop (E1Instant)");
2353 "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2358 "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");
2363 "Name of " +
toString(currentTag));
2368 "The path to the output file");
2373 "Space separated list of vehicle type ids to consider");
2378 "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",
2392 "The id of Variable Speed Signal");
2397 "X-Y position of detector in editor (Only used in NETEDIT)",
2403 "list of lanes of Variable Speed Sign");
2408 "Name of " +
toString(currentTag));
2434 "The id of Calibrator");
2439 "The id of edge in the simulation network");
2444 "The position of the calibrator on the specified lane",
2450 "The aggregation interval in which to calibrate the flows. Default is step-length",
2456 "Name of " +
toString(currentTag));
2461 "The id of the routeProbe element from which to determine the route distribution for generated vehicles");
2466 "The output file for writing calibrator information or NULL");
2476 "The id of Calibrator");
2481 "The id of lane in the simulation network");
2486 "The position of the calibrator on the specified lane",
2492 "The aggregation interval in which to calibrate the flows. Default is step-length",
2498 "Name of " +
toString(currentTag));
2503 "The id of the routeProbe element from which to determine the route distribution for generated vehicles");
2508 "The output file for writing calibrator information or NULL");
2518 "The id of the vehicle type to use for this " +
toString(currentTag),
2524 "The id of the route the vehicle shall drive along");
2532 "First " +
toString(currentTag) +
" departure time",
2538 "End of departure interval",
2544 "Number of " +
toString(currentTag) +
"s per hour, equally spaced");
2549 "Speed of " +
toString(currentTag) +
"s");
2559 "The id of Rerouter");
2564 "An edge id or a list of edge ids where vehicles shall be rerouted");
2569 "X,Y position in editor (Only used in NETEDIT)",
2575 "Name of " +
toString(currentTag));
2580 "The path to the definition file (alternatively, the intervals may defined as children of the rerouter)");
2585 "The probability for vehicle rerouting (0-1)",
2591 "The waiting time threshold (in s) that must be reached to activate rerouting (default -1 which disables the threshold)",
2597 "The list of vehicle types that shall be affected by this rerouter (empty to affect all types)");
2602 "Whether the router should be inactive initially (and switched on in the gui)",
2636 "allowed vehicles");
2641 "disallowed vehicles");
2657 "allowed vehicles");
2662 "disallowed vehicles");
2701 "Enable or disable visibility for parking area reroutes",
2729 "The id of RouteProbe");
2734 "The id of an edge in the simulation network");
2739 "The frequency in which to report the distribution",
2745 "Name of " +
toString(currentTag));
2750 "The file for generated output");
2755 "The time at which to start generating output",
2766 "Edge in which vaporizer is placed");
2783 "Name of " +
toString(currentTag));
2793 "The id of the TAZ");
2798 "The shape of the TAZ");
2803 "The RGBA color with which the TAZ shall be displayed",
2814 "The id of edge in the simulation network");
2820 "Depart weight associated to this Edge",
2831 "The id of edge in the simulation network");
2837 "Arrival weight associated to this Edget",
2856 "The id of the polygon");
2861 "The shape of the polygon");
2866 "The RGBA color with which the polygon shall be displayed",
2872 "An information whether the polygon shall be filled",
2878 "The default line width for drawing an unfilled polygon",
2884 "The layer in which the polygon lies",
2890 "A typename for the polygon",
2896 "A bitmap to use for rendering this polygon",
2902 "Enable or disable use image file as a relative path",
2908 "Angle of rendered image in degree",
2919 "The id of the POI");
2924 "The position in view");
2929 "The color with which the poi shall be displayed",
2935 "A typename for the poi",
2941 "The layer of the poi for drawing and selecting",
2947 "Width of rendered image in meters",
2953 "Height of rendered image in meters",
2959 "A bitmap to use for rendering this poi",
2965 "Enable or disable use image file as a relative path",
2971 "Angle of rendered image in degree",
2982 "The id of the POI");
2987 "The name of the lane the poi is located at");
2992 "The position on the named lane or in the net in meters at which the poi is located at");
2997 "The lateral offset on the named lane at which the poi is located at",
3003 "The color with which the poi shall be displayed",
3009 "A typename for the poi",
3015 "The layer of the poi for drawing and selecting",
3021 "Width of rendered image in meters",
3027 "Height of rendered image in meters",
3033 "A bitmap to use for rendering this poi",
3039 "Enable or disable use image file as a relative path",
3045 "Angle of rendered image in degree",
3055 std::vector<std::string> vClassesVehicles, vClassesPersons;
3057 for (
const auto& i : vClasses) {
3059 vClassesPersons.push_back(i);
3061 vClassesVehicles.push_back(i);
3081 "The edges the vehicle shall drive along, given as their ids, separated using spaces");
3086 "This route's color",
3098 "The edges the vehicle shall drive along, given as their ids, separated using spaces");
3103 "This route's color",
3115 "The id of VehicleType");
3120 "An abstract vehicle class",
3127 "This vehicle type's color",
3133 "The vehicle's netto-length (length) [m]");
3138 "Empty space after leader [m]");
3143 "The vehicle's maximum velocity [m/s]");
3148 "The vehicles expected multiplicator for lane speed limits");
3153 "The deviation of the speedFactor");
3158 "An abstract emission class");
3164 "How this vehicle is rendered");
3170 "The vehicle's width [m] (only used for drawing)",
3176 "The vehicle's height [m] (only used for drawing)",
3182 "Image file for rendering vehicles of this type (should be grayscale to allow functional coloring)");
3187 "The model used for changing lanes",
3194 "The model used for car following",
3201 "The number of persons (excluding an autonomous driver) the vehicle can transport");
3206 "The number of containers the vehicle can transport");
3211 "The time required by a person to board the vehicle",
3217 "The time required to load a container onto the vehicle",
3223 "The preferred lateral alignment when using the sublane-model",
3230 "The minimum lateral gap at a speed difference of 50km/h when using the sublane-model",
3236 "The maximum lateral speed when using the sublane-model",
3242 "The interval length for which vehicle performs its decision logic (acceleration and lane-changing)",
3248 "The probability when being added to a distribution without an explicit probability",
3254 "Whether vehicles of this type are equipped with a driver (i.e. MSDriverState))",
3260 "3D model file for this class",
3266 "Carriage lengths");
3271 "Locomotive lengths");
3276 "GAP between carriages",
3297 "The id of PersonType");
3302 "An abstract person class",
3309 "This person type's color",
3315 "The person's width [m] (only used for drawing)");
3320 "The person's netto-length (length) [m]");
3325 "Empty space after leader [m]");
3330 "The person's maximum velocity [m/s]");
3335 "This value causes persons to violate a red light if the duration of the red phase is lower than the given threshold.",
3341 "Image file for rendering persons of this type (should be grayscale to allow functional coloring)");
3359 "The name of the " +
toString(currentTag));
3364 "The id of the vehicle type to use for this " +
toString(currentTag),
3370 "The id of the route the " +
toString(currentTag) +
" shall drive along");
3378 "The time step at which the " +
toString(currentTag) +
" shall enter the network",
3389 "The name of the " +
toString(currentTag));
3394 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag),
3400 "The id of the route the " +
toString(currentTag) +
" shall drive along");
3416 "The name of " +
toString(currentTag) +
"s that will be generated using this trip definition");
3421 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag),
3427 "The name of the edge the " +
toString(currentTag) +
" starts at");
3432 "The name of the edge the " +
toString(currentTag) +
" ends at");
3437 "List of intermediate edge ids which shall be part of the " +
toString(currentTag));
3445 "The departure time of the (first) " +
toString(currentTag) +
" which is generated using this " +
toString(currentTag) +
" definition",
3456 "The name of the " +
toString(currentTag));
3461 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag),
3467 "The name of the edge the " +
toString(currentTag) +
" starts at");
3472 "The name of the edge the " +
toString(currentTag) +
" ends at");
3477 "List of intermediate edge ids which shall be part of the " +
toString(currentTag));
3508 "The name of the lane the stop shall be located at");
3513 "The begin position on the lane (the lower position on the lane) in meters");
3518 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
3523 "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",
3537 "BusStop associated with this stop");
3550 "ContainerStop associated with this stop");
3563 "ChargingStation associated with this stop");
3576 "ParkingArea associated with this stop");
3601 "The time step at which the " +
toString(currentTag) +
" shall enter the network",
3624 "The name of the edge the " +
toString(currentTag) +
" starts at");
3629 "The name of the edge the " +
toString(currentTag) +
" ends at");
3634 "List of possible vehicle types to take");
3639 "List of possible traffic modes. Walking is always possible regardless of this value");
3644 "arrival position on the destination edge",
3655 "The name of the edge the " +
toString(currentTag) +
" starts at");
3665 "List of possible vehicle types to take");
3670 "List of possible traffic modes. Walking is always possible regardless of this value");
3680 "The name of the edge the " +
toString(currentTag) +
" starts at");
3685 "The name of the edge the " +
toString(currentTag) +
" ends at");
3690 "list of vehicle alternatives to take for the " +
toString(currentTag),
3696 "arrival position on the destination edge",
3707 "The name of the edge the " +
toString(currentTag) +
" starts at");
3717 "list of vehicle alternatives to take for the ride",
3728 "id of the edges to walk");
3733 "Arrival position on the destination edge",
3745 "The id of the route to walk");
3750 "Arrival position on the destination edge",
3761 "Id of the start edge");
3766 "Id of the destination edge");
3771 "Ids of the intermediate edges");
3777 "Arrival position on the destination edge",
3789 "Id of the start edge");
3812 "The name of the lane the stop shall be located at");
3817 "The begin position on the lane (the lower position on the lane) in meters");
3822 "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
3827 "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",
3841 "BusStop associated with this stop");
3857 "This " +
toString(currentTag) +
"'s color",
3863 "The lane on which the " +
toString(currentTag) +
" shall be inserted",
3869 "The position at which the " +
toString(currentTag) +
" shall enter the net",
3875 "The speed with which the " +
toString(currentTag) +
" shall enter the network",
3881 "The lane at which the " +
toString(currentTag) +
" shall leave the network",
3887 "The position at which the " +
toString(currentTag) +
" shall leave the network",
3893 "The speed with which the " +
toString(currentTag) +
" shall leave the network",
3899 "A string specifying the id of a public transport line which can be used when specifying person rides");
3904 "The number of occupied seats when the " +
toString(currentTag) +
" is inserted",
3910 "The number of occupied container places when the " +
toString(currentTag) +
" is inserted",
3916 "The lateral position on the departure lane at which the " +
toString(currentTag) +
" shall enter the net",
3922 "The lateral position on the arrival lane at which the " +
toString(currentTag) +
" shall arrive",
3935 "First " +
toString(currentTag) +
" departure time",
3941 "End of departure interval",
3947 "probability for emitting a " +
toString(currentTag) +
" each second (not together with vehsPerHour or period)",
3953 "Number of " +
toString(currentTag) +
"s per hour, equally spaced (not together with period or probability)",
3959 "Insert equally spaced " +
toString(currentTag) +
"s at that period (not together with vehsPerHour or probability)",
3965 "probability for emitting a " +
toString(currentTag) +
" each second (not together with vehsPerHour or period)",
3978 "The acceleration ability of vehicles of this type [m/s^2]",
3984 "The deceleration ability of vehicles of this type [m/s^2]",
3990 "The apparent deceleration of the vehicle as used by the standard model [m/s^2]",
3996 "The maximal physically possible deceleration for the vehicle [m/s^2]",
4002 "Car-following model parameter",
4009 "Car-following model parameter",
4015 "SKRAUSSX parameter 1",
4021 "SKRAUSSX parameter 2",
4027 "SKRAUSSX parameter 3",
4033 "SKRAUSSX parameter 4",
4039 "SKRAUSSX parameter 5",
4045 "Peter Wagner 2009 parameter",
4051 "Peter Wagner 2009 parameter",
4069 "Wiedemann parameter",
4075 "Wiedemann parameter",
4081 "MinGap factor parameter",
4094 "Kerner Phi parameter",
4100 "IDM Delta parameter",
4106 "IDM Stepping parameter",
4125 "Minimum distance to pedestrians that are walking towards the conflict point with the ego vehicle.",
4131 "The accumulated waiting time after which a vehicle will drive onto an intersection even though this might cause jamming.",
4137 "This value causes vehicles to violate a yellow light if the duration of the yellow phase is lower than the given threshold.",
4143 "This value causes vehicles to violate a red light if the duration of the red phase is lower than the given threshold.",
4149 "This value causes vehicles affected by jmDriveAfterRedTime to slow down when violating a red light.",
4155 "This value causes vehicles to ignore foe vehicles that have right-of-way with the given probability.",
4161 "This value is used in conjunction with jmIgnoreFoeProb. Only vehicles with a speed below or equal to the given value may be ignored.",
4167 "This value configures driving imperfection (dawdling) while passing a minor link.",
4173 "This value defines the minimum time gap when passing ahead of a prioritized vehicle. ",
4179 "Willingess of drivers to impede vehicles with higher priority",
4192 "The eagerness for performing strategic lane changing. Higher values result in earlier lane-changing.",
4198 "The willingness for performing cooperative lane changing. Lower values result in reduced cooperation.",
4204 "The eagerness for performing lane changing to gain speed. Higher values result in more lane-changing.",
4210 "The eagerness for following the obligation to keep right. Higher values result in earlier lane-changing.",
4216 "The eagerness for using the configured lateral alignment within the lane. Higher values result in increased willingness to sacrifice speed for alignment.",
4222 "The eagerness for overtaking through the opposite-direction lane. Higher values result in more lane-changing.",
4228 "Willingness to encroach laterally on other drivers.",
4234 "Minimum lateral gap when encroaching laterally on other drives (alternative way to define lcPushy)",
4240 "Willingness to accept lower front and rear gaps on the target lane.",
4246 "Dynamic factor for modifying lcAssertive and lcPushy.",
4252 "Time to reach maximum impatience (of 1). Impatience grows whenever a lane-change manoeuvre is blocked.",
4258 "Maximum lateral acceleration per second.",
4264 "Factor for configuring the strategic lookahead distance when a change to the left is necessary (relative to right lookahead).",
4270 "Factor for configuring the treshold asymmetry when changing to the left or to the right for speed gain.",
4276 "Upper bound on lateral speed when standing.",
4282 "Upper bound on lateral speed while moving computed as lcMaxSpeedLatStanding + lcMaxSpeedLatFactor * getSpeed()",
4288 "Distance to an upcoming turn on the vehicles route, below which the alignment should be dynamically adapted to match the turn direction.",
4294 "The probability for violating rules gainst overtaking on the right.",
4315 "The name of the " +
toString(currentTag));
4320 "The id of the " +
toString(currentTag) +
" type to use for this " +
toString(currentTag) +
4326 "This " +
toString(currentTag) +
"'s color",
4332 "The position at which the " +
toString(currentTag) +
" shall enter the net",
4345 "Minimum duration for stopping",
4351 "The time step at which the route continues",
4357 "Where to insert the stop in the vehicle's list of stops",
4363 "Whether a person may end the stop",
4369 "List of persons that must board the vehicle before it may continue");
4374 "Whether a container may end the stop",
4380 "List of containers that must be loaded onto the vehicle before it may continue");
4385 "whether the vehicle stops on the road or beside ",
4391 "Activity displayed for stopped person in GUI and output files ",
4397 "Value used for trips that uses this stop");
4405 std::string& defaultValue, std::string& parsedAttribute, std::string& warningMessage) {
4407 std::string errorFormat;
4410 if (parsedAttribute.empty()) {
4411 errorFormat =
"ID cannot be empty; ";
4415 errorFormat =
"Detector ID contains invalid characters; ";
4420 errorFormat =
"Demand Element ID contains invalid characters; ";
4423 errorFormat =
"ID contains invalid characters; ";
4427 if (attrProperties.
isInt()) {
4428 if (canParse<int>(parsedAttribute)) {
4430 int parsedIntAttribute = parse<int>(parsedAttribute);
4432 if (attrProperties.
isPositive() && (parsedIntAttribute < 0)) {
4433 errorFormat =
"Cannot be negative; ";
4434 }
else if (attrProperties.
cannotBeZero() && (parsedIntAttribute == 0)) {
4435 errorFormat =
"Cannot be zero; ";
4437 }
else if (canParse<double>(parsedAttribute)) {
4438 errorFormat =
"Float cannot be reinterpreted as int; ";
4440 errorFormat =
"Cannot be parsed to int; ";
4444 if (attrProperties.
isFloat()) {
4445 if (canParse<double>(parsedAttribute)) {
4447 double parsedDoubleAttribute = parse<double>(parsedAttribute);
4449 if (attrProperties.
isPositive() && (parsedDoubleAttribute < 0)) {
4450 errorFormat =
"Cannot be negative; ";
4451 }
else if (attrProperties.
cannotBeZero() && (parsedDoubleAttribute == 0)) {
4452 errorFormat =
"Cannot be zero; ";
4455 errorFormat =
"Cannot be parsed to float; ";
4459 if (attrProperties.
isBool()) {
4460 if (!canParse<bool>(parsedAttribute)) {
4461 errorFormat =
"Cannot be parsed to boolean; ";
4467 if (attrProperties.
isList()) {
4469 if (!canParse<PositionVector>(parsedAttribute)) {
4470 errorFormat =
"List of Positions aren't neither x,y nor x,y,z; ";
4472 }
else if (!canParse<Position>(parsedAttribute)) {
4473 errorFormat =
"Position is neither x,y nor x,y,z; ";
4478 if (!canParse<SUMOTime>(parsedAttribute)) {
4479 errorFormat =
"Cannot be parsed to SUMOTime; ";
4484 if (canParse<double>(parsedAttribute)) {
4486 double probability = parse<double>(parsedAttribute);
4487 if (probability < 0) {
4488 errorFormat =
"Probability cannot be smaller than 0; ";
4489 }
else if (probability > 1) {
4490 errorFormat =
"Probability cannot be greather than 1; ";
4493 errorFormat =
"Cannot be parsed to probability; ";
4498 if (canParse<double>(parsedAttribute)) {
4500 double range = parse<double>(parsedAttribute);
4507 errorFormat =
"Cannot be parsed to float; ";
4516 errorFormat =
"value is not within the set of allowed values for attribute '" +
toString(attribute) +
"'";
4520 if (attrProperties.
isColor() && !canParse<RGBColor>(parsedAttribute)) {
4521 errorFormat =
"Invalid RGB format or named color; ";
4526 errorFormat =
"Filename contains invalid characters; ";
4528 errorFormat =
"Filename cannot be empty; ";
4533 errorFormat =
"name contains invalid characters; ";
4538 errorFormat =
"List of VClasses isn't valid; ";
4539 parsedAttribute = defaultValue;
4544 errorFormat =
"RouteProbe ID contains invalid characters; ";
4548 errorFormat =
"List of edges cannot be empty; ";
4552 errorFormat =
"List of lanes cannot be empty; ";
4556 errorFormat =
"List of vTypes contains invalid characters; ";
4560 errorFormat =
"RouteProbe ID contains invalid characters; ";
4563 if (errorFormat.size() > 0) {
4567 warningMessage +
" is invalid; " + errorFormat +
"Default value will be used.");
4572 warningMessage +
" is invalid; " + errorFormat + tagProperties.
getTagStr() +
" cannot be created");
4574 parsedAttribute = defaultValue;
4586 const AttributeProperties& attrProperties, std::string& parsedAttribute, std::string& warningMessage) {
4588 std::string x, y, z;
4589 bool parsedOk =
true;
4591 parsedAttribute =
"0,0";
4593 x = attrs.
get<std::string>(
SUMO_ATTR_X, objectID.c_str(), parsedOk,
false);
4595 if (!canParse<double>(x)) {
4597 warningMessage +
" is invalid; Cannot be parsed to float; " + tagProperties.
getTagStr() +
" cannot be created");
4603 warningMessage +
" is missing; " + tagProperties.
getTagStr() +
" cannot be created");
4608 y = attrs.
get<std::string>(
SUMO_ATTR_Y, objectID.c_str(), parsedOk,
false);
4610 if (!canParse<double>(y)) {
4612 warningMessage +
" is invalid; Cannot be parsed to float; " + tagProperties.
getTagStr() +
" cannot be created");
4618 warningMessage +
" is missing; " + tagProperties.
getTagStr() +
" cannot be created");
4624 z = attrs.
get<std::string>(
SUMO_ATTR_Z, objectID.c_str(), parsedOk,
false);
4626 if (!canParse<double>(z)) {
4628 warningMessage +
" is invalid; Cannot be parsed to float; " + tagProperties.
getTagStr() +
" cannot be created");
4635 parsedAttribute = x +
"," + y;
4637 parsedAttribute = x +
"," + y +
"," + z;