SUMO - Simulation of Urban MObility
GNEAttributeCarrier.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Abstract Base class for gui objects which carry attributes
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
29 
30 #include "GNEAttributeCarrier.h"
31 #include "GNENet.h"
32 
33 
34 // ===========================================================================
35 // static members
36 // ===========================================================================
37 
38 std::map<SumoXMLTag, GNEAttributeCarrier::TagProperties> GNEAttributeCarrier::myTagProperties;
40 
41 const std::string GNEAttributeCarrier::FEATURE_LOADED = "loaded";
42 const std::string GNEAttributeCarrier::FEATURE_GUESSED = "guessed";
43 const std::string GNEAttributeCarrier::FEATURE_MODIFIED = "modified";
44 const std::string GNEAttributeCarrier::FEATURE_APPROVED = "approved";
45 
46 
47 // ===========================================================================
48 // method definitions
49 // ===========================================================================
50 
51 // ---------------------------------------------------------------------------
52 // GNEAttributeCarrier::AttributeProperties - methods
53 // ---------------------------------------------------------------------------
54 
56  myAttributeProperty(ATTRPROPERTY_STRING),
57  myPositionListed(0),
58  myDefinition(""),
59  myDefaultValue(""),
60  myAttrSynonym(SUMO_ATTR_NOTHING),
61  myMinimumRange(0),
62  myMaximumRange(0) {}
63 
64 
65 GNEAttributeCarrier::AttributeProperties::AttributeProperties(int attributeProperty, int positionListed, const std::string& definition, const std::string& defaultValue, const std::vector<std::string>& discreteValues, SumoXMLAttr synonym, double minimum, double maximum) :
66  myAttributeProperty(attributeProperty),
67  myPositionListed(positionListed),
68  myDefinition(definition),
69  myDefaultValue(defaultValue),
70  myDiscreteValues(discreteValues),
71  myAttrSynonym(synonym),
72  myMinimumRange(minimum),
73  myMaximumRange(maximum) {
74 }
75 
76 
78 
79 
80 void
82  // Check that color attributes always owns an default value
83  if (isColor() && myDefaultValue.empty()) {
84  throw FormatException("Color attributes must own always a default color");
85  }
86  // check that secuential attributes correspond to a list
87  if (isSecuential() && !isList()) {
88  throw FormatException("Secuential property only is compatible with list properties");
89  }
90  // check that synonym attribute isn't nothing
92  throw FormatException("synonym attribute cannot be nothing");
93  }
94  // check that ranges are valid
95  if (hasAttrRange()) {
96  if ((myMinimumRange == 0) && (myMaximumRange == 0)) {
97  throw FormatException("non-defined range");
98  } else if ((myMaximumRange - myMinimumRange) <= 0) {
99  throw FormatException("invalid range");
100  }
101  }
102 }
103 
104 
105 int
107  return myPositionListed;
108 }
109 
110 
111 const std::string&
113  return myDefinition;
114 }
115 
116 
117 const std::string&
119  return myDefaultValue;
120 }
121 
122 
123 std::string
125  std::string pre;
126  std::string type;
127  std::string plural;
128  std::string last;
129  // pre type
130  if ((myAttributeProperty & ATTRPROPERTY_LIST) != 0) {
131  pre += "list of ";
133  plural = "es";
134  } else {
135  plural = "s";
136  }
137  }
139  pre += "positive ";
140  }
142  pre += "non editable ";
143  }
145  pre += "discrete ";
146  }
148  pre += "optional ";
149  }
151  pre += "unique ";
152  }
154  pre += "combinable ";
155  }
156  // type
157  if ((myAttributeProperty & ATTRPROPERTY_INT) != 0) {
158  type = "integer";
159  }
161  type = "float";
162  }
163  if ((myAttributeProperty & ATTRPROPERTY_BOOL) != 0) {
164  type = "boolean";
165  }
167  type = "string";
168  }
170  type = "position";
171  }
173  type = "color";
174  }
176  type = "VClass";
177  }
179  type = "filename";
180  }
182  type = "probability";
183  last = "[0, 1]";
184  }
185  if ((myAttributeProperty & ATTRPROPERTY_TIME) != 0) {
186  type = "time";
187  }
189  type = "angle";
190  last = "[0, 360]";
191  }
192  return pre + type + plural + last;
193 }
194 
195 
196 const std::vector<std::string>&
198  return myDiscreteValues;
199 }
200 
201 
204  if (hasAttrSynonym()) {
205  return myAttrSynonym;
206  } else {
207  throw ProcessError("Attr doesn't have synonym");
208  }
209 }
210 
211 
212 double
214  if (hasAttrRange()) {
215  return myMinimumRange;
216  } else {
217  throw ProcessError("Attr doesn't have range");
218  }
219 }
220 
221 
222 double
224  if (hasAttrRange()) {
225  return myMaximumRange;
226  } else {
227  throw ProcessError("Attr doesn't have range");
228  }
229 }
230 
231 
232 bool
235 }
236 
237 
238 bool
241 }
242 
243 bool
245  return (myAttributeProperty & ATTRPROPERTY_RANGE) != 0;
246 }
247 
248 
249 bool
251  return (myAttributeProperty & ATTRPROPERTY_INT) != 0;
252 }
253 
254 
255 bool
257  return (myAttributeProperty & ATTRPROPERTY_FLOAT) != 0;
258 }
259 
260 
261 bool
263  return (myAttributeProperty & ATTRPROPERTY_BOOL) != 0;
264 }
265 
266 
267 bool
270 }
271 
272 
273 bool
276 }
277 
278 
279 bool
282 }
283 
284 
285 bool
288 }
289 
290 
291 bool
293  return (myAttributeProperty & ATTRPROPERTY_TIME) != 0;
294 }
295 
296 
297 bool
300 }
301 
302 
303 bool
306 }
307 
308 
309 bool
311  return (myAttributeProperty & ATTRPROPERTY_COLOR) != 0;
312 }
313 
314 
315 bool
318 }
319 
320 
321 bool
324 }
325 
326 
327 bool
330 }
331 
332 
333 bool
335  return (myAttributeProperty & ATTRPROPERTY_LIST) != 0;
336 }
337 
338 
339 bool
342 }
343 
344 
345 bool
348 }
349 
350 
351 bool
354 }
355 
356 
357 bool
360 }
361 
362 
363 bool
366 }
367 
368 
369 bool
372 }
373 
374 // ---------------------------------------------------------------------------
375 // GNEAttributeCarrier::TagProperties - methods
376 // ---------------------------------------------------------------------------
377 
379  myTag(SUMO_TAG_NOTHING),
380  myTagProperty(0),
381  myIcon(ICON_EMPTY),
382  myPositionListed(0),
383  myParentTag(SUMO_TAG_NOTHING),
384  myTagSynonym(SUMO_TAG_NOTHING) {
385 }
386 
387 
388 GNEAttributeCarrier::TagProperties::TagProperties(SumoXMLTag tag, int tagProperty, int &positionListed, GUIIcon icon, SumoXMLTag parentTag, SumoXMLTag tagSynonym) :
389  myTag(tag),
390  myTagStr(toString(tag)),
391  myTagProperty(tagProperty),
392  myIcon(icon),
393  myPositionListed(positionListed),
394  myParentTag(parentTag),
395  myTagSynonym(tagSynonym) {
396  // Always update list position after setting a new tag value
397  positionListed++;
398 
399 }
400 
401 
403 
404 
405 SumoXMLTag
407  return myTag;
408 }
409 
410 
411 const std::string &
413  return myTagStr;
414 }
415 
416 
417 void
419  // check that element must ist at least netElement, Additional, or shape
420  if (!isNetElement() && !isAdditional() && !isShape() && !isTAZ()) {
421  throw ProcessError("element must be at leas netElement, Additional, or shape");
422  }
423  // check that element only is netElement, Additional, or shape at the same time
424  if ((isNetElement() + isAdditional() + isShape() + isTAZ()) > 1) {
425  throw ProcessError("element only can be netElement, Additional, or shape at the same time");
426  }
427  // If element is drawable, chek that at least one placeover is defined
429  throw ProcessError("If attribute is drawable a PLACEDOVER attribute must be defined");
430  }
431  // if element can mask the start and end position, check that bot attributes exist
433  throw ProcessError("If attribute mask the start and end position, bot attribute has to be defined");
434  }
435  // check that synonym tag isn't nothing
437  throw FormatException("synonym tag cannot be nothing");
438  }
439  // check integrity of all attributes
440  for (auto i : myAttributeProperties) {
441  i.second.checkAttributeIntegrity();
442  // check that if attribute is combinable, own a combination of Allow/disallow attibute
443  if (i.second.isCombinable()) {
444  if((i.first != SUMO_ATTR_ALLOW) && (i.first != SUMO_ATTR_DISALLOW)) {
445  throw ProcessError("Attributes aren't combinables");
446  } else if ((i.first == SUMO_ATTR_ALLOW) && !hasAttribute(SUMO_ATTR_DISALLOW)) {
447  throw ProcessError("allow need a disallow attribute in the same tag");
448  } else if ((i.first == SUMO_ATTR_DISALLOW) && !hasAttribute(SUMO_ATTR_ALLOW)) {
449  throw ProcessError("disallow need an allow attribute in the same tag");
450  }
451  }
452  }
453 }
454 
455 
456 const std::string&
458  if (myAttributeProperties.count(attr) == 0) {
459  throw ProcessError("Attribute '" + toString(attr) + "' not defined");
460  } else if (!myAttributeProperties.at(attr).hasDefaultValue()) {
461  throw ProcessError("attribute '" + toString(attr) + "' doesn't have a default value");
462  } else {
463  return myAttributeProperties.at(attr).getDefaultValue();
464  }
465 }
466 
467 
468 int
470  return myPositionListed;
471 }
472 
473 
474 void
475 GNEAttributeCarrier::TagProperties::addAttribute(SumoXMLAttr attr, int attributeProperty, const std::string& definition, const std::string& defaultValue, std::vector<std::string> discreteValues, SumoXMLAttr synonym) {
476  if (isAttributeDeprecated(attr)) {
477  throw ProcessError("Attribute '" + toString(attr) + "' is deprecated and cannot be inserted");
478  } else if (myAttributeProperties.count(attr) != 0) {
479  throw ProcessError("Attribute '" + toString(attr) + "' already inserted");
480  } else {
481  myAttributeProperties[attr] = AttributeProperties(attributeProperty, (int)myAttributeProperties.size(), definition, defaultValue, discreteValues, synonym);
482  }
483 }
484 
485 
486 void
487 GNEAttributeCarrier::TagProperties::addAttribute(SumoXMLAttr attr, int attributeProperty, const std::string& definition, const std::string& defaultValue, SumoXMLAttr synonym) {
488  if (isAttributeDeprecated(attr)) {
489  throw ProcessError("Attribute '" + toString(attr) + "' is deprecated and cannot be inserted");
490  } else if (myAttributeProperties.count(attr) != 0) {
491  throw ProcessError("Attribute '" + toString(attr) + "' already inserted");
492  } else {
493  myAttributeProperties[attr] = AttributeProperties(attributeProperty, (int)myAttributeProperties.size(), definition, defaultValue, std::vector<std::string>(), synonym);
494  }
495 }
496 
497 
498 void
499 GNEAttributeCarrier::TagProperties::addAttribute(SumoXMLAttr attr, const int attributeProperty, const std::string& definition, const std::string& defaultValue, double minimum, double maximum) {
500  if (isAttributeDeprecated(attr)) {
501  throw ProcessError("Attribute '" + toString(attr) + "' is deprecated and cannot be inserted");
502  } else if (myAttributeProperties.count(attr) != 0) {
503  throw ProcessError("Attribute '" + toString(attr) + "' already inserted");
504  } else {
505  myAttributeProperties[attr] = AttributeProperties(attributeProperty, (int)myAttributeProperties.size(), definition, defaultValue, std::vector<std::string>(), SUMO_ATTR_NOTHING, minimum, maximum);
506  }
507 }
508 
509 
510 void
512  // Check that attribute wasn't already inserted
513  for (auto i : myAttributeProperties) {
514  if (i.first == attr) {
515  throw ProcessError("Attribute '" + toString(attr) + "' is deprecated but was inserted in list of attributes");
516  }
517  }
518  // add it into myDeprecatedAttributes
519  myDeprecatedAttributes.push_back(attr);
520 }
521 
522 
525  if (myAttributeProperties.count(attr) != 0) {
526  return myAttributeProperties.at(attr);
527  } else {
528  // check if we're try to loading an synonym
529  for (auto i : myAttributeProperties) {
530  if (i.second.hasAttrSynonym() && i.second.getAttrSynonym() == attr) {
531  return myAttributeProperties.at(i.first);
532  }
533  }
534  // throw error if these attribute doesn't exist
535  throw ProcessError("Attribute '" + toString(attr) + "' doesn't exist");
536  }
537 }
538 
539 
540 std::map<SumoXMLAttr, GNEAttributeCarrier::AttributeProperties>::const_iterator
542  return myAttributeProperties.begin();
543 }
544 
545 
546 std::map<SumoXMLAttr, GNEAttributeCarrier::AttributeProperties>::const_iterator
548  return myAttributeProperties.end();
549 }
550 
551 
552 int
554  return (int)myAttributeProperties.size();
555 }
556 
557 
558 GUIIcon
560  return myIcon;
561 }
562 
563 
566  if (hasParent()) {
567  return myParentTag;
568  } else {
569  throw ProcessError("Tag doesn't have parent");
570  }
571 }
572 
573 
576  if (hasTagSynonym()) {
577  return myTagSynonym;
578  } else {
579  throw ProcessError("Tag doesn't have synonym");
580  }
581 }
582 
583 
584 bool
586  return (myAttributeProperties.count(attr) == 1);
587 }
588 
589 
590 bool
592  return (myTagProperty & TAGPROPERTY_NETELEMENT) != 0;
593 }
594 
595 
596 bool
598  return (myTagProperty & TAGPROPERTY_ADDITIONAL) != 0;
599 }
600 
601 
602 bool
604  return (myTagProperty & TAGPROPERTY_DRAWABLE) != 0;
605 }
606 
607 
608 bool
610  return (myTagProperty & TAGPROPERTY_SELECTABLE) != 0;
611 }
612 
613 
614 bool
616  return (myTagProperty & TAGPROPERTY_SHAPE) != 0;
617 }
618 
619 
620 bool
622  return (myTagProperty & TAGPROPERTY_TAZ) != 0;
623 }
624 
625 
626 bool
629 }
630 
631 
632 bool
634  return (myTagProperty & TAGPROPERTY_DETECTOR) != 0;
635 }
636 
637 
638 bool
641 }
642 
643 
644 bool
646  return (myTagProperty & TAGPROPERTY_BLOCKSHAPE) != 0;
647 }
648 
649 
650 bool
652  return (myTagProperty & TAGPROPERTY_CLOSESHAPE) != 0;
653 }
654 
655 
656 bool
658  return (myTagProperty & TAGPROPERTY_GEOPOSITION) != 0;
659 }
660 
661 
662 bool
664  return (myTagProperty & TAGPROPERTY_GEOSHAPE) != 0;
665 }
666 
667 
668 bool
670  return (myTagProperty & TAGPROPERTY_PARENT) != 0;
671 }
672 
673 
674 bool
676  return (myTagProperty & TAGPROPERTY_SYNONYM) != 0;
677 }
678 
679 
680 bool
682  return (myTagProperty & TAGPROPERTY_DIALOG) != 0;
683 }
684 
685 
686 bool
689 }
690 
691 
692 bool
694  // note: By default all Tags supports generic parameters, except Tags with "TAGPROPERTY_NOGENERICPARAMETERS"
696 }
697 
698 
699 bool
701  return (myTagProperty & TAGPROPERTY_REPARENT) != 0;
702 }
703 
704 
705 bool
708 }
709 
710 
711 bool
714 }
715 
716 
717 bool
720 }
721 
722 
723 bool
726 }
727 
728 
729 bool
732 }
733 
734 
735 bool
738 }
739 
740 
741 bool
744 }
745 
746 
747 bool
750 }
751 
752 
753 bool
756 }
757 
758 
759 bool
762 }
763 
764 
765 bool
767  return (std::find(myDeprecatedAttributes.begin(), myDeprecatedAttributes.end(), attr) != myDeprecatedAttributes.end());
768 }
769 
770 // ---------------------------------------------------------------------------
771 // GNEAttributeCarrier - methods
772 // ---------------------------------------------------------------------------
773 
776  mySelected(false) {
777 }
778 
779 
780 template<> int
781 GNEAttributeCarrier::parse(const std::string& string) {
782  return StringUtils::toInt(string);
783 }
784 
785 
786 template<> double
787 GNEAttributeCarrier::parse(const std::string& string) {
788  return StringUtils::toDouble(string);
789 }
790 
791 
792 template<> bool
793 GNEAttributeCarrier::parse(const std::string& string) {
794  return StringUtils::toBool(string);
795 }
796 
797 
798 template<> std::string
799 GNEAttributeCarrier::parse(const std::string& string) {
800  return string;
801 }
802 
803 
804 template<> SUMOVehicleClass
805 GNEAttributeCarrier::parse(const std::string& string) {
806  if (string.size() == 0) {
807  throw EmptyData();
808  } else if (!SumoVehicleClassStrings.hasString(string)) {
809  return SVC_IGNORING;
810  } else {
811  return SumoVehicleClassStrings.get(string);
812  }
813 }
814 
815 
816 template<> RGBColor
817 GNEAttributeCarrier::parse(const std::string& string) {
818  return RGBColor::parseColor(string);
819 }
820 
821 
822 template<> Position
823 GNEAttributeCarrier::parse(const std::string& string) {
824  if (string.size() == 0) {
825  throw EmptyData();
826  } else {
827  bool ok = true;
828  PositionVector pos = GeomConvHelper::parseShapeReporting(string, "user-supplied position", 0, ok, false, false);
829  if (!ok || (pos.size() != 1)) {
830  throw NumberFormatException("(Position) " + string);
831  } else {
832  return pos[0];
833  }
834  }
835 }
836 
837 
838 template<> PositionVector
839 GNEAttributeCarrier::parse(const std::string& string) {
840  PositionVector posVector;
841  // empty string are allowed (It means empty position vector)
842  if (string.empty()) {
843  return posVector;
844  } else {
845  bool ok = true;
846  posVector = GeomConvHelper::parseShapeReporting(string, "user-supplied shape", 0, ok, false, true);
847  if (!ok) {
848  throw NumberFormatException("(Position List) " + string);
849  } else {
850  return posVector;
851  }
852  }
853 }
854 
855 
856 template<> SUMOVehicleShape
857 GNEAttributeCarrier::parse(const std::string& string) {
858  if ((string == "unknown") || (!SumoVehicleShapeStrings.hasString(string))) {
859  return SVS_UNKNOWN;
860  } else {
861  return SumoVehicleShapeStrings.get(string);
862  }
863 }
864 
865 
866 template<> std::vector<std::string>
867 GNEAttributeCarrier::parse(const std::string& string) {
868  return StringTokenizer(string, " ").getVector();
869 }
870 
871 
872 template<> std::vector<int>
873 GNEAttributeCarrier::parse(const std::string& string) {
874  std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
875  std::vector<int> parsedIntValues;
876  for (auto i : parsedValues) {
877  parsedIntValues.push_back(parse<int>(i));
878  }
879  return parsedIntValues;
880 }
881 
882 
883 template<> std::vector<double>
884 GNEAttributeCarrier::parse(const std::string& string) {
885  std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
886  std::vector<double> parsedDoubleValues;
887  for (auto i : parsedValues) {
888  parsedDoubleValues.push_back(parse<double>(i));
889  }
890  return parsedDoubleValues;
891 }
892 
893 
894 template<> std::vector<bool>
895 GNEAttributeCarrier::parse(const std::string& string) {
896  std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
897  std::vector<bool> parsedBoolValues;
898  for (auto i : parsedValues) {
899  parsedBoolValues.push_back(parse<bool>(i));
900  }
901  return parsedBoolValues;
902 }
903 
904 
905 template<> std::vector<GNEEdge*>
906 GNEAttributeCarrier::parse(GNENet* net, const std::string& value) {
907  // Declare string vector
908  std::vector<std::string> edgeIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
909  std::vector<GNEEdge*> parsedEdges;
910  // Iterate over edges IDs, retrieve Edges and add it into parsedEdges
911  for (auto i : edgeIds) {
912  GNEEdge* retrievedEdge = net->retrieveEdge(i, false);
913  if (retrievedEdge) {
914  parsedEdges.push_back(net->retrieveEdge(i));
915  } else {
916  throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_EDGES) + ". " + toString(SUMO_TAG_EDGE) + " '" + i + "' doesn't exist.");
917  }
918  }
919  return parsedEdges;
920 }
921 
922 
923 template<> std::vector<GNELane*>
924 GNEAttributeCarrier::parse(GNENet* net, const std::string& value) {
925  // Declare string vector
926  std::vector<std::string> laneIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
927  std::vector<GNELane*> parsedLanes;
928  // Iterate over lanes IDs, retrieve Lanes and add it into parsedLanes
929  for (auto i : laneIds) {
930  GNELane* retrievedLane = net->retrieveLane(i, false);
931  if (retrievedLane) {
932  parsedLanes.push_back(net->retrieveLane(i));
933  } else {
934  throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_LANES) + ". " + toString(SUMO_TAG_LANE) + " '" + i + "' doesn't exist.");
935  }
936  }
937  return parsedLanes;
938 }
939 
940 
941 template<> std::string
942 GNEAttributeCarrier::parseIDs(const std::vector<GNEEdge*>& ACs) {
943  // obtain ID's of edges and return their join
944  std::vector<std::string> edgeIDs;
945  for (auto i : ACs) {
946  edgeIDs.push_back(i->getID());
947  }
948  return joinToString(edgeIDs, " ");
949 }
950 
951 
952 template<> std::string
953 GNEAttributeCarrier::parseIDs(const std::vector<GNELane*>& ACs) {
954  // obtain ID's of lanes and return their join
955  std::vector<std::string> laneIDs;
956  for (auto i : ACs) {
957  laneIDs.push_back(i->getID());
958  }
959  return joinToString(laneIDs, " ");
960 }
961 
962 
963 bool
964 GNEAttributeCarrier::lanesConsecutives(const std::vector<GNELane*>& lanes) {
965  // we need at least two lanes
966  if(lanes.size() > 1) {
967  // now check that lanes are consecutives (not neccesary connected)
968  int currentLane = 0;
969  while (currentLane < ((int)lanes.size() - 1)) {
970  int nextLane = -1;
971  // iterate over outgoing edges of destiny juntion of edge's lane
972  for (int i = 0; (i < (int)lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().size()) && (nextLane == -1); i++) {
973  // iterate over lanes of outgoing edges of destiny juntion of edge's lane
974  for (int j = 0; (j < (int)lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().size()) && (nextLane == -1); j++) {
975  // check if lane correspond to the next lane of "lanes"
976  if(lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().at(j) == lanes.at(currentLane + 1)) {
977  nextLane = currentLane;
978  }
979  }
980  }
981  if(nextLane == -1) {
982  return false;
983  } else {
984  currentLane++;
985  }
986  }
987  return true;
988  } else {
989  return false;
990  }
991 }
992 
993 
994 std::string
996  return getAttribute(key);
997 }
998 
999 /*
1000 SumoXMLTag
1001 GNEAttributeCarrier::getTag() const {
1002  return myTagProperty.getTag();
1003 }
1004 */
1005 
1006 const std::string &
1008  return myTagProperty.getTagStr();
1009 }
1010 
1011 
1014  return myTagProperty;
1015 }
1016 
1017 
1018 FXIcon*
1020  // define on first access
1021  if (myTagProperties.size() == 0) {
1023  }
1025 }
1026 
1027 
1028 const std::string
1030  return getAttribute(SUMO_ATTR_ID);
1031 }
1032 
1033 // ===========================================================================
1034 // static methods
1035 // ===========================================================================
1036 
1039  if(tag == SUMO_TAG_NOTHING) {
1040  return dummyTagProperty;
1041  }
1042  // define on first access
1043  if (myTagProperties.size() == 0) {
1045  }
1046  // check that tag is defined
1047  if (myTagProperties.count(tag) == 0) {
1048  throw ProcessError("Attributes for tag '" + toString(tag) + "' not defined");
1049  } else {
1050  return myTagProperties.at(tag);
1051  }
1052 }
1053 
1054 
1055 std::vector<SumoXMLTag>
1057  std::vector<SumoXMLTag> allTags;
1058  // define on first access
1059  if (myTagProperties.size() == 0) {
1061  }
1062  // fill all tags
1063  for (const auto &i : myTagProperties) {
1064  if (!onlyDrawables || i.second.isDrawable()) {
1065  allTags.push_back(i.first);
1066  }
1067  }
1068  return allTags;
1069 }
1070 
1071 
1072 std::vector<SumoXMLTag>
1073 GNEAttributeCarrier::allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables) {
1074  std::vector<SumoXMLTag> netElementTags;
1075  // define on first access
1076  if (myTagProperties.size() == 0) {
1078  }
1079  switch (tagPropertyCategory) {
1081  // fill netElements tags
1082  for (const auto &i : myTagProperties) {
1083  if (i.second.isNetElement() && (!onlyDrawables || i.second.isDrawable())) {
1084  netElementTags.push_back(i.first);
1085  }
1086  }
1087  break;
1089  // fill additional tags
1090  for (const auto &i : myTagProperties) {
1091  if (i.second.isAdditional() && (!onlyDrawables || i.second.isDrawable())) {
1092  netElementTags.push_back(i.first);
1093  }
1094  }
1095  break;
1096  case TAGPROPERTY_SHAPE:
1097  // fill shape tags
1098  for (const auto &i : myTagProperties) {
1099  if (i.second.isShape() && (!onlyDrawables || i.second.isDrawable())) {
1100  netElementTags.push_back(i.first);
1101  }
1102  }
1103  break;
1104  case TAGPROPERTY_TAZ:
1105  // fill taz tags
1106  for (const auto &i : myTagProperties) {
1107  if (i.second.isTAZ() && (!onlyDrawables || i.second.isDrawable())) {
1108  netElementTags.push_back(i.first);
1109  }
1110  }
1111  break;
1112  default:
1113  throw ProcessError("Category isn't defined");
1114  }
1115  return netElementTags;
1116 }
1117 
1118 
1119 int
1121  int maxNumAttribute = 0;
1122  // define on first access
1123  if (myTagProperties.size() == 0) {
1125  }
1126  // get max num attributes
1127  for (const auto &i : myTagProperties) {
1128  maxNumAttribute = MAX2(maxNumAttribute, i.second.getNumberOfAttributes());
1129  }
1130  return maxNumAttribute;
1131 }
1132 
1133 
1134 bool
1136  // separate value in a vector of string using | as separator
1137  std::vector<std::string> parsedValues;
1138  StringTokenizer stValues(value, "|", true);
1139  while (stValues.hasNext()) {
1140  parsedValues.push_back(stValues.next());
1141  }
1142  // check that parsed values (A=B)can be parsed in generic parameters
1143  for (auto i : parsedValues) {
1144  std::vector<std::string> parsedParameters;
1145  StringTokenizer stParam(i, "=", true);
1146  while (stParam.hasNext()) {
1147  parsedParameters.push_back(stParam.next());
1148  }
1149  // Check that parsed parameters are exactly two
1150  if (parsedParameters.size() == 2) {
1151  // check that key and value contains valid characters
1152  if (!SUMOXMLDefinitions::isValidGenericParameterKey(parsedParameters.front()) || !SUMOXMLDefinitions::isValidGenericParameterValue(parsedParameters.back())) {
1153  return false;
1154  }
1155  } else {
1156  return false;
1157  }
1158  }
1159  // all ok, then return true
1160  return true;
1161 }
1162 
1163 
1164 int
1166  if (settings.drawForSelecting) {
1167  return 8;
1168  } else if (settings.scale >= 10) {
1169  return 32;
1170  } else if (settings.scale >= 2) {
1171  return 16;
1172  } else {
1173  return 8;
1174  }
1175 }
1176 
1177 
1178 void
1180  const OptionsCont& oc = OptionsCont::getOptions();
1181  // obtain Node Types except NODETYPE_DEAD_END_DEPRECATED
1182  std::vector<std::string> nodeTypes = SUMOXMLDefinitions::NodeTypes.getStrings();
1183  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_DEAD_END_DEPRECATED)));
1184  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_DEAD_END)));
1185  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_NOJUNCTION)));
1186  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_INTERNAL)));
1187  // obtain a vector string with the emissions
1188  std::vector<std::string> emissions = { "zero", "LDV", "LDV_G_EU0", "LDV_G_EU1", "LDV_G_EU2", "LDV_G_EU3", "LDV_G_EU4", "LDV_G_EU5",
1189  "LDV_G_EU6", "LDV_G_East", "LDV_D_EU0", "LDV_D_EU1", "LDV_D_EU2", "LDV_D_EU3", "LDV_D_EU4", "LDV_D_EU5", "LDV_D_EU6",
1190  "PC", "PC_Alternative", "PC_G_EU0", "PC_G_EU1", "PC_G_EU2", "PC_G_EU3", "PC_G_EU4", "PC_G_EU5", "PC_G_EU6", "PC_G_East",
1191  "PC_D_EU0", "PC_D_EU1", "PC_D_EU2", "PC_D_EU3", "PC_D_EU4", "PC_D_EU5", "PC_D_EU6", "Bus", "Coach", "HDV", "HDV_G", "HDV_D_EU0",
1192  "HDV_D_EU1", "HDV_D_EU2", "HDV_D_EU3", "HDV_D_EU4", "HDV_D_EU5", "HDV_D_EU6", "HDV_D_East"
1193  };
1194  // declare integers for list position. It will be updated after every TagProperties(...) call
1195  int netElement = 0;
1196  int additional = 0;
1197  int shape = 0;
1198  int taz = 0;
1199  // fill all ACs
1200  SumoXMLTag currentTag = SUMO_TAG_EDGE;
1201  {
1202  // set values of tag
1204  // set values of attributes
1205  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1207  "The id of the edge",
1208  "");
1209  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FROM,
1211  "The name of a node within the nodes-file the edge shall start at",
1212  "");
1213  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TO,
1215  "The name of a node within the nodes-file the edge shall end at",
1216  "");
1217  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED,
1219  "The maximum speed allowed on the edge in m/s",
1220  toString(oc.getFloat("default.speed")));
1221  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PRIORITY,
1223  "The priority of the edge",
1224  toString(oc.getInt("default.priority")));
1225  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NUMLANES,
1227  "The number of lanes of the edge",
1228  toString(oc.getInt("default.lanenumber")));
1229  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE,
1231  "The name of a type within the SUMO edge type file",
1232  "");
1233  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW,
1235  "Explicitly allows the given vehicle classes (not given will be not allowed)",
1236  "all",
1237  SumoVehicleClassStrings.getStrings());
1238  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW,
1240  "Explicitly disallows the given vehicle classes (not given will be allowed)",
1241  "",
1242  SumoVehicleClassStrings.getStrings());
1243  //myTagProperties[currentTag].addAttribute(SUMO_ATTR_PREFER, );
1244  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE,
1246  "If the shape is given it should start and end with the positions of the from-node and to-node",
1247  "");
1248  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH,
1250  "The length of the edge in meter",
1251  "");
1252  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPREADTYPE,
1254  "Lane width for all lanes of this edge in meters (used for visualization)",
1255  "right",
1257  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1259  "street name (need not be unique, used for visualization)",
1260  "");
1261  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
1263  "Lane width for all lanes of this edge in meters (used for visualization)",
1264  "-1");
1265  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDOFFSET,
1267  "Move the stop line back from the intersection by the given amount",
1268  "0");
1269  myTagProperties[currentTag].addAttribute(GNE_ATTR_SHAPE_START,
1270  ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUE, // virtual attribute used to define an endPoint
1271  "Custom position in which shape start (by default position of junction from)",
1272  "");
1273  myTagProperties[currentTag].addAttribute(GNE_ATTR_SHAPE_END,
1274  ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUE, // virtual attribute from to define an endPoint
1275  "Custom position in which shape end (by default position of junction from)",
1276  "");
1277  myTagProperties[currentTag].addAttribute(GNE_ATTR_BIDIR,
1278  ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUE | ATTRPROPERTY_NONEDITABLE, // virtual attribute to check of this edge is part of a bidirectional railway (cannot be edited)
1279  "Show if edge is bidireccional",
1280  "0");
1281  }
1282  currentTag = SUMO_TAG_JUNCTION;
1283  {
1284  // set values of tag
1286  // set values of attributes
1287  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1289  "The id of the node",
1290  "");
1291  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1292  ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
1293  "The x-y-z position of the node on the plane in meters",
1294  "");
1295  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE,
1297  "An optional type for the node",
1298  "",
1299  nodeTypes);
1300  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE,
1302  "A custom shape for that node",
1303  "");
1304  myTagProperties[currentTag].addAttribute(SUMO_ATTR_RADIUS,
1306  "Optional turning radius (for all corners) for that node in meters",
1307  "1.5");
1308  myTagProperties[currentTag].addAttribute(SUMO_ATTR_KEEP_CLEAR,
1310  "Whether the junction-blocking-heuristic should be activated at this node",
1311  "1");
1312  myTagProperties[currentTag].addAttribute(SUMO_ATTR_RIGHT_OF_WAY,
1314  "How to compute right of way rules at this node",
1317  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLTYPE,
1319  "An optional type for the traffic light algorithm",
1320  "",
1322  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLID,
1324  "An optional id for the traffic light program",
1325  "");
1326  }
1327  currentTag = SUMO_TAG_LANE;
1328  {
1329  // set values of tag
1331  // set values of attributes
1332  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1334  "ID of lane (Automatic, non editable)",
1335  "");
1336  myTagProperties[currentTag].addAttribute(SUMO_ATTR_INDEX,
1338  "The enumeration index of the lane (0 is the rightmost lane, <NUMBER_LANES>-1 is the leftmost one)",
1339  "");
1340  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED,
1342  "Speed in meters per second",
1343  "13.89");
1344  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW,
1346  "Explicitly allows the given vehicle classes (not given will be not allowed)",
1347  "all",
1348  SumoVehicleClassStrings.getStrings());
1349  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW,
1351  "Explicitly disallows the given vehicle classes (not given will be allowed)",
1352  "",
1353  SumoVehicleClassStrings.getStrings());
1354  //myTagProperties[currentTag].addAttribute(SUMO_ATTR_PREFER, );
1355  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
1357  "Width in meters (used for visualization)",
1358  "-1");
1359  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDOFFSET,
1361  "Move the stop line back from the intersection by the given amount",
1362  "0");
1363  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ACCELERATION,
1365  "Enable or disable lane as acceleration lane",
1366  "0");
1367  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CUSTOMSHAPE,
1369  "If the shape is given it overrides the computation based on edge shape",
1370  "");
1371  }
1372  currentTag = SUMO_TAG_CROSSING;
1373  {
1374  // set values of tag
1376  // set values of attributes
1377  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1379  "The ID of Crossing",
1380  "");
1381  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGES,
1383  "The (road) edges which are crossed",
1384  "");
1385  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PRIORITY,
1387  "Whether the pedestrians have priority over the vehicles (automatically set to true at tls-controlled intersections)",
1388  "0");
1389  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
1391  "The width of the crossings",
1392  toString(OptionsCont::getOptions().getFloat("default.crossing-width")));
1393  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLLINKINDEX,
1395  "sets the tls-index for this crossing",
1396  "-1");
1397  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLLINKINDEX2,
1399  "sets the opposite-direction tls-index for this crossing",
1400  "-1");
1401  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CUSTOMSHAPE,
1403  "Overrids default shape of pedestrian crossing",
1404  "");
1405  }
1406  currentTag = SUMO_TAG_CONNECTION;
1407  {
1408  // set values of tag
1410  // set values of attributes
1411  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FROM,
1413  "The name of the edge the vehicles leave",
1414  "");
1415  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TO,
1417  "The name of the edge the vehicles may reach when leaving 'from'",
1418  "");
1419  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FROM_LANE,
1421  "the lane index of the incoming lane (numbers starting with 0)",
1422  "");
1423  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TO_LANE,
1425  "the lane index of the outgoing lane (numbers starting with 0)",
1426  "");
1427  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PASS,
1429  "if set, vehicles which pass this (lane-2-lane) connection) will not wait",
1430  "0");
1431  myTagProperties[currentTag].addAttribute(SUMO_ATTR_KEEP_CLEAR,
1433  "if set to false, vehicles which pass this (lane-2-lane) connection) will not worry about blocking the intersection",
1434  "0");
1435  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CONTPOS,
1437  "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",
1439  myTagProperties[currentTag].addAttribute(SUMO_ATTR_UNCONTROLLED,
1441  "If set to true, This connection will not be TLS-controlled despite its node being controlled",
1442  "0");
1443  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VISIBILITY_DISTANCE,
1445  "",
1447  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TLLINKINDEX,
1449  "sets the distance to the connection at which all relevant foes are visible",
1450  "-1");
1451  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED,
1453  "sets custom speed limit for the connection",
1455  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CUSTOMSHAPE,
1457  "sets custom shape for the connection",
1458  "");
1459  }
1460  currentTag = SUMO_TAG_BUS_STOP;
1461  {
1462  // set values of tag
1464  // set values of attributes
1465  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1467  "The id of bus stop",
1468  "");
1469  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1471  "The name of the lane the bus stop shall be located at",
1472  "");
1473  myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS,
1475  "The begin position on the lane (the lower position on the lane) in meters",
1476  "");
1477  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS,
1479  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m",
1480  "");
1481  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1483  "Name of " + toString(currentTag),
1484  "");
1485  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1487  "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",
1488  "0");
1489  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINES,
1491  "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes",
1492  "");
1493  }
1494  currentTag = SUMO_TAG_ACCESS;
1495  {
1496  // set values of tag
1498  // set values of attributes
1499  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1501  "The name of the lane the stop access shall be located at",
1502  "");
1503  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1505  "The position on the lane (the lower position on the lane) in meters",
1506  "0");
1507  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH,
1509  "The walking length of the access in meters",
1510  "");
1511  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1513  "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",
1514  "0");
1515  }
1516  currentTag = SUMO_TAG_CONTAINER_STOP;
1517  {
1518  // set values of tag
1520  // set values of attributes
1521  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1523  "The id of container stop",
1524  "");
1525  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1527  "The name of the lane the container stop shall be located at",
1528  "");
1529  myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS,
1531  "The begin position on the lane (the lower position on the lane) in meters",
1532  "");
1533  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS,
1535  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m",
1536  "");
1537  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1539  "Name of " + toString(currentTag),
1540  "");
1541  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1543  "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",
1544  "0");
1545  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINES,
1547  "meant to be the names of the bus lines that stop at this container stop. This is only used for visualization purposes",
1548  "");
1549  }
1550  currentTag = SUMO_TAG_CHARGING_STATION;
1551  {
1552  // set values of tag
1554  // set values of attributes
1555  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1557  "The id of charging station",
1558  "");
1559  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1561  "Lane of the charging station location",
1562  "");
1563  myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS,
1565  "Begin position in the specified lane",
1566  "");
1567  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS,
1569  "End position in the specified lane",
1570  "");
1571  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1573  "Name of " + toString(currentTag),
1574  "");
1575  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1577  "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",
1578  "0");
1579  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CHARGINGPOWER,
1581  "Charging power in W",
1582  "22000.00");
1583  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EFFICIENCY,
1585  "Charging efficiency [0,1]",
1586  "0.95",
1587  0, 1);
1588  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CHARGEINTRANSIT,
1590  "Enable or disable charge in transit, i.e. vehicle must or must not to stop for charging",
1591  "0");
1592  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CHARGEDELAY,
1594  "Time delay after the vehicles has reached / stopped on the charging station, before the energy transfer (charging) begins",
1595  "0.00");
1596  }
1597  currentTag = SUMO_TAG_PARKING_AREA;
1598  {
1599  // set values of tag
1601  // set values of attributes
1602  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1604  "The id of ParkingArea",
1605  "");
1606  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1608  "The name of the lane the Parking Area shall be located at",
1609  "");
1610  myTagProperties[currentTag].addAttribute(SUMO_ATTR_STARTPOS,
1612  "The begin position on the lane (the lower position on the lane) in meters",
1613  "");
1614  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS,
1616  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m",
1617  "");
1618  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1620  "Name of " + toString(currentTag),
1621  "");
1622  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROADSIDE_CAPACITY,
1624  " The number of parking spaces for road-side parking ",
1625  "0");
1626  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ONROAD,
1628  "If set, vehicles will park on the road lane and thereby reducing capacity",
1629  "0");
1630  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1632  "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",
1633  "0");
1634  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
1636  "The width of the road-side parking spaces",
1637  "3.20");
1638  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH,
1640  "The length of the road-side parking spaces. By default (endPos - startPos) / roadsideCapacity",
1641  "");
1642  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE,
1644  "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
1645  "0.00");
1646  }
1647  currentTag = SUMO_TAG_PARKING_SPACE;
1648  {
1649  // set values of tag
1651  // set values of attributes
1652  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1653  ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
1654  "The x-y-z position of the parking vehicle on the plane",
1655  "");
1656  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
1658  "The width of the road-side parking spaces",
1659  "3.20");
1660  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH,
1662  "The length of the road-side parking spaces",
1663  "5.00");
1664  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE,
1666  "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
1667  "0.00");
1668  }
1669  currentTag = SUMO_TAG_E1DETECTOR;
1670  {
1671  // set values of tag
1673  // set values of attributes
1674  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1676  "The id of E1",
1677  "");
1678  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1680  "The id of the lane the detector shall be laid on. The lane must be a part of the network used",
1681  "");
1682  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1684  "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",
1685  "");
1686  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY,
1688  "The aggregation period the values the detector collects shall be summed up",
1689  "900.00");
1690  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1692  "Name of " + toString(currentTag),
1693  "");
1694  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE,
1696  "The path to the output file",
1697  "");
1698  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES,
1700  "Space separated list of vehicle type ids to consider",
1701  "");
1702  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1704  "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",
1705  "0");
1706  }
1707  currentTag = SUMO_TAG_E2DETECTOR;
1708  {
1709  // set values of tag
1711  // set "file" as deprecated attribute
1712  myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_CONT);
1713  // set values of attributes
1714  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1716  "The id of E2",
1717  "");
1718  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1720  "The id of the lane the detector shall be laid on. The lane must be a part of the network used",
1721  "");
1722  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1724  "The position on the lane the detector shall be laid on in meters",
1725  "");
1726  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH,
1728  "The length of the detector in meters",
1729  "10.00");
1730  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY,
1732  "The aggregation period the values the detector collects shall be summed up",
1733  "900.00");
1734  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1736  "Name of " + toString(currentTag),
1737  "");
1738  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE,
1740  "The path to the output file",
1741  "");
1742  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES,
1744  "Space separated list of vehicle type ids to consider",
1745  "");
1746  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD,
1748  "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
1749  "1.00");
1750  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_SPEED_THRESHOLD,
1752  "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
1753  "1.39");
1754  myTagProperties[currentTag].addAttribute(SUMO_ATTR_JAM_DIST_THRESHOLD,
1756  "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
1757  "10.00");
1758  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1760  "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",
1761  "0");
1762  }
1763  currentTag = SUMO_TAG_E2DETECTOR_MULTILANE;
1764  {
1765  // set values of tag
1767  // set "file" as deprecated attribute
1768  myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_CONT);
1769  // set values of attributes
1770  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1772  "The id of Multilane E2",
1773  "");
1774  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANES,
1776  "The list of secuencial lane ids in which the detector shall be laid on",
1777  "");
1778  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1780  "The position on the lane the detector shall be laid on in meters",
1781  "");
1782  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ENDPOS,
1784  "The end position on the lane the detector shall be laid on in meters",
1785  "");
1786  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY,
1788  "The aggregation period the values the detector collects shall be summed up",
1789  "900.00");
1790  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1792  "Name of " + toString(currentTag),
1793  "");
1794  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE,
1796  "The path to the output file",
1797  "");
1798  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES,
1800  "Space separated list of vehicle type ids to consider",
1801  "");
1802  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD,
1804  "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
1805  "1.00");
1806  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_SPEED_THRESHOLD,
1808  "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
1809  "1.39");
1810  myTagProperties[currentTag].addAttribute(SUMO_ATTR_JAM_DIST_THRESHOLD,
1812  "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
1813  "10.00");
1814  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1816  "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",
1817  "0");
1818  }
1819  currentTag = SUMO_TAG_E3DETECTOR;
1820  {
1821  // set values of tag
1823  // set values of attributes
1824  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1826  "The id of E3",
1827  "");
1828  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1830  "X-Y position of detector in editor (Only used in NETEDIT)",
1831  "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
1832  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY,
1834  "The aggregation period the values the detector collects shall be summed up",
1835  "900.00");
1836  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1838  "Name of " + toString(currentTag),
1839  "");
1840  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE,
1842  "The path to the output file",
1843  "");
1844  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES,
1846  "Space separated list of vehicle type ids to consider",
1847  "");
1848  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD,
1850  "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting) in s",
1851  "1.00");
1852  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_SPEED_THRESHOLD,
1854  "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
1855  "1.39");
1856  }
1857  currentTag = SUMO_TAG_DET_ENTRY;
1858  {
1859  // set values of tag
1861  // set values of attributes
1862  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1864  "The id of the lane the detector shall be laid on. The lane must be a part of the network used",
1865  "");
1866  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1868  "The position on the lane the detector shall be laid on in meters",
1869  "");
1870  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1872  "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",
1873  "0");
1874  }
1875  currentTag = SUMO_TAG_DET_EXIT;
1876  {
1877  // set values of tag
1879  // set values of attributes
1880  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1882  "The id of the lane the detector shall be laid on. The lane must be a part of the network used",
1883  "");
1884  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1886  "The position on the lane the detector shall be laid on in meters",
1887  "");
1888  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1890  "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",
1891  "0");
1892  }
1893  currentTag = SUMO_TAG_INSTANT_INDUCTION_LOOP;
1894  {
1895  // set values of tag
1897  // set values of attributes
1898  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1900  "The id of Instant Induction Loop (E1Instant)",
1901  "");
1902  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
1904  "The id of the lane the detector shall be laid on. The lane must be a part of the network used",
1905  "");
1906  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1908  "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",
1909  "");
1910  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1912  "Name of " + toString(currentTag),
1913  "");
1914  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE,
1916  "The path to the output file",
1917  "");
1918  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES,
1920  "Space separated list of vehicle type ids to consider",
1921  "");
1922  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FRIENDLY_POS,
1924  "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",
1925  "0");
1926  }
1927  currentTag = SUMO_TAG_VSS;
1928  {
1929  // set values of tag
1931  // set "file" as deprecated attribute
1932  myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_FILE);
1933  // set values of attributes
1934  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1936  "The id of Variable Speed Signal",
1937  "");
1938  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1940  "X-Y position of detector in editor (Only used in NETEDIT)",
1941  "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
1942  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANES,
1944  "list of lanes of Variable Speed Sign",
1945  "");
1946  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1948  "Name of " + toString(currentTag),
1949  "");
1950  }
1951  currentTag = SUMO_TAG_STEP;
1952  {
1953  // set values of tag
1955  // set values of attributes
1956  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TIME,
1958  "Time",
1959  "");
1960  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED,
1962  "Speed",
1963  "13.89");
1964  }
1965  currentTag = SUMO_TAG_CALIBRATOR;
1966  {
1967  // set values of tag
1969  // set values of attributes
1970  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
1972  "The id of Calibrator",
1973  "");
1974  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE,
1976  "The id of edge in the simulation network",
1977  "");
1978  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
1980  "The position of the calibrator on the specified lane",
1981  "0");
1982  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY,
1984  "The aggregation interval in which to calibrate the flows. default is step-length",
1985  "1.00");
1986  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
1988  "Name of " + toString(currentTag),
1989  "");
1990  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTEPROBE,
1992  "The id of the routeProbe element from which to determine the route distribution for generated vehicles",
1993  "");
1994  myTagProperties[currentTag].addAttribute(SUMO_ATTR_OUTPUT,
1996  "The output file for writing calibrator information or NULL",
1997  "");
1998  }
1999  currentTag = SUMO_TAG_LANECALIBRATOR;
2000  {
2001  // set values of tag
2003  // set values of attributes
2004  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2006  "The id of Calibrator",
2007  "");
2008  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
2010  "The id of lane in the simulation network",
2011  "");
2012  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
2014  "The position of the calibrator on the specified lane",
2015  "0");
2016  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY,
2018  "The aggregation interval in which to calibrate the flows. default is step-length",
2019  "100.00");
2020  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
2022  "Name of " + toString(currentTag),
2023  "");
2024  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTEPROBE,
2026  "The id of the routeProbe element from which to determine the route distribution for generated vehicles",
2027  "");
2028  myTagProperties[currentTag].addAttribute(SUMO_ATTR_OUTPUT,
2030  "The output file for writing calibrator information or NULL",
2031  "");
2032  }
2033  currentTag = SUMO_TAG_FLOW;
2034  {
2035  // set values of tag
2037  // set values of attributes
2038  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE,
2040  "The id of the vehicle type to use for this vehicle",
2042  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTE,
2044  "The id of the route the vehicle shall drive along",
2045  "");
2046  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VEHSPERHOUR,
2048  "Number of vehicles per hour, equally spaced",
2049  "");
2050  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEED,
2052  "Speed of vehicles",
2053  "");
2054  myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR,
2056  "This vehicle's color",
2057  "yellow");
2058  myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN,
2060  "First vehicle departure time",
2061  "0.00");
2062  myTagProperties[currentTag].addAttribute(SUMO_ATTR_END,
2064  "End of departure interval",
2065  "3600.00");
2066  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTLANE,
2068  "The lane on which the vehicle shall be inserted",
2069  "first");
2070  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTPOS,
2072  "The position at which the vehicle shall enter the net",
2073  "base");
2074  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTSPEED,
2076  "The speed with which the vehicle shall enter the network",
2077  "0");
2078  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALLANE,
2080  "The lane at which the vehicle shall leave the network",
2081  "current");
2082  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALPOS,
2084  "The position at which the vehicle shall leave the network",
2085  "max");
2086  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALSPEED,
2088  "The speed with which the vehicle shall leave the network",
2089  "current");
2090  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINE,
2092  "A string specifying the id of a public transport line which can be used when specifying person rides",
2093  "");
2094  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PERSON_NUMBER,
2096  "The number of occupied seats when the vehicle is inserted",
2097  "0");
2098  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CONTAINER_NUMBER,
2100  "The number of occupied container places when the vehicle is inserted",
2101  "0");
2102  myTagProperties[currentTag].addAttribute(SUMO_ATTR_REROUTE,
2104  "Whether the vehicle should be equipped with a rerouting device",
2105  "0");
2106  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DEPARTPOS_LAT,
2108  "The lateral position on the departure lane at which the vehicle shall enter the net",
2109  "center",
2111  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ARRIVALPOS_LAT,
2113  "The lateral position on the arrival lane at which the vehicle shall arrive",
2114  "center",
2116  }
2117  currentTag = SUMO_TAG_ROUTE;
2118  {
2119  // set values of tag
2120  myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL, additional, ICON_ROUTE);
2121  // set values of attributes
2122  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2124  "The id of Route",
2125  "");
2126  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGES,
2128  "The edges the vehicle shall drive along, given as their ids, separated using spaces",
2129  "");
2130  myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR,
2132  "This route's color",
2133  "yellow");
2134  }
2135  currentTag = SUMO_TAG_REROUTER;
2136  {
2137  // set values of tag
2139  // set values of attributes
2140  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2142  "The id of Rerouter",
2143  "");
2144  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGES,
2146  "An edge id or a list of edge ids where vehicles shall be rerouted",
2147  "");
2148  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
2150  "X,Y position in editor (Only used in NETEDIT)",
2151  "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
2152  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
2154  "Name of " + toString(currentTag),
2155  "");
2156  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE,
2158  "The path to the definition file (alternatively, the intervals may defined as children of the rerouter)",
2159  "");
2160  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB,
2162  "The probability for vehicle rerouting (0-1)",
2163  "1.00");
2164  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HALTING_TIME_THRESHOLD,
2166  "The waiting time threshold (in s) that must be reached to activate rerouting (default -1 which disables the threshold)",
2167  "0.00");
2168  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VTYPES,
2170  "The list of vehicle types that shall be affected by this rerouter (empty to affect all types)",
2171  "");
2172  myTagProperties[currentTag].addAttribute(SUMO_ATTR_OFF,
2174  "Whether the router should be inactive initially (and switched on in the gui)",
2175  "0");
2176  }
2177  currentTag = SUMO_TAG_INTERVAL;
2178  {
2179  // set values of tag
2181  // set values of attributes
2182  myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN,
2184  "Begin",
2185  "0");
2186  myTagProperties[currentTag].addAttribute(SUMO_ATTR_END,
2188  "End",
2189  "3600.00");
2190  }
2191  currentTag = SUMO_TAG_CLOSING_REROUTE;
2192  {
2193  // set values of tag
2195  // set values of attributes
2196  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE,
2198  "Edge ID",
2199  "",
2200  SUMO_ATTR_ID);
2201  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW,
2203  "allowed vehicles",
2204  "");
2205  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW,
2207  "disallowed vehicles",
2208  "");
2209  }
2210  currentTag = SUMO_TAG_CLOSING_LANE_REROUTE;
2211  {
2212  // set values of tag
2214  // set values of attributes
2215  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
2217  "Lane ID",
2218  "",
2219  SUMO_ATTR_ID);
2220  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ALLOW,
2222  "allowed vehicles",
2223  "");
2224  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DISALLOW,
2226  "disallowed vehicles",
2227  "");
2228  }
2229  currentTag = SUMO_TAG_DEST_PROB_REROUTE;
2230  {
2231  // set values of tag
2233  // set values of attributes
2234  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE,
2236  "Edge ID",
2237  "",
2238  SUMO_ATTR_ID);
2239  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB,
2241  "SUMO Probability",
2242  "1.00");
2243  }
2244  currentTag = SUMO_TAG_PARKING_ZONE_REROUTE;
2245  {
2246  // set values of tag
2248  // set values of attributes
2249  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PARKING,
2251  "ParkingArea ID",
2252  "",
2253  SUMO_ATTR_ID);
2254  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB,
2256  "SUMO Probability",
2257  "1.00");
2258  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VISIBLE,
2260  "Enable or disable visibility for parking area reroutes",
2261  "1");
2262  }
2263  currentTag = SUMO_TAG_ROUTE_PROB_REROUTE;
2264  {
2265  // set values of tag
2267  // set values of attributes
2268  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ROUTE,
2270  "Route",
2271  "",
2272  SUMO_ATTR_ID);
2273  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PROB,
2275  "SUMO Probability",
2276  "1.00");
2277  }
2278  currentTag = SUMO_TAG_ROUTEPROBE;
2279  {
2280  // set values of tag
2282  // set values of attributes
2283  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2285  "The id of RouteProbe",
2286  "");
2287  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE,
2289  "The id of an edge in the simulation network",
2290  "");
2291  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FREQUENCY,
2293  "The frequency in which to report the distribution",
2294  "3600");
2295  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
2297  "Name of " + toString(currentTag),
2298  "");
2299  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILE,
2301  "The file for generated output",
2302  "");
2303  myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN,
2305  "The time at which to start generating output",
2306  "0");
2307  }
2308  currentTag = SUMO_TAG_VAPORIZER;
2309  {
2310  // set values of tag
2312  // set values of attributes
2313  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2315  "Edge in which vaporizer is placed",
2316  "");
2317  myTagProperties[currentTag].addAttribute(SUMO_ATTR_BEGIN,
2319  "Start Time",
2320  "0");
2321  myTagProperties[currentTag].addAttribute(SUMO_ATTR_END,
2323  "End Time",
2324  "3600.00");
2325  myTagProperties[currentTag].addAttribute(SUMO_ATTR_NAME,
2327  "Name of " + toString(currentTag),
2328  "");
2329  }
2330  currentTag = SUMO_TAG_TAZ;
2331  {
2332  // set values of tag
2334  // set values of attributes
2335  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2337  "The id of the TAZ",
2338  "");
2339  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE,
2341  "The shape of the TAZ",
2342  "");
2343  myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR,
2345  "The RGBA color with which the TAZ shall be displayed",
2346  "red");
2347  }
2348  currentTag = SUMO_TAG_TAZSOURCE;
2349  {
2350  // set values of tag
2352  // set values of attributes
2353  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE,
2355  "The id of edge in the simulation network",
2356  "",
2357  SUMO_ATTR_ID);
2358  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WEIGHT,
2360  "Depart weight associated to this Edge",
2361  "1");
2362  }
2363  currentTag = SUMO_TAG_TAZSINK;
2364  {
2365  // set values of tag
2367  // set values of attributes
2368  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EDGE,
2370  "The id of edge in the simulation network",
2371  "",
2372  SUMO_ATTR_ID);
2373  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WEIGHT,
2375  "Arrival weight associated to this Edget",
2376  "1");
2377  }
2378  currentTag = SUMO_TAG_VTYPE;
2379  {
2380  // set values of tag
2381  myTagProperties[currentTag] = TagProperties(currentTag, TAGPROPERTY_ADDITIONAL | TAGPROPERTY_PARENT, additional, ICON_VTYPE);
2382  // set values of attributes
2383  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2385  "The id of VehicleType",
2386  "");
2387  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ACCEL,
2389  "The acceleration ability of vehicles of this type [m/s^2]",
2390  "2.60");
2391  myTagProperties[currentTag].addAttribute(SUMO_ATTR_DECEL,
2393  "The deceleration ability of vehicles of this type [m/s^2]",
2394  "4.50");
2395  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SIGMA,
2397  "Car-following model parameter",
2398  "0.50",
2399  0, 1);
2400  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TAU,
2402  "Car-following model parameter",
2403  "1.00");
2404  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LENGTH,
2406  "The vehicle's netto-length (length) [m]",
2407  "5.00");
2408  myTagProperties[currentTag].addAttribute(SUMO_ATTR_MINGAP,
2410  "Empty space after leader [m]",
2411  "2.50");
2412  myTagProperties[currentTag].addAttribute(SUMO_ATTR_MAXSPEED,
2414  "The vehicle's maximum velocity [m/s]",
2415  "70.00");
2416  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEEDFACTOR,
2418  "The vehicles expected multiplicator for lane speed limits",
2419  "1.00");
2420  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SPEEDDEV,
2422  "The deviation of the speedFactor",
2423  "0.00");
2424  myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR,
2426  "This vehicle type's color",
2427  "1,1,0");
2428  myTagProperties[currentTag].addAttribute(SUMO_ATTR_VCLASS,
2430  "An abstract vehicle class",
2431  "passenger",
2432  SumoVehicleClassStrings.getStrings());
2433  myTagProperties[currentTag].addAttribute(SUMO_ATTR_EMISSIONCLASS,
2435  "An abstract emission class",
2436  "PC_G_EU4",
2437  emissions);
2438  myTagProperties[currentTag].addAttribute(SUMO_ATTR_GUISHAPE,
2440  "How this vehicle is rendered",
2441  "",
2442  SumoVehicleShapeStrings.getStrings());
2443  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
2445  "The vehicle's width [m] (only used for drawing)",
2446  "2.00");
2447  myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE,
2449  "Image file for rendering vehicles of this type (should be grayscale to allow functional coloring)",
2450  "");
2451  myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMPATIENCE,
2453  "Willingess of drivers to impede vehicles with higher priority",
2454  "0.00");
2455  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE_CHANGE_MODEL,
2457  "The model used for changing lanes",
2458  "LC2013",
2460  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CAR_FOLLOW_MODEL,
2462  "The model used for car following",
2463  "Krauss",
2465  myTagProperties[currentTag].addAttribute(SUMO_ATTR_PERSON_CAPACITY,
2467  "The number of persons (excluding an autonomous driver) the vehicle can transport",
2468  "4");
2469  myTagProperties[currentTag].addAttribute(SUMO_ATTR_CONTAINER_CAPACITY,
2471  "The number of containers the vehicle can transport",
2472  "0");
2473  myTagProperties[currentTag].addAttribute(SUMO_ATTR_BOARDING_DURATION,
2475  "The time required by a person to board the vehicle",
2476  "0.50");
2477  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LOADING_DURATION,
2479  "The time required to load a container onto the vehicle",
2480  "90.00");
2481  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LATALIGNMENT,
2483  "The preferred lateral alignment when using the sublane-model",
2484  "center",
2486  myTagProperties[currentTag].addAttribute(SUMO_ATTR_MINGAP_LAT,
2488  "The minimum lateral gap at a speed difference of 50km/h when using the sublane-model",
2489  "0.12");
2490  myTagProperties[currentTag].addAttribute(SUMO_ATTR_MAXSPEED_LAT,
2492  "The maximum lateral speed when using the sublane-model",
2493  "1.00");
2494  }
2495  currentTag = SUMO_TAG_POLY;
2496  {
2497  // set values of tag
2499  // set values of attributes
2500  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2502  "The id of the polygon",
2503  "");
2504  myTagProperties[currentTag].addAttribute(SUMO_ATTR_SHAPE,
2506  "The shape of the polygon",
2507  "");
2508  myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR,
2510  "The RGBA color with which the polygon shall be displayed",
2511  "red");
2512  myTagProperties[currentTag].addAttribute(SUMO_ATTR_FILL,
2514  "An information whether the polygon shall be filled",
2515  "0");
2516  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LINEWIDTH,
2518  "The default line width for drawing an unfilled polygon",
2519  "1");
2520  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LAYER,
2522  "The layer in which the polygon lies",
2524  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE,
2526  "A typename for the polygon",
2528  myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE,
2530  "A bitmap to use for rendering this polygon",
2532  myTagProperties[currentTag].addAttribute(SUMO_ATTR_RELATIVEPATH,
2534  "Enable or disable use image file as a relative path",
2536  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE,
2538  "Angle of rendered image in degree",
2540  }
2541  currentTag = SUMO_TAG_POI;
2542  {
2543  // set values of tag
2545  // set values of attributes
2546  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2548  "The id of the POI",
2549  "");
2550  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
2551  ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
2552  "The position in view",
2553  "");
2554  myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR,
2556  "The color with which the poi shall be displayed",
2557  "red");
2558  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE,
2560  "A typename for the poi",
2562  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LAYER,
2564  "The layer of the poi for drawing and selecting",
2566  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
2568  "Width of rendered image in meters",
2570  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HEIGHT,
2572  "Height of rendered image in meters",
2574  myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE,
2576  "A bitmap to use for rendering this poi",
2578  myTagProperties[currentTag].addAttribute(SUMO_ATTR_RELATIVEPATH,
2580  "Enable or disable use image file as a relative path",
2582  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE,
2584  "Angle of rendered image in degree",
2586  }
2587  currentTag = SUMO_TAG_POILANE;
2588  {
2589  // set values of tag
2591  // set values of attributes
2592  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ID,
2594  "The id of the POI",
2595  "");
2596  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LANE,
2598  "The name of the lane the poi is located at",
2599  "");
2600  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION,
2602  "The position on the named lane or in the net in meters at which the poi is located at",
2603  "");
2604  myTagProperties[currentTag].addAttribute(SUMO_ATTR_POSITION_LAT,
2606  "The lateral offset on the named lane at which the poi is located at",
2607  "0.00");
2608  myTagProperties[currentTag].addAttribute(SUMO_ATTR_COLOR,
2610  "The color with which the poi shall be displayed",
2611  "red");
2612  myTagProperties[currentTag].addAttribute(SUMO_ATTR_TYPE,
2614  "A typename for the poi",
2616  myTagProperties[currentTag].addAttribute(SUMO_ATTR_LAYER,
2618  "The layer of the poi for drawing and selecting",
2620  myTagProperties[currentTag].addAttribute(SUMO_ATTR_WIDTH,
2622  "Width of rendered image in meters",
2624  myTagProperties[currentTag].addAttribute(SUMO_ATTR_HEIGHT,
2626  "Height of rendered image in meters",
2628  myTagProperties[currentTag].addAttribute(SUMO_ATTR_IMGFILE,
2630  "A bitmap to use for rendering this poi",
2632  myTagProperties[currentTag].addAttribute(SUMO_ATTR_RELATIVEPATH,
2634  "Enable or disable use image file as a relative path",
2636  myTagProperties[currentTag].addAttribute(SUMO_ATTR_ANGLE,
2638  "Angle of rendered image in degree",
2640  }
2641  // check integrity of all Tags (function checkTagIntegrity() throw an exception if there is an inconsistency)
2642  for (const auto &i : myTagProperties) {
2643  i.second.checkTagIntegrity();
2644  }
2645 }
2646 
2647 /****************************************************************************/
2648 
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
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
lane spread functions
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.
GUIIcon myIcon
icon associated to this Tag
static StringBijection< SumoXMLNodeType > NodeTypes
node types
static RGBColor parseColor(std::string coldef)
Parses a color information.
Definition: RGBColor.cpp:177
a routeprobe detector
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:900
SumoXMLTag getTagSynonym() const
get tag synonym
double scale
information about a lane&#39;s width (temporary, used for a single view)
description of a vehicle type
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)
std::string next()
bool isDrawable() const
return true if tag correspond to a drawable element
static const std::string DEFAULT_IMG_FILE
Definition: Shape.h:48
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...
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
Definition: NBEdge.h:270
a flow definition (used by router)
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:36
const AttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn&#39;t exist)
A calibrator placed over edge.
an e2 detector over multiple lanes (used by Netedit)
static StringBijection< LaneSpreadFunction > LaneSpreadFunctions
lane spread functions
a traffic assignment zone
static const double DEFAULT_LAYER_POI
Definition: Shape.h:46
bool canBePlacedOverLane() const
return true if tag correspond to an element that can be placed over a lane
lane of a reroute of type closing
bool isCombinable() const
return true if atribute is combinable with other Attribute
A layer number.
connectio between two lanes
Stores the information about how to visualize structures.
bool hasMinimumNumberOfChilds() const
return true if tag correspond to an element that only have a limited number of childs ...
Allow/disallow charge in transit in Charging Stations.
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
foe visibility distance of a link
static const double DEFAULT_IMG_HEIGHT
Definition: Shape.h:51
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 int getHigherNumberOfAttributes()
return the number of attributes of the tag with the most highter number of attributes ...
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
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 std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGPROPERTY_NETELEMENT, TAGPROPERTY_ADDITIONAL, etc.)
bool canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
FXIcon * getIcon() const
get FXIcon associated to this AC
T MAX2(T a, T b)
Definition: StdDefs.h:76
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:77
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:47
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) ...
void addAttribute(SumoXMLAttr attr, const int attributeProperty, const std::string &definition, const std::string &defaultValue, std::vector< std::string > discreteValues=std::vector< std::string >(), SumoXMLAttr synonym=SUMO_ATTR_NOTHING)
add attribute (duplicated attributed aren&#39;t allowed)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
begin/end of the description of a Point of interest
bool canWriteChildsSeparate() const
return true if tag correspond to an element that can sort their childs automatic
bool isNetElement() const
return true if tag correspond to a netElement
SumoXMLAttr myAttrSynonym
Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written) ...
A parking space for a single vehicle within a parking area.
static const std::string DEFAULT_TYPE
Definition: Shape.h:43
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
int getPositionListed() const
get position in list (used in frames for listing attributes with certain sort)
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&#39;t editable
begin/end of the description of a route
std::vector< std::string > getStrings() const
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:58
bool isInt() const
return true if atribute is an integer
an e3 entry point
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)
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter ...
static const double UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:264
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
bool canBeReparent() const
return true if tag correspond to an element that can be reparent
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
How to compute right of way.
The turning radius at an intersection in m.
whether an edge is part of a bidirectional railway
bool canBePlacedOverEdge() const
return true if tag correspond to an element that can be placed over an edge
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
the edges of a route
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:49
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)
An instantenous induction loop.
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter ...
int getNumberOfAttributes() const
get number of attributes
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
bool isBool() const
return true if atribute is boolean
std::map< SumoXMLAttr, AttributeProperties >::const_iterator begin() const
get begin of attribute values (used for iterate)
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
bool canAutomaticSortChilds() const
return true if tag correspond to an element that can sort their childs automatic
an e3 exit point
double getMinimumRange() const
get minimum range
A list of positions.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
not defined
bool hasGenericParameters() const
return true if Tag correspond to an element that supports generic parameters
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:267
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 const bool DEFAULT_RELATIVEPATH
Definition: Shape.h:49
static const std::string FEATURE_GUESSED
feature has been reguessed (may still be unchanged be we can&#39;t tell (yet)
bool canBePlacedOverEdges() const
return true if tag correspond to an element that can be placed over a list of edges ...
invalid attribute
bool isUnique() const
return true if atribute is unique
std::map< SumoXMLAttr, AttributeProperties > myAttributeProperties
map with the attribute values vinculated with this Tag
bool canBePlacedOverView() const
return true if tag correspond to an element that can be placed over the view
bool isVClass() const
return true if atribute is a VehicleClass
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
probability of route of a reroute
bool isAdditional() const
return true if tag correspond to an additional
probability of destiny of a reroute
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)...
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
std::vector< std::string > getVector()
reroute of type closing
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
entry for an alternative parking zone
std::map< SumoXMLAttr, AttributeProperties >::const_iterator end() const
get end of attribute values (used for iterate)
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
bool isDiscrete() const
return true if atribute is discrete
trigger: the time of the step
bool canBePlacedOverJunction() const
return true if tag correspond to an element that can be placed over a junction
GNEAttributeCarrier(SumoXMLTag tag)
Constructor.
bool isFloat() const
return true if atribute is a float
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
a sink within a district (connection road)
int myTagProperty
Property of attribute.
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
const std::string & getTagStr() const
get tag assigned to this object in string format
weights: time range end
bool isString() const
return true if atribute is a string
void checkTagIntegrity() const
check Tag integrity (this include all their attributes)
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)
Definition: OptionsCont.h:92
bool hasGEOShape() const
return true if tag correspond to an element that can use a geo shape
static int getCircleResolution(const GUIVisualizationSettings &settings)
function to calculate circle resolution for all circles drawn in drawGL(...) functions ...
crossing between edges for pedestrians
vaporizer of vehicles
bool hasDefaultValue() const
return true if attribute owns a default value
int getPositionListed() const
get position in list (used in frames for listing tags with certain sort)
static const std::string FEATURE_LOADED
an aggreagated-output interval
static const double DEFAULT_IMG_WIDTH
Definition: Shape.h:50
SumoXMLTag getParentTag() const
if Tag owns a parent, return parent tag
A variable speed sign.
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
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
bool isTime() const
return true if atribute is time
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
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
begin/end of the description of a Point of interest over Lane (used by 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
SumoXMLTag myTagSynonym
Tag written in XML (If is SUMO_TAG_NOTHING), original Tag name will be written)
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
Definition: GNENet.cpp:1059
A color information.
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 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.
bool canBePlacedOverLanes() const
return true if tag correspond
Fill the polygon.
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)
Definition: ToString.h:237
vehicles ignoring classes
int myAttributeProperty
Property of attribute.
static const double DEFAULT_ANGLE
Definition: Shape.h:47
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
Definition: Shape.h:44
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