60 myTagPropertyParent(nullptr),
62 myAttributeProperty(ATTRPROPERTY_STRING),
81 if (definition.empty()) {
90 throw FormatException(
"Default value for attribute '" +
toString(attribute) +
"' cannot be static and mutable at the same time");
93 if ((attributeProperty &
ATTRPROPERTY_WRITEXMLOPTIONAL) && !((attributeProperty & ATTRPROPERTY_DEFAULTVALUESTATIC) || (attributeProperty & ATTRPROPERTY_DEFAULTVALUEMUTABLE))) {
94 throw FormatException(
"Attribute '" +
toString(attribute) +
"' requieres a either static or mutable default value");
106 throw FormatException(
"Only int, floats or SUMOTimes can be positive");
110 throw FormatException(
"Secuential property only is compatible with list properties");
132 throw FormatException(
"AttributeProperty doesn't support discrete values values");
189 throw ProcessError(
"Attribute wasn't found in myTagPropertyParent");
224 pre +=
"non editable ";
236 pre +=
"combinable ";
267 type =
"probability";
274 return pre + type + plural + last;
278 const std::vector<std::string>&
536 throw ProcessError(
"element must be at leas netElement, additional, TAZ, shape or demandElement");
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");
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");
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();
590 throw ProcessError(
"Attribute '" + attributeProperty.
getAttrStr() +
"' is deprecated and cannot be inserted");
592 throw ProcessError(
"Maximum number of attributes for tag " + attributeProperty.
getAttrStr() +
" exceeded");
596 if (i.getAttr() == attributeProperty.
getAttr()) {
601 myAttributeProperties.push_back(attributeProperty);
602 myAttributeProperties.back().setTagPropertyParent(
this);
611 if (i.getAttr() == attr) {
612 throw ProcessError(
"Attribute '" +
toString(attr) +
"' is deprecated but was inserted in list of attributes");
624 if ((i.getAttr() == attr) || (i.hasAttrSynonym() && (i.getAttrSynonym() == attr))) {
633 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
639 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
681 if (i.getAttr() == attr) {
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())) {
1241 allowedTags.push_back(i.first);
1248 if (i.second.isAdditional() && (!onlyDrawables || i.second.isDrawable())) {
1249 allowedTags.push_back(i.first);
1256 if (i.second.isShape() && (!onlyDrawables || i.second.isDrawable())) {
1257 allowedTags.push_back(i.first);
1264 if (i.second.isTAZ() && (!onlyDrawables || i.second.isDrawable())) {
1265 allowedTags.push_back(i.first);
1272 if (i.second.isDemandElement() && (!onlyDrawables || i.second.isDrawable())) {
1273 allowedTags.push_back(i.first);
1280 if (i.second.isRoute() && (!onlyDrawables || i.second.isDrawable())) {
1281 allowedTags.push_back(i.first);
1288 if (i.second.isVehicle() && (!onlyDrawables || i.second.isDrawable())) {
1289 allowedTags.push_back(i.first);
1296 if (i.second.isStop() && (!onlyDrawables || i.second.isDrawable())) {
1297 allowedTags.push_back(i.first);
1304 if (i.second.isPerson() && (!onlyDrawables || i.second.isDrawable())) {
1305 allowedTags.push_back(i.first);
1312 if (i.second.isPersonPlan() && (!onlyDrawables || i.second.isDrawable())) {
1313 allowedTags.push_back(i.first);
1320 if (i.second.isPersonTrip() && (!onlyDrawables || i.second.isDrawable())) {
1321 allowedTags.push_back(i.first);
1328 if (i.second.isWalk() && (!onlyDrawables || i.second.isDrawable())) {
1329 allowedTags.push_back(i.first);
1336 if (i.second.isRide() && (!onlyDrawables || i.second.isDrawable())) {
1337 allowedTags.push_back(i.first);
1344 if (i.second.isPersonStop() && (!onlyDrawables || i.second.isDrawable())) {
1345 allowedTags.push_back(i.first);
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;
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
stop placed over a parking area (used in netedit)
static const std::string FEATURE_APPROVED
feature has been approved but not changed (i.e. after being reguessed)
The information about how to spread the lanes from the given position.
const TagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
static StringBijection< RightOfWay > RightOfWayValues
righ of way algorithms
bool isPersonStop() const
return true if tag correspond to a person stop element
bool hasTagSynonym() const
return true if tag correspond to an element that will be written in XML with another tag ...
bool hasAttrRange() const
return true if Attr correspond to an element that only accept a range of values
static const std::string FEATURE_MODIFIED
feature has been manually modified (implies approval)
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
static StringBijection< SumoXMLTag > CarFollowModels
car following models
SumoXMLTag
Numbers representing SUMO-XML - element names.
const std::string & getAttrStr() const
get XML Attribute
GUIIcon myIcon
icon associated to this Tag
static StringBijection< SumoXMLNodeType > NodeTypes
node types
static RGBColor parseColor(std::string coldef)
Parses a color information.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
SumoXMLTag getTagSynonym() const
get tag synonym
description of a vehicle type
bool isVehicle() const
return true if tag correspond to a vehicle element
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
Whether vehicles must keep the junction clear.
whether a given shape is user-defined
a source within a district (connection road)
SumoXMLTag myParentTag
parent tag
bool isExtended() const
return true if atribute is extended
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
bool isDrawable() const
return true if tag correspond to a drawable element
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
static const std::string DEFAULT_IMG_FILE
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed) ...
SumoXMLAttr getAttrSynonym() const
get tag synonym
begin/end of the description of a junction
begin/end of the description of a single lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool isStop() const
return true if tag correspond to a stop element
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
std::vector< AttributeProperties >::const_iterator end() const
get end of attribute values (used for iterate)
GNEAttributeCarrier(const SumoXMLTag tag)
Constructor.
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
a flow definitio nusing a from-to edges instead of a route (used by router)
GUIIcon
An enumeration of icons used by the gui applications.
const AttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
A calibrator placed over edge.
an e2 detector over multiple lanes (used by Netedit)
static StringBijection< LaneSpreadFunction > LaneSpreadFunctions
lane spread functions
bool hasMutableDefaultValue() const
return true if attribute owns a mutable default value
bool isDemandElement() const
return true if tag correspond to a demand element
a traffic assignment zone
static void fillVehicleElements()
fill vehicle elements
static const double DEFAULT_LAYER_POI
lane of a reroute of type closing
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT) ...
bool isCombinable() const
return true if atribute is combinable with other Attribute
bool isPersonPlan() const
return true if tag correspond to a person plan
connectio between two lanes
Allow/disallow charge in transit in Charging Stations.
bool canWriteChildrenSeparate() const
return true if tag correspond to an element that can sort their children automatic ...
std::string myDefaultValue
default value (by default empty)
bool isSelectable() const
return true if tag correspond to a selectable element
struct with the attribute Properties
bool isFilename() const
return true if atribute is a filename
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
static bool checkParsedAttribute(const TagProperties &tagProperties, const AttributeProperties &attrProperties, const SumoXMLAttr attribute, std::string &defaultValue, std::string &parsedAttribute, std::string &warningMessage)
parse and check attribute (note: This function is only to improve legilibility)
foe visibility distance of a link
static const double DEFAULT_IMG_HEIGHT
void addDeprecatedAttribute(SumoXMLAttr attr)
add deprecated Attribute
bool isPositive() const
return true if atribute is positive
static std::string parseIDs(const std::vector< T > &ACs)
parses a list of specific Attribute Carriers into a string of IDs
static void fillStopElements()
fill Stop elements
bool isComplex() const
return true if atribute is complex
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
stop placed over a lane (used in netedit)
void checkAttributeIntegrity()
check Attribute integrity (For example, throw an exception if tag has a Float default value...
weights: time range begin
link,node: the traffic light id responsible for this link
bool isposition() const
return true if atribute is a position
static void fillAdditionals()
fill Additionals
static std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGTYPE_NETELEMENT, TAGTYPE_ADDITIONAL, etc.)
bool canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
static void fillPersonStopElements()
fill PersonStop elements
FXIcon * getIcon() const
get FXIcon associated to this AC
~AttributeProperties()
destructor
A NBNetBuilder extended by visualisation and editing capabilities.
static void fillDemandElements()
fill Demand Elements
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool isNumerical() const
return true if atribute is numerical (int or float)
bool isSecuential() const
return true if atribute is sequential
bool isDetector() const
return true if tag correspond to a shape (Only used to group all detectors in the XML) ...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
begin/end of the description of a Point of interest
bool isNetElement() const
return true if tag correspond to a netElement
const double DEFAULT_VEH_PROB
SumoXMLAttr myAttrSynonym
Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written) ...
bool hasNext()
returns the information whether further substrings exist
A parking space for a single vehicle within a parking area.
static const std::string DEFAULT_TYPE
const std::string DEFAULT_VTYPE_ID
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool cannotBeZero() const
return true if atribute cannot be zero
first coordinate of edge shape
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
bool hasStaticDefaultValue() const
return true if attribute owns a static default value
bool isPersonTrip() const
return true if tag correspond to a person trip
int getPositionListed() const
get position in list (used in frames for listing attributes with certain sort)
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
SumoXMLTag myTag
Sumo XML Tag vinculated wit this tag Property.
bool isProbability() const
return true if atribute is a probability
bool isNonEditable() const
return true if atribute isn't editable
begin/end of the description of a route
std::vector< std::string > getStrings() const
#define WRITE_WARNING(msg)
static OptionsCont & getOptions()
Retrieves the options.
bool isInt() const
return true if atribute is an integer
std::string myAttrStr
string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls) ...
link: the index of the opposite direction link of a pedestrian crossing
bool hasParent() const
return true if tag correspond to an element that can had another element as parent ...
static TagProperties dummyTagProperty
dummy TagProperty used for reference some elements (for Example, dummyEdge)
bool isRide() const
return true if tag correspond to a ride element
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter ...
void setDiscreteValues(const std::vector< std::string > &discreteValues)
set discrete values
static const double UNSPECIFIED_SPEED
unspecified lane speed
int myTagType
Attribute Type.
bool isList() const
return true if atribute is a list
bool isColor() const
return true if atribute is a color
static std::vector< SumoXMLTag > allowedTags(bool onlyDrawables)
get tags of all editable element types
TagProperties()
default constructor
static const size_t MAXNUMBEROFATTRIBUTES
max number of attributes allowed for every tag
bool canBeReparent() const
return true if tag correspond to an element that can be reparent
virtual ~GNEAttributeCarrier()
Destructor.
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
How to compute right of way.
static void fillShapes()
fill Shapes
The turning radius at an intersection in m.
whether an edge is part of a bidirectional railway
double myMaximumRange
maxium Range
stop placed over a charging station (used in netedit)
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
double getMaximumRange() const
get maximum range
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
std::vector< std::string > myDiscreteValues
discrete values that can take this Attribute (by default empty)
Encapsulated SAX-Attributes.
An instantenous induction loop.
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter ...
const TagProperties & getTagPropertyParent() const
get reference to tagProperty parent
int getNumberOfAttributes() const
get number of attributes
static const double INVALID_POSITION
invalid double position
A point in 2D or 3D with translation and scaling methods.
bool isBool() const
return true if atribute is boolean
std::string getDescription() const
return a description of attribute
static void fillAttributeCarriers()
fill Attribute Carriers
static bool lanesConsecutives(const std::vector< GNELane *> &lanes)
check if lanes are consecutives
double getMinimumRange() const
get minimum range
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
bool canBeSortedManually() const
return true if Tag correspond to an element that can be sorted within their parent ...
static bool isValidDetectorID(const std::string &value)
whether the given string is a valid id for an detector
~TagProperties()
destructor
bool hasGenericParameters() const
return true if Tag correspond to an element that supports generic parameters
static bool parseMaskedPositionAttribute(const SUMOSAXAttributes &attrs, const std::string &objectID, const TagProperties &tagProperties, const AttributeProperties &attrProperties, std::string &parsedAttribute, std::string &warningMessage)
parse and check masked (note: This function is only to improve legilibility)
static void fillNetElements()
fill Net Elements
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
std::vector< AttributeProperties >::const_iterator begin() const
get begin of attribute values (used for iterate)
bool isPerson() const
return true if tag correspond to a person element
A calibrator placed over lane (used in netedit)
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
static void fillPersonElements()
fill Person Elements
SumoXMLAttr getAttr() const
get XML Attribute
bool isWriteXMLOptional() const
return true if atribute is write XML optional
static const bool DEFAULT_RELATIVEPATH
bool isRoute() const
return true if tag correspond to a route element
stop placed over a containerStop (used in netedit)
stop placed over a busStop (used in netedit)
static const std::string FEATURE_GUESSED
feature has been reguessed (may still be unchanged be we can't tell (yet)
bool isUnique() const
return true if atribute is unique
SUMOTime string2time(const std::string &r)
bool isVClass() const
return true if atribute is a VehicleClass
void setTagPropertyParent(TagProperties *tagPropertyParent)
set tag property parent
bool isShape() const
return true if tag correspond to a shape
bool isSVCPermission() const
return true if atribute is a VehicleClass
node: the type of traffic light
edge: the shape in xml-definition
bool isEnablitable() const
return true if atribute is enablitable
TagProperties * myTagPropertyParent
pointer to tagProperty parent
probability of route of a reroute
bool isAdditional() const
return true if tag correspond to an additional
probability of destiny of a reroute
bool isPlacedInRTree() const
return true if Tag correspond to an element that has has to be placed in RTREE
const std::string getID() const
function to support debugging
bool isTAZ() const
return true if tag correspond to a TAZ
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
bool isStoppingPlace() const
return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML)...
AttributeProperties()
default constructor
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
bool canMaskXYZPositions() const
return true if tag correspond to an element that can mask the attributes "X", "Y" and "Z" position as...
begin/end of the description of an edge
static StringBijection< TrainType > TrainTypes
train types
static void fillCommonPersonAttributes(SumoXMLTag currentTag)
fill common person attributes (used by person and personFlows)
static void fillLaneChangingModelAttributes(SumoXMLTag currentTag)
fill Junction Model Attributes of Vehicle/Person Types
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
bool canParseVehicleClasses(const std::string &classes)
Checks whether the given string contains only known vehicle classes.
std::vector< std::string > getVector()
return vector of strings
A road/street connecting two junctions (netedit-version)
entry for an alternative parking zone
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
bool isDiscrete() const
return true if atribute is discrete
trigger: the time of the step
bool isFloat() const
return true if atribute is a float
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
double myMinimumRange
minimun Range
static void fillCommonStopAttributes(SumoXMLTag currentTag)
fill stop person attributes (used by stops and personStps)
a sink within a district (connection road)
int myTagProperty
Attribute properties.
static StringBijection< FringeType > FringeTypeValues
fringe types
static void fillCarFollowingModelAttributes(SumoXMLTag currentTag)
fill Car Following Model of Vehicle/Person Types
bool isVehicleType() const
return true if tag correspond to a vehicle type element
std::vector< AttributeProperties > myAttributeProperties
vector with the attribute values vinculated with this Tag
virtual std::string getAttributeForSelection(SumoXMLAttr key) const
method for getting the attribute in the context of object selection
std::string myDefinition
text with a definition of attribute
struct with the attribute Properties
const std::vector< std::string > & getDiscreteValues() const
get discrete values
bool requiereUpdateGeometry() const
return true if atribute requieres a update geometry in setAttribute(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
bool isString() const
return true if atribute is a string
void checkTagIntegrity() const
check Tag integrity (this include all their attributes)
static void fillJunctionModelAttributes(SumoXMLTag currentTag)
fill Junction Model Attributes of Vehicle/Person Types
void setSynonym(const SumoXMLAttr synonym)
set synonim
bool hasAttrSynonym() const
return true if Attr correspond to an element that will be written in XML with another name ...
A storage for options typed value containers)
bool hasGEOShape() const
return true if tag correspond to an element that can use a geo shape
crossing between edges for pedestrians
The abstract direction of a link.
bool isSUMOTime() const
return true if atribute is a SUMOTime
begin/end of the description of a embedded route (used in NETEDIT)
static const std::string FEATURE_LOADED
an aggreagated-output interval
static const double DEFAULT_IMG_WIDTH
SumoXMLTag getParentTag() const
if Tag owns a parent, return parent tag
Eficiency of the charge in Charging Stations.
const std::string & getDefaultValue() const
get default value
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute attr
void addAttribute(const AttributeProperties &attributeProperty)
add attribute (duplicated attributed aren't allowed)
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
link: the index of the link within the traffic light
last coordinate of edge shape
description of a person type (used in NETEDIT)
bool canAutomaticSortChildren() const
return true if tag correspond to an element that can sort their children automatic ...
static void fillCommonVehicleAttributes(SumoXMLTag currentTag)
fill common vehicle attributes (used by vehicles, trips, routeFlows and flows)
a single trip definition (used by router)
bool isWalk() const
return true if tag correspond to a walk element
Delay in the charge of charging stations.
std::vector< SumoXMLAttr > myDeprecatedAttributes
List with the deprecated Attributes.
bool isAttributeDeprecated(SumoXMLAttr attr) const
return true if attribute of this tag is deprecated
const std::string & getDefinition() const
get default value
begin/end of the description of a Point of interest over Lane (used by Netedit)
a flow definition within in Calibrator (used in NETEDIT)
bool canBlockShape() const
return true if tag correspond to an element that can block their shape
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
An access point for a train stop.
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name) ...
SumoXMLTag myTagSynonym
Tag written in XML (If is SUMO_TAG_NOTHING), original Tag name will be written)
static void fillCommonFlowAttributes(SumoXMLTag currentTag)
fill common flow attributes (used by flows, routeFlows and personFlows)
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
void setRange(const double minimum, const double maximum)
set range
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc.)
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
static PositionVector parseShapeReporting(const std::string &shpdef, const std::string &objecttype, const char *objectid, bool &ok, bool allowEmpty, bool report=true)
Builds a PositionVector from a string representation, reporting occurred errors.
static std::map< SumoXMLTag, TagProperties > myTagProperties
map with the tags properties
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
vehicles ignoring classes
bool hasMinimumNumberOfChildren() const
return true if tag correspond to an element that only have a limited number of children ...
int myAttributeProperty
Property of attribute.
static const double DEFAULT_ANGLE
static const std::vector< std::string > & getAllClassesStr()
Get all SUMOEmissionClass in string format.
SumoXMLAttr myAttribute
XML Attribute.
begin/end of the description of a polygon
bool hasGEOPosition() const
return true if tag correspond to an element that can use a geo position
static const double DEFAULT_LAYER
trigger: a step description
std::string myTagStr
Sumo XML Tag vinculated wit this tag Property in String format.
bool isOptional() const
return true if atribute is optional