Eclipse 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-2019 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 // ===========================================================================
22 
30 
31 #include "GNEAttributeCarrier.h"
32 #include "GNENet.h"
33 
34 
35 // ===========================================================================
36 // static members
37 // ===========================================================================
38 
39 std::map<SumoXMLTag, GNEAttributeCarrier::TagProperties> GNEAttributeCarrier::myTagProperties;
41 
42 const std::string GNEAttributeCarrier::FEATURE_LOADED = "loaded";
43 const std::string GNEAttributeCarrier::FEATURE_GUESSED = "guessed";
44 const std::string GNEAttributeCarrier::FEATURE_MODIFIED = "modified";
45 const std::string GNEAttributeCarrier::FEATURE_APPROVED = "approved";
47 const double GNEAttributeCarrier::INVALID_POSITION(-1000000);
48 
49 
50 // ===========================================================================
51 // method definitions
52 // ===========================================================================
53 
54 // ---------------------------------------------------------------------------
55 // GNEAttributeCarrier::AttributeProperties - methods
56 // ---------------------------------------------------------------------------
57 
59  myAttribute(SUMO_ATTR_NOTHING),
60  myTagPropertyParent(nullptr),
61  myAttrStr(toString(SUMO_ATTR_NOTHING)),
62  myAttributeProperty(ATTRPROPERTY_STRING),
63  myDefinition(""),
64  myDefaultValue(""),
65  myAttrSynonym(SUMO_ATTR_NOTHING),
66  myMinimumRange(0),
67  myMaximumRange(0) {}
68 
69 
70 GNEAttributeCarrier::AttributeProperties::AttributeProperties(const SumoXMLAttr attribute, const int attributeProperty, const std::string& definition, std::string defaultValue) :
71  myAttribute(attribute),
72  myTagPropertyParent(nullptr),
73  myAttrStr(toString(attribute)),
74  myAttributeProperty(attributeProperty),
75  myDefinition(definition),
76  myDefaultValue(defaultValue),
77  myAttrSynonym(SUMO_ATTR_NOTHING),
78  myMinimumRange(0),
79  myMaximumRange(0) {
80  // empty definition aren't valid
81  if (definition.empty()) {
82  throw FormatException("Missing definition for AttributeProperty '" + toString(attribute) + "'");
83  }
84  // if default value isn't empty, but attribute doesn't support default values, throw exception.
85  if (!defaultValue.empty() && !(attributeProperty & ATTRPROPERTY_DEFAULTVALUESTATIC)) {
86  throw FormatException("AttributeProperty for '" + toString(attribute) + "' doesn't support default values");
87  }
88  // default value cannot be static and mutables at the same time
89  if ((attributeProperty & ATTRPROPERTY_DEFAULTVALUESTATIC) && (attributeProperty & ATTRPROPERTY_DEFAULTVALUEMUTABLE)) {
90  throw FormatException("Default value for attribute '" + toString(attribute) + "' cannot be static and mutable at the same time");
91  }
92  // Attributes that can write optionally their values in XML must have either a static or a mutable efault value
93  if ((attributeProperty & ATTRPROPERTY_WRITEXMLOPTIONAL) && !((attributeProperty & ATTRPROPERTY_DEFAULTVALUESTATIC) || (attributeProperty & ATTRPROPERTY_DEFAULTVALUEMUTABLE))) {
94  throw FormatException("Attribute '" + toString(attribute) + "' requieres a either static or mutable default value");
95  }
96 }
97 
98 
100 
101 
102 void
104  // check that positive attributes correspond only to a int, floats or SUMOTimes
105  if (isPositive() && !(isInt() || isFloat() || isSUMOTime())) {
106  throw FormatException("Only int, floats or SUMOTimes can be positive");
107  }
108  // check that secuential attributes correspond to a list
109  if (isSecuential() && !isList()) {
110  throw FormatException("Secuential property only is compatible with list properties");
111  }
112  // check that synonym attribute isn't nothing
113  if (hasAttrSynonym() && (myAttrSynonym == SUMO_ATTR_NOTHING)) {
114  throw FormatException("synonym attribute cannot be nothing");
115  }
116  // check that ranges are valid
117  if (hasAttrRange()) {
118  if ((myMinimumRange == 0) && (myMaximumRange == 0)) {
119  throw FormatException("non-defined range");
120  } else if ((myMaximumRange - myMinimumRange) <= 0) {
121  throw FormatException("invalid range");
122  }
123  }
124 }
125 
126 
127 void
128 GNEAttributeCarrier::AttributeProperties::setDiscreteValues(const std::vector<std::string>& discreteValues) {
129  if (isDiscrete()) {
130  myDiscreteValues = discreteValues;
131  } else {
132  throw FormatException("AttributeProperty doesn't support discrete values values");
133  }
134 }
135 
136 
137 void
139  if (hasAttrSynonym()) {
140  myAttrSynonym = synonym;
141  } else {
142  throw FormatException("AttributeProperty doesn't support synonyms");
143  }
144 }
145 
146 
147 void
148 GNEAttributeCarrier::AttributeProperties::setRange(const double minimum, const double maximum) {
149  if (hasAttrRange()) {
150  myMinimumRange = minimum;
151  myMaximumRange = maximum;
152  } else {
153  throw FormatException("AttributeProperty doesn't support ranges");
154  }
155 }
156 
157 
158 void
160  myTagPropertyParent = tagPropertyParent;
161 }
162 
163 
166  return myAttribute;
167 }
168 
169 
170 const std::string&
172  return myAttrStr;
173 }
174 
175 
178  return *myTagPropertyParent;
179 }
180 
181 
182 int
184  for (auto i = myTagPropertyParent->begin(); i != myTagPropertyParent->end(); i++) {
185  if (i->getAttr() == myAttribute) {
186  return (int)(i - myTagPropertyParent->begin());
187  }
188  }
189  throw ProcessError("Attribute wasn't found in myTagPropertyParent");
190 }
191 
192 
193 const std::string&
195  return myDefinition;
196 }
197 
198 
199 const std::string&
201  return myDefaultValue;
202 }
203 
204 
205 std::string
207  std::string pre;
208  std::string type;
209  std::string plural;
210  std::string last;
211  // pre type
212  if ((myAttributeProperty & ATTRPROPERTY_LIST) != 0) {
213  pre += "list of ";
214  if ((myAttributeProperty & ATTRPROPERTY_VCLASS) != 0) {
215  plural = "es";
216  } else {
217  plural = "s";
218  }
219  }
220  if ((myAttributeProperty & ATTRPROPERTY_POSITIVE) != 0) {
221  pre += "positive ";
222  }
223  if ((myAttributeProperty & ATTRPROPERTY_NONEDITABLE) != 0) {
224  pre += "non editable ";
225  }
226  if ((myAttributeProperty & ATTRPROPERTY_DISCRETE) != 0) {
227  pre += "discrete ";
228  }
229  if ((myAttributeProperty & ATTRPROPERTY_WRITEXMLOPTIONAL) != 0) {
230  pre += "optional ";
231  }
232  if ((myAttributeProperty & ATTRPROPERTY_UNIQUE) != 0) {
233  pre += "unique ";
234  }
235  if ((myAttributeProperty & ATTRPROPERTY_COMBINABLE) != 0) {
236  pre += "combinable ";
237  }
238  // type
239  if ((myAttributeProperty & ATTRPROPERTY_INT) != 0) {
240  type = "integer";
241  }
242  if ((myAttributeProperty & ATTRPROPERTY_FLOAT) != 0) {
243  type = "float";
244  }
245  if ((myAttributeProperty & ATTRPROPERTY_SUMOTIME) != 0) {
246  type = "SUMOTime";
247  }
248  if ((myAttributeProperty & ATTRPROPERTY_BOOL) != 0) {
249  type = "boolean";
250  }
251  if ((myAttributeProperty & ATTRPROPERTY_STRING) != 0) {
252  type = "string";
253  }
254  if ((myAttributeProperty & ATTRPROPERTY_POSITION) != 0) {
255  type = "position";
256  }
257  if ((myAttributeProperty & ATTRPROPERTY_COLOR) != 0) {
258  type = "color";
259  }
260  if ((myAttributeProperty & ATTRPROPERTY_VCLASS) != 0) {
261  type = "VClass";
262  }
263  if ((myAttributeProperty & ATTRPROPERTY_FILENAME) != 0) {
264  type = "filename";
265  }
266  if ((myAttributeProperty & ATTRPROPERTY_PROBABILITY) != 0) {
267  type = "probability";
268  last = "[0, 1]";
269  }
270  if ((myAttributeProperty & ATTRPROPERTY_ANGLE) != 0) {
271  type = "angle";
272  last = "[0, 360]";
273  }
274  return pre + type + plural + last;
275 }
276 
277 
278 const std::vector<std::string>&
280  return myDiscreteValues;
281 }
282 
283 
286  if (hasAttrSynonym()) {
287  return myAttrSynonym;
288  } else {
289  throw ProcessError("Attr doesn't support synonym");
290  }
291 }
292 
293 
294 double
296  if (hasAttrRange()) {
297  return myMinimumRange;
298  } else {
299  throw ProcessError("Attr doesn't support range");
300  }
301 }
302 
303 
304 double
306  if (hasAttrRange()) {
307  return myMaximumRange;
308  } else {
309  throw ProcessError("Attr doesn't support range");
310  }
311 }
312 
313 
314 bool
316  return (myAttributeProperty & ATTRPROPERTY_DEFAULTVALUESTATIC) != 0;
317 }
318 
319 
320 bool
322  return (myAttributeProperty & ATTRPROPERTY_DEFAULTVALUEMUTABLE) != 0;
323 }
324 
325 
326 bool
328  return (myAttributeProperty & ATTRPROPERTY_SYNONYM) != 0;
329 }
330 
331 bool
333  return (myAttributeProperty & ATTRPROPERTY_RANGE) != 0;
334 }
335 
336 
337 bool
339  return (myAttributeProperty & ATTRPROPERTY_INT) != 0;
340 }
341 
342 
343 bool
345  return (myAttributeProperty & ATTRPROPERTY_FLOAT) != 0;
346 }
347 
348 
349 bool
351  return (myAttributeProperty & ATTRPROPERTY_SUMOTIME) != 0;
352 }
353 
354 
355 bool
357  return (myAttributeProperty & ATTRPROPERTY_BOOL) != 0;
358 }
359 
360 
361 bool
363  return (myAttributeProperty & ATTRPROPERTY_STRING) != 0;
364 }
365 
366 
367 bool
369  return (myAttributeProperty & ATTRPROPERTY_POSITION) != 0;
370 }
371 
372 
373 bool
375  return (myAttributeProperty & ATTRPROPERTY_PROBABILITY) != 0;
376 }
377 
378 
379 bool
381  return (myAttributeProperty & (ATTRPROPERTY_INT | ATTRPROPERTY_FLOAT | ATTRPROPERTY_SUMOTIME)) != 0;
382 }
383 
384 
385 bool
387  return (myAttributeProperty & ATTRPROPERTY_POSITIVE) != 0;
388 }
389 
390 
391 bool
393  return (myAttributeProperty & ATTRPROPERTY_NOTZERO) != 0;
394 }
395 
396 
397 bool
399  return (myAttributeProperty & ATTRPROPERTY_COLOR) != 0;
400 }
401 
402 
403 bool
405  return (myAttributeProperty & ATTRPROPERTY_FILENAME) != 0;
406 }
407 
408 
409 bool
411  return (myAttributeProperty & ATTRPROPERTY_VCLASS) != 0;
412 }
413 
414 
415 bool
417  return ((myAttributeProperty & ATTRPROPERTY_LIST) != 0) && ((myAttributeProperty & ATTRPROPERTY_VCLASS) != 0);
418 }
419 
420 
421 bool
423  return (myAttributeProperty & ATTRPROPERTY_LIST) != 0;
424 }
425 
426 
427 bool
429  return (myAttributeProperty & ATTRPROPERTY_SECUENCIAL) != 0;
430 }
431 
432 
433 bool
435  return (myAttributeProperty & ATTRPROPERTY_UNIQUE) != 0;
436 }
437 
438 
439 bool
441  return (myAttributeProperty & ATTRPROPERTY_WRITEXMLOPTIONAL) != 0;
442 }
443 
444 
445 bool
447  return (myAttributeProperty & ATTRPROPERTY_DISCRETE) != 0;
448 }
449 
450 
451 bool
453  return (myAttributeProperty & ATTRPROPERTY_COMBINABLE) != 0;
454 }
455 
456 
457 bool
459  return (myAttributeProperty & ATTRPROPERTY_NONEDITABLE) != 0;
460 }
461 
462 
463 bool
465  return (myAttributeProperty & ATTRPROPERTY_EXTENDED) != 0;
466 }
467 
468 
469 bool
471  return (myAttributeProperty & ATTRPROPERTY_UPDATEGEOMETRY) != 0;
472 }
473 
474 
475 bool
477  return (myAttributeProperty & ATTRPROPERTY_OPTIONAL) != 0;
478 }
479 
480 
481 bool
483  return (myAttributeProperty & ATTRPROPERTY_COMPLEX) != 0;
484 }
485 
486 
487 bool
489  return (myAttributeProperty & ATTRPROPERTY_ENABLITABLE) != 0;
490 }
491 
492 // ---------------------------------------------------------------------------
493 // GNEAttributeCarrier::TagProperties - methods
494 // ---------------------------------------------------------------------------
495 
497  myTag(SUMO_TAG_NOTHING),
498  myTagType(0),
499  myTagProperty(0),
500  myIcon(ICON_EMPTY),
501  myParentTag(SUMO_TAG_NOTHING),
502  myTagSynonym(SUMO_TAG_NOTHING) {
503 }
504 
505 
506 GNEAttributeCarrier::TagProperties::TagProperties(SumoXMLTag tag, int tagType, int tagProperty, GUIIcon icon, SumoXMLTag parentTag, SumoXMLTag tagSynonym) :
507  myTag(tag),
508  myTagStr(toString(tag)),
509  myTagType(tagType),
510  myTagProperty(tagProperty),
511  myIcon(icon),
512  myParentTag(parentTag),
513  myTagSynonym(tagSynonym) {
514 }
515 
516 
518 
519 
522  return myTag;
523 }
524 
525 
526 const std::string&
528  return myTagStr;
529 }
530 
531 
532 void
534  // check that element must ist at least netElement, Additional, or shape
535  if (!isNetElement() && !isAdditional() && !isShape() && !isTAZ() && !isDemandElement()) {
536  throw ProcessError("element must be at leas netElement, additional, TAZ, shape or demandElement");
537  }
538  // check that element only is netElement, Additional, or shape at the same time
539  if ((isNetElement() + isAdditional() + isShape() + isTAZ() + isDemandElement()) > 1) {
540  throw ProcessError("element can be only a netElement, additional, shape or demandElement at the same time");
541  }
542  // if element can mask the start and end position, check that bot attributes exist
543  if (canMaskStartEndPos() && (!hasAttribute(SUMO_ATTR_STARTPOS) || !hasAttribute(SUMO_ATTR_ENDPOS))) {
544  throw ProcessError("If attribute mask the start and end position, bot attribute has to be defined");
545  }
546  // check that synonym tag isn't nothing
547  if (hasTagSynonym() && (myTagSynonym == SUMO_TAG_NOTHING)) {
548  throw FormatException("Synonym tag cannot be nothing");
549  }
550  // check that synonym was defined
551  if (!hasTagSynonym() && (myTagSynonym != SUMO_TAG_NOTHING)) {
552  throw FormatException("Tag doesn't support synonyms");
553  }
554  // check integrity of all attributes
555  for (auto i : myAttributeProperties) {
556  i.checkAttributeIntegrity();
557  // check that if attribute is combinable, own a combination of Allow/disallow attibute
558  if (i.isCombinable()) {
559  if ((i.getAttr() != SUMO_ATTR_ALLOW) && (i.getAttr() != SUMO_ATTR_DISALLOW)) {
560  throw ProcessError("Attributes aren't combinables");
561  } else if ((i.getAttr() == SUMO_ATTR_ALLOW) && !hasAttribute(SUMO_ATTR_DISALLOW)) {
562  throw ProcessError("allow need a disallow attribute in the same tag");
563  } else if ((i.getAttr() == SUMO_ATTR_DISALLOW) && !hasAttribute(SUMO_ATTR_ALLOW)) {
564  throw ProcessError("disallow need an allow attribute in the same tag");
565  }
566  }
567  }
568 }
569 
570 
571 const std::string&
573  // iterate over attribute properties
574  for (const auto& i : myAttributeProperties) {
575  if (i.getAttr() == attr) {
576  if (!i.hasStaticDefaultValue()) {
577  throw ProcessError("attribute '" + i.getAttrStr() + "' doesn't have a default value");
578  } else {
579  return i.getDefaultValue();
580  }
581  }
582  }
583  throw ProcessError("Attribute '" + toString(attr) + "' not defined");
584 }
585 
586 
587 void
589  if (isAttributeDeprecated(attributeProperty.getAttr())) {
590  throw ProcessError("Attribute '" + attributeProperty.getAttrStr() + "' is deprecated and cannot be inserted");
591  } else if ((myAttributeProperties.size() + 1) >= MAXNUMBEROFATTRIBUTES) {
592  throw ProcessError("Maximum number of attributes for tag " + attributeProperty.getAttrStr() + " exceeded");
593  } else {
594  // Check that attribute wasn't already inserted
595  for (auto i : myAttributeProperties) {
596  if (i.getAttr() == attributeProperty.getAttr()) {
597  throw ProcessError("Attribute '" + attributeProperty.getAttrStr() + "' already inserted");
598  }
599  }
600  // insert AttributeProperties in vector
601  myAttributeProperties.push_back(attributeProperty);
602  myAttributeProperties.back().setTagPropertyParent(this);
603  }
604 }
605 
606 
607 void
609  // Check that attribute wasn't already inserted
610  for (auto i : myAttributeProperties) {
611  if (i.getAttr() == attr) {
612  throw ProcessError("Attribute '" + toString(attr) + "' is deprecated but was inserted in list of attributes");
613  }
614  }
615  // add it into myDeprecatedAttributes
616  myDeprecatedAttributes.push_back(attr);
617 }
618 
619 
622  // iterate over attribute properties
623  for (const auto& i : myAttributeProperties) {
624  if ((i.getAttr() == attr) || (i.hasAttrSynonym() && (i.getAttrSynonym() == attr))) {
625  return i;
626  }
627  }
628  // throw error if these attribute doesn't exist
629  throw ProcessError("Attribute '" + toString(attr) + "' doesn't exist");
630 }
631 
632 
633 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
635  return myAttributeProperties.begin();
636 }
637 
638 
639 std::vector<GNEAttributeCarrier::AttributeProperties>::const_iterator
641  return myAttributeProperties.end();
642 }
643 
644 
645 int
647  return (int)myAttributeProperties.size();
648 }
649 
650 
651 GUIIcon
653  return myIcon;
654 }
655 
656 
659  if (hasParent()) {
660  return myParentTag;
661  } else {
662  throw ProcessError("Tag doesn't have parent");
663  }
664 }
665 
666 
669  if (hasTagSynonym()) {
670  return myTagSynonym;
671  } else {
672  throw ProcessError("Tag doesn't have synonym");
673  }
674 }
675 
676 
677 bool
679  // iterate over attribute properties
680  for (const auto& i : myAttributeProperties) {
681  if (i.getAttr() == attr) {
682  return true;
683  }
684  }
685  return false;
686 }
687 
688 
689 bool
691  return (myTagType & TAGTYPE_NETELEMENT) != 0;
692 }
693 
694 
695 bool
697  return (myTagType & TAGTYPE_ADDITIONAL) != 0;
698 }
699 
700 bool
702  return (myTagType & TAGTYPE_SHAPE) != 0;
703 }
704 
705 
706 bool
708  return (myTagType & TAGTYPE_TAZ) != 0;
709 }
710 
711 
712 bool
714  return (myTagType & TAGTYPE_DEMANDELEMENT) != 0;
715 }
716 
717 
718 bool
720  return (myTagType & TAGTYPE_STOPPINGPLACE) != 0;
721 }
722 
723 
724 bool
726  return (myTagType & TAGTYPE_DETECTOR) != 0;
727 }
728 
729 
730 bool
732  return (myTagType & TAGTYPE_VTYPE) != 0;
733 }
734 
735 
736 bool
738  return (myTagType & TAGTYPE_VEHICLE) != 0;
739 }
740 
741 bool
743  return (myTagType & TAGTYPE_ROUTE) != 0;
744 }
745 
746 
747 bool
749  return (myTagType & TAGTYPE_STOP) != 0;
750 }
751 
752 
753 bool
755  return (myTagType & TAGTYPE_PERSON) != 0;
756 }
757 
758 
759 bool
761  return (myTagType & TAGTYPE_PERSONPLAN) != 0;
762 }
763 
764 
765 bool
767  return (myTagType & TAGTYPE_PERSONTRIP) != 0;
768 }
769 
770 
771 bool
773  return (myTagType & TAGTYPE_WALK) != 0;
774 }
775 
776 
777 bool
779  return (myTagType & TAGTYPE_RIDE) != 0;
780 }
781 
782 
783 bool
785  return (myTagType & TAGTYPE_PERSONSTOP) != 0;
786 }
787 
788 
789 bool
791  return (myTagProperty & TAGPROPERTY_DRAWABLE) != 0;
792 }
793 
794 
795 bool
797  return (myTagProperty & TAGPROPERTY_SELECTABLE) != 0;
798 }
799 
800 
801 bool
804 }
805 
806 
807 bool
809  return (myTagProperty & TAGPROPERTY_BLOCKSHAPE) != 0;
810 }
811 
812 
813 bool
815  return (myTagProperty & TAGPROPERTY_CLOSESHAPE) != 0;
816 }
817 
818 
819 bool
821  return (myTagProperty & TAGPROPERTY_GEOPOSITION) != 0;
822 }
823 
824 
825 bool
827  return (myTagProperty & TAGPROPERTY_GEOSHAPE) != 0;
828 }
829 
830 
831 bool
833  return (myTagProperty & TAGPROPERTY_PARENT) != 0;
834 }
835 
836 
837 bool
839  return (myTagProperty & TAGPROPERTY_SYNONYM) != 0;
840 }
841 
842 
843 bool
845  return (myTagProperty & TAGPROPERTY_DIALOG) != 0;
846 }
847 
848 
849 bool
852 }
853 
854 
855 bool
857  // note: By default all Tags supports generic parameters, except Tags with "TAGPROPERTY_NOGENERICPARAMETERS"
859 }
860 
861 
862 bool
864  return (myTagProperty & TAGPROPERTY_RTREE) != 0;
865 }
866 
867 
868 bool
871 }
872 
873 
874 bool
876  return (myTagProperty & TAGPROPERTY_REPARENT) != 0;
877 }
878 
879 
880 bool
883 }
884 
885 
886 bool
889 }
890 
891 
892 bool
895 }
896 
897 
898 bool
901 }
902 
903 
904 bool
906  return (std::find(myDeprecatedAttributes.begin(), myDeprecatedAttributes.end(), attr) != myDeprecatedAttributes.end());
907 }
908 
909 // ---------------------------------------------------------------------------
910 // GNEAttributeCarrier - methods
911 // ---------------------------------------------------------------------------
912 
915  mySelected(false) {
916 }
917 
918 
920 
921 
922 template<> int
923 GNEAttributeCarrier::parse(const std::string& string) {
924  return StringUtils::toInt(string);
925 }
926 
927 
928 template<> double
929 GNEAttributeCarrier::parse(const std::string& string) {
930  return StringUtils::toDouble(string);
931 }
932 
933 
934 template<> SUMOTime
935 GNEAttributeCarrier::parse(const std::string& string) {
936  SUMOTime time = string2time(string);
937  if (time < 0) {
938  throw NumberFormatException("SUMOTIME cannot be negative");
939  } else {
940  return time;
941  }
942 }
943 
944 
945 template<> bool
946 GNEAttributeCarrier::parse(const std::string& string) {
947  return StringUtils::toBool(string);
948 }
949 
950 
951 template<> std::string
952 GNEAttributeCarrier::parse(const std::string& string) {
953  return string;
954 }
955 
956 
957 template<> SUMOVehicleClass
958 GNEAttributeCarrier::parse(const std::string& string) {
959  if (string.size() == 0) {
960  throw EmptyData();
961  } else if (!SumoVehicleClassStrings.hasString(string)) {
962  return SVC_IGNORING;
963  } else {
964  return SumoVehicleClassStrings.get(string);
965  }
966 }
967 
968 
969 template<> RGBColor
970 GNEAttributeCarrier::parse(const std::string& string) {
971  return RGBColor::parseColor(string);
972 }
973 
974 
975 template<> Position
976 GNEAttributeCarrier::parse(const std::string& string) {
977  if (string.size() == 0) {
978  throw EmptyData();
979  } else {
980  bool ok = true;
981  PositionVector pos = GeomConvHelper::parseShapeReporting(string, "user-supplied position", 0, ok, false, false);
982  if (!ok || (pos.size() != 1)) {
983  throw NumberFormatException("(Position) " + string);
984  } else {
985  return pos[0];
986  }
987  }
988 }
989 
990 
991 template<> PositionVector
992 GNEAttributeCarrier::parse(const std::string& string) {
993  PositionVector posVector;
994  // empty string are allowed (It means empty position vector)
995  if (string.empty()) {
996  return posVector;
997  } else {
998  bool ok = true;
999  posVector = GeomConvHelper::parseShapeReporting(string, "user-supplied shape", 0, ok, false, true);
1000  if (!ok) {
1001  throw NumberFormatException("(Position List) " + string);
1002  } else {
1003  return posVector;
1004  }
1005  }
1006 }
1007 
1008 
1009 template<> SUMOVehicleShape
1010 GNEAttributeCarrier::parse(const std::string& string) {
1011  if ((string == "unknown") || (!SumoVehicleShapeStrings.hasString(string))) {
1012  return SVS_UNKNOWN;
1013  } else {
1014  return SumoVehicleShapeStrings.get(string);
1015  }
1016 }
1017 
1018 
1019 template<> std::vector<std::string>
1020 GNEAttributeCarrier::parse(const std::string& string) {
1021  return StringTokenizer(string).getVector();
1022 }
1023 
1024 
1025 template<> std::set<std::string>
1026 GNEAttributeCarrier::parse(const std::string& string) {
1027  std::vector<std::string> vectorString = StringTokenizer(string).getVector();
1028  std::set<std::string> solution;
1029  for (const auto& i : vectorString) {
1030  solution.insert(i);
1031  }
1032  return solution;
1033 }
1034 
1035 
1036 template<> std::vector<int>
1037 GNEAttributeCarrier::parse(const std::string& string) {
1038  std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1039  std::vector<int> parsedIntValues;
1040  for (const auto& i : parsedValues) {
1041  parsedIntValues.push_back(parse<int>(i));
1042  }
1043  return parsedIntValues;
1044 }
1045 
1046 
1047 template<> std::vector<double>
1048 GNEAttributeCarrier::parse(const std::string& string) {
1049  std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1050  std::vector<double> parsedDoubleValues;
1051  for (const auto& i : parsedValues) {
1052  parsedDoubleValues.push_back(parse<double>(i));
1053  }
1054  return parsedDoubleValues;
1055 }
1056 
1057 
1058 template<> std::vector<bool>
1059 GNEAttributeCarrier::parse(const std::string& string) {
1060  std::vector<std::string> parsedValues = parse<std::vector<std::string> >(string);
1061  std::vector<bool> parsedBoolValues;
1062  for (const auto& i : parsedValues) {
1063  parsedBoolValues.push_back(parse<bool>(i));
1064  }
1065  return parsedBoolValues;
1066 }
1067 
1068 
1069 template<> std::vector<GNEEdge*>
1070 GNEAttributeCarrier::parse(GNENet* net, const std::string& value) {
1071  // Declare string vector
1072  std::vector<std::string> edgeIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
1073  std::vector<GNEEdge*> parsedEdges;
1074  // Iterate over edges IDs, retrieve Edges and add it into parsedEdges
1075  for (const auto& i : edgeIds) {
1076  GNEEdge* retrievedEdge = net->retrieveEdge(i, false);
1077  if (retrievedEdge) {
1078  parsedEdges.push_back(net->retrieveEdge(i));
1079  } else {
1080  throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_EDGES) + ". " + toString(SUMO_TAG_EDGE) + " '" + i + "' doesn't exist");
1081  }
1082  }
1083  return parsedEdges;
1084 }
1085 
1086 
1087 template<> std::vector<GNELane*>
1088 GNEAttributeCarrier::parse(GNENet* net, const std::string& value) {
1089  // Declare string vector
1090  std::vector<std::string> laneIds = GNEAttributeCarrier::parse<std::vector<std::string> > (value);
1091  std::vector<GNELane*> parsedLanes;
1092  // Iterate over lanes IDs, retrieve Lanes and add it into parsedLanes
1093  for (const auto& i : laneIds) {
1094  GNELane* retrievedLane = net->retrieveLane(i, false);
1095  if (retrievedLane) {
1096  parsedLanes.push_back(net->retrieveLane(i));
1097  } else {
1098  throw FormatException("Error parsing parameter " + toString(SUMO_ATTR_LANES) + ". " + toString(SUMO_TAG_LANE) + " '" + i + "' doesn't exist");
1099  }
1100  }
1101  return parsedLanes;
1102 }
1103 
1104 
1105 template<> std::string
1106 GNEAttributeCarrier::parseIDs(const std::vector<GNEEdge*>& ACs) {
1107  // obtain ID's of edges and return their join
1108  std::vector<std::string> edgeIDs;
1109  for (const auto& i : ACs) {
1110  edgeIDs.push_back(i->getID());
1111  }
1112  return joinToString(edgeIDs, " ");
1113 }
1114 
1115 
1116 template<> std::string
1117 GNEAttributeCarrier::parseIDs(const std::vector<GNELane*>& ACs) {
1118  // obtain ID's of lanes and return their join
1119  std::vector<std::string> laneIDs;
1120  for (const auto& i : ACs) {
1121  laneIDs.push_back(i->getID());
1122  }
1123  return joinToString(laneIDs, " ");
1124 }
1125 
1126 
1127 bool
1128 GNEAttributeCarrier::lanesConsecutives(const std::vector<GNELane*>& lanes) {
1129  // we need at least two lanes
1130  if (lanes.size() > 1) {
1131  // now check that lanes are consecutives (not neccesary connected)
1132  int currentLane = 0;
1133  while (currentLane < ((int)lanes.size() - 1)) {
1134  int nextLane = -1;
1135  // iterate over outgoing edges of destiny juntion of edge's lane
1136  for (int i = 0; (i < (int)lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().size()) && (nextLane == -1); i++) {
1137  // iterate over lanes of outgoing edges of destiny juntion of edge's lane
1138  for (int j = 0; (j < (int)lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().size()) && (nextLane == -1); j++) {
1139  // check if lane correspond to the next lane of "lanes"
1140  if (lanes.at(currentLane)->getParentEdge().getGNEJunctionDestiny()->getGNEOutgoingEdges().at(i)->getLanes().at(j) == lanes.at(currentLane + 1)) {
1141  nextLane = currentLane;
1142  }
1143  }
1144  }
1145  if (nextLane == -1) {
1146  return false;
1147  } else {
1148  currentLane++;
1149  }
1150  }
1151  return true;
1152  } else {
1153  return false;
1154  }
1155 }
1156 
1157 
1158 std::string
1160  return getAttribute(key);
1161 }
1162 
1163 
1164 const std::string&
1166  return myTagProperty.getTagStr();
1167 }
1168 
1169 
1172  return myTagProperty;
1173 }
1174 
1175 
1176 FXIcon*
1178  // define on first access
1179  if (myTagProperties.size() == 0) {
1181  }
1183 }
1184 
1185 
1186 const std::string
1188  return getAttribute(SUMO_ATTR_ID);
1189 }
1190 
1191 // ===========================================================================
1192 // static methods
1193 // ===========================================================================
1194 
1197  if (tag == SUMO_TAG_NOTHING) {
1198  return dummyTagProperty;
1199  }
1200  // define on first access
1201  if (myTagProperties.size() == 0) {
1203  }
1204  // check that tag is defined
1205  if (myTagProperties.count(tag) == 0) {
1206  throw ProcessError("Attributes for tag '" + toString(tag) + "' not defined");
1207  } else {
1208  return myTagProperties.at(tag);
1209  }
1210 }
1211 
1212 
1213 std::vector<SumoXMLTag>
1215  std::vector<SumoXMLTag> allTags;
1216  // define on first access
1217  if (myTagProperties.size() == 0) {
1219  }
1220  // fill all tags
1221  for (const auto& i : myTagProperties) {
1222  if (!onlyDrawables || i.second.isDrawable()) {
1223  allTags.push_back(i.first);
1224  }
1225  }
1226  return allTags;
1227 }
1228 
1229 
1230 std::vector<SumoXMLTag>
1231 GNEAttributeCarrier::allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables) {
1232  std::vector<SumoXMLTag> allowedTags;
1233  // define on first access
1234  if (myTagProperties.size() == 0) {
1236  }
1237  if (tagPropertyCategory & TAGTYPE_NETELEMENT) {
1238  // fill netElements tags
1239  for (const auto& i : myTagProperties) {
1240  if (i.second.isNetElement() && (!onlyDrawables || i.second.isDrawable())) {
1241  allowedTags.push_back(i.first);
1242  }
1243  }
1244  }
1245  if (tagPropertyCategory & TAGTYPE_ADDITIONAL) {
1246  // fill additional tags
1247  for (const auto& i : myTagProperties) {
1248  if (i.second.isAdditional() && (!onlyDrawables || i.second.isDrawable())) {
1249  allowedTags.push_back(i.first);
1250  }
1251  }
1252  }
1253  if (tagPropertyCategory & TAGTYPE_SHAPE) {
1254  // fill shape tags
1255  for (const auto& i : myTagProperties) {
1256  if (i.second.isShape() && (!onlyDrawables || i.second.isDrawable())) {
1257  allowedTags.push_back(i.first);
1258  }
1259  }
1260  }
1261  if (tagPropertyCategory & TAGTYPE_TAZ) {
1262  // fill taz tags
1263  for (const auto& i : myTagProperties) {
1264  if (i.second.isTAZ() && (!onlyDrawables || i.second.isDrawable())) {
1265  allowedTags.push_back(i.first);
1266  }
1267  }
1268  }
1269  if (tagPropertyCategory & TAGTYPE_DEMANDELEMENT) {
1270  // fill demand tags
1271  for (const auto& i : myTagProperties) {
1272  if (i.second.isDemandElement() && (!onlyDrawables || i.second.isDrawable())) {
1273  allowedTags.push_back(i.first);
1274  }
1275  }
1276  }
1277  if (tagPropertyCategory & TAGTYPE_ROUTE) {
1278  // fill demand tags
1279  for (const auto& i : myTagProperties) {
1280  if (i.second.isRoute() && (!onlyDrawables || i.second.isDrawable())) {
1281  allowedTags.push_back(i.first);
1282  }
1283  }
1284  }
1285  if (tagPropertyCategory & TAGTYPE_VEHICLE) {
1286  // fill demand tags
1287  for (const auto& i : myTagProperties) {
1288  if (i.second.isVehicle() && (!onlyDrawables || i.second.isDrawable())) {
1289  allowedTags.push_back(i.first);
1290  }
1291  }
1292  }
1293  if (tagPropertyCategory & TAGTYPE_STOP) {
1294  // fill demand tags
1295  for (const auto& i : myTagProperties) {
1296  if (i.second.isStop() && (!onlyDrawables || i.second.isDrawable())) {
1297  allowedTags.push_back(i.first);
1298  }
1299  }
1300  }
1301  if (tagPropertyCategory & TAGTYPE_PERSON) {
1302  // fill demand tags
1303  for (const auto& i : myTagProperties) {
1304  if (i.second.isPerson() && (!onlyDrawables || i.second.isDrawable())) {
1305  allowedTags.push_back(i.first);
1306  }
1307  }
1308  }
1309  if (tagPropertyCategory & TAGTYPE_PERSONPLAN) {
1310  // fill demand tags
1311  for (const auto& i : myTagProperties) {
1312  if (i.second.isPersonPlan() && (!onlyDrawables || i.second.isDrawable())) {
1313  allowedTags.push_back(i.first);
1314  }
1315  }
1316  }
1317  if (tagPropertyCategory & TAGTYPE_PERSONTRIP) {
1318  // fill demand tags
1319  for (const auto& i : myTagProperties) {
1320  if (i.second.isPersonTrip() && (!onlyDrawables || i.second.isDrawable())) {
1321  allowedTags.push_back(i.first);
1322  }
1323  }
1324  }
1325  if (tagPropertyCategory & TAGTYPE_WALK) {
1326  // fill demand tags
1327  for (const auto& i : myTagProperties) {
1328  if (i.second.isWalk() && (!onlyDrawables || i.second.isDrawable())) {
1329  allowedTags.push_back(i.first);
1330  }
1331  }
1332  }
1333  if (tagPropertyCategory & TAGTYPE_RIDE) {
1334  // fill demand tags
1335  for (const auto& i : myTagProperties) {
1336  if (i.second.isRide() && (!onlyDrawables || i.second.isDrawable())) {
1337  allowedTags.push_back(i.first);
1338  }
1339  }
1340  }
1341  if (tagPropertyCategory & TAGTYPE_PERSONSTOP) {
1342  // fill demand tags
1343  for (const auto& i : myTagProperties) {
1344  if (i.second.isPersonStop() && (!onlyDrawables || i.second.isDrawable())) {
1345  allowedTags.push_back(i.first);
1346  }
1347  }
1348  }
1349  return allowedTags;
1350 }
1351 
1352 
1353 bool
1355  // separate value in a vector of string using | as separator
1356  std::vector<std::string> parsedValues;
1357  StringTokenizer stValues(value, "|", true);
1358  while (stValues.hasNext()) {
1359  parsedValues.push_back(stValues.next());
1360  }
1361  // check that parsed values (A=B)can be parsed in generic parameters
1362  for (auto i : parsedValues) {
1363  std::vector<std::string> parsedParameters;
1364  StringTokenizer stParam(i, "=", true);
1365  while (stParam.hasNext()) {
1366  parsedParameters.push_back(stParam.next());
1367  }
1368  // Check that parsed parameters are exactly two
1369  if (parsedParameters.size() == 2) {
1370  // check that key and value contains valid characters
1371  if (!SUMOXMLDefinitions::isValidGenericParameterKey(parsedParameters.front()) || !SUMOXMLDefinitions::isValidGenericParameterValue(parsedParameters.back())) {
1372  return false;
1373  }
1374  } else {
1375  return false;
1376  }
1377  }
1378  // all ok, then return true
1379  return true;
1380 }
1381 
1382 // ===========================================================================
1383 // private
1384 // ===========================================================================
1385 
1386 void
1388  // fill all groups of ACs
1389  fillNetElements();
1390  fillAdditionals();
1391  fillShapes();
1394  fillStopElements();
1397  // check integrity of all Tags (function checkTagIntegrity() throw an exception if there is an inconsistency)
1398  for (const auto& i : myTagProperties) {
1399  i.second.checkTagIntegrity();
1400  }
1401 }
1402 
1403 
1404 void
1406  // declare empty AttributeProperties
1407  AttributeProperties attrProperty;
1408  // obtain Node Types except NODETYPE_DEAD_END_DEPRECATED
1409  const OptionsCont& oc = OptionsCont::getOptions();
1410  std::vector<std::string> nodeTypes = SUMOXMLDefinitions::NodeTypes.getStrings();
1411  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_DEAD_END_DEPRECATED)));
1412  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_DEAD_END)));
1413  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_NOJUNCTION)));
1414  nodeTypes.erase(std::find(nodeTypes.begin(), nodeTypes.end(), toString(NODETYPE_INTERNAL)));
1415  // fill netElement ACs
1416  SumoXMLTag currentTag = SUMO_TAG_EDGE;
1417  {
1418  // set values of tag
1420  // set values of attributes
1421  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1423  "The id of the edge");
1424  myTagProperties[currentTag].addAttribute(attrProperty);
1425 
1426  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
1428  "The name of a node within the nodes-file the edge shall start at");
1429  myTagProperties[currentTag].addAttribute(attrProperty);
1430 
1431  attrProperty = AttributeProperties(SUMO_ATTR_TO,
1433  "The name of a node within the nodes-file the edge shall end at");
1434  myTagProperties[currentTag].addAttribute(attrProperty);
1435 
1436  attrProperty = AttributeProperties(SUMO_ATTR_SPEED,
1438  "The maximum speed allowed on the edge in m/s");
1439  toString(oc.getFloat("default.speed"));
1440  myTagProperties[currentTag].addAttribute(attrProperty);
1441 
1442  attrProperty = AttributeProperties(SUMO_ATTR_PRIORITY,
1444  "The priority of the edge");
1445  toString(oc.getInt("default.priority"));
1446  myTagProperties[currentTag].addAttribute(attrProperty);
1447 
1448  attrProperty = AttributeProperties(SUMO_ATTR_NUMLANES,
1450  "The number of lanes of the edge");
1451  toString(oc.getInt("default.lanenumber"));
1452  myTagProperties[currentTag].addAttribute(attrProperty);
1453 
1454  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
1456  "The name of a type within the SUMO edge type file");
1457  myTagProperties[currentTag].addAttribute(attrProperty);
1458 
1459  attrProperty = AttributeProperties(SUMO_ATTR_ALLOW,
1461  "Explicitly allows the given vehicle classes (not given will be not allowed)",
1462  "all");
1463  attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings());
1464  myTagProperties[currentTag].addAttribute(attrProperty);
1465 
1466  attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW,
1468  "Explicitly disallows the given vehicle classes (not given will be allowed)");
1469  attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings());
1470  myTagProperties[currentTag].addAttribute(attrProperty);
1471 
1472  attrProperty = AttributeProperties(SUMO_ATTR_SHAPE,
1474  "If the shape is given it should start and end with the positions of the from-node and to-node");
1475  myTagProperties[currentTag].addAttribute(attrProperty);
1476 
1477  attrProperty = AttributeProperties(SUMO_ATTR_LENGTH,
1479  "The length of the edge in meter");
1480  myTagProperties[currentTag].addAttribute(attrProperty);
1481 
1484  "Lane width for all lanes of this edge in meters (used for visualization)",
1485  "right");
1487  myTagProperties[currentTag].addAttribute(attrProperty);
1488 
1489  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
1491  "street name (need not be unique, used for visualization)");
1492  myTagProperties[currentTag].addAttribute(attrProperty);
1493 
1494  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
1496  "Lane width for all lanes of this edge in meters (used for visualization)",
1497  "-1");
1498  myTagProperties[currentTag].addAttribute(attrProperty);
1499 
1502  "Move the stop line back from the intersection by the given amount",
1503  "0");
1504  myTagProperties[currentTag].addAttribute(attrProperty);
1505 
1507  ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute used to define an endPoint
1508  "Custom position in which shape start (by default position of junction from)");
1509  myTagProperties[currentTag].addAttribute(attrProperty);
1510 
1511  attrProperty = AttributeProperties(GNE_ATTR_SHAPE_END,
1512  ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from to define an endPoint
1513  "Custom position in which shape end (by default position of junction from)");
1514  myTagProperties[currentTag].addAttribute(attrProperty);
1515 
1516  attrProperty = AttributeProperties(GNE_ATTR_BIDIR,
1517  ATTRPROPERTY_BOOL | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_NONEDITABLE, // virtual attribute to check of this edge is part of a bidirectional railway (cannot be edited)
1518  "Show if edge is bidireccional",
1519  "0");
1520  myTagProperties[currentTag].addAttribute(attrProperty);
1521 
1522  attrProperty = AttributeProperties(SUMO_ATTR_DISTANCE,
1524  "0");
1525  myTagProperties[currentTag].addAttribute(attrProperty);
1526 
1527  }
1528  currentTag = SUMO_TAG_JUNCTION;
1529  {
1530  // set values of tag
1532  // set values of attributes
1533  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1535  "The id of the node");
1536  myTagProperties[currentTag].addAttribute(attrProperty);
1537 
1538  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
1539  ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
1540  "The x-y-z position of the node on the plane in meters");
1541  myTagProperties[currentTag].addAttribute(attrProperty);
1542 
1543  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
1545  "An optional type for the node");
1546  attrProperty.setDiscreteValues(nodeTypes);
1547  myTagProperties[currentTag].addAttribute(attrProperty);
1548 
1549  attrProperty = AttributeProperties(SUMO_ATTR_SHAPE,
1551  "A custom shape for that node");
1552  myTagProperties[currentTag].addAttribute(attrProperty);
1553 
1554  attrProperty = AttributeProperties(SUMO_ATTR_RADIUS,
1556  "Optional turning radius (for all corners) for that node in meters",
1557  "1.5");
1558  myTagProperties[currentTag].addAttribute(attrProperty);
1559 
1562  "Whether the junction-blocking-heuristic should be activated at this node",
1563  "1");
1564  myTagProperties[currentTag].addAttribute(attrProperty);
1565 
1568  "How to compute right of way rules at this node",
1570  attrProperty.setDiscreteValues(SUMOXMLDefinitions::RightOfWayValues.getStrings());
1571  myTagProperties[currentTag].addAttribute(attrProperty);
1572 
1573  attrProperty = AttributeProperties(SUMO_ATTR_FRINGE,
1575  "Whether this junction is at the fringe of the network",
1577  attrProperty.setDiscreteValues(SUMOXMLDefinitions::FringeTypeValues.getStrings());
1578  myTagProperties[currentTag].addAttribute(attrProperty);
1579 
1580  attrProperty = AttributeProperties(SUMO_ATTR_TLTYPE,
1582  "An optional type for the traffic light algorithm");
1583  attrProperty.setDiscreteValues(SUMOXMLDefinitions::TrafficLightTypes.getStrings());
1584  myTagProperties[currentTag].addAttribute(attrProperty);
1585 
1586  attrProperty = AttributeProperties(SUMO_ATTR_TLID,
1588  "An optional id for the traffic light program");
1589  myTagProperties[currentTag].addAttribute(attrProperty);
1590  }
1591  currentTag = SUMO_TAG_LANE;
1592  {
1593  // set values of tag
1595  // set values of attributes
1596  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1598  "ID of lane (Automatic, non editable)");
1599  myTagProperties[currentTag].addAttribute(attrProperty);
1600 
1601  attrProperty = AttributeProperties(SUMO_ATTR_INDEX,
1603  "The enumeration index of the lane (0 is the rightmost lane, <NUMBER_LANES>-1 is the leftmost one)");
1604  myTagProperties[currentTag].addAttribute(attrProperty);
1605 
1606  attrProperty = AttributeProperties(SUMO_ATTR_SPEED,
1608  "Speed in meters per second",
1609  "13.89");
1610  myTagProperties[currentTag].addAttribute(attrProperty);
1611 
1612  attrProperty = AttributeProperties(SUMO_ATTR_ALLOW,
1614  "Explicitly allows the given vehicle classes (not given will be not allowed)",
1615  "all");
1616  attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings());
1617  myTagProperties[currentTag].addAttribute(attrProperty);
1618 
1619  attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW,
1621  "Explicitly disallows the given vehicle classes (not given will be allowed)");
1622  attrProperty.setDiscreteValues(SumoVehicleClassStrings.getStrings());
1623  myTagProperties[currentTag].addAttribute(attrProperty);
1624 
1625  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
1627  "Width in meters (used for visualization)",
1628  "-1");
1629  myTagProperties[currentTag].addAttribute(attrProperty);
1630 
1633  "Move the stop line back from the intersection by the given amount",
1634  "0");
1635  myTagProperties[currentTag].addAttribute(attrProperty);
1636 
1639  "Enable or disable lane as acceleration lane",
1640  "0");
1641  myTagProperties[currentTag].addAttribute(attrProperty);
1642 
1645  "If the shape is given it overrides the computation based on edge shape");
1646  myTagProperties[currentTag].addAttribute(attrProperty);
1647  }
1648  currentTag = SUMO_TAG_CROSSING;
1649  {
1650  // set values of tag
1652  // set values of attributes
1653  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1655  "The ID of Crossing");
1656  myTagProperties[currentTag].addAttribute(attrProperty);
1657 
1658  attrProperty = AttributeProperties(SUMO_ATTR_EDGES,
1660  "The (road) edges which are crossed");
1661  myTagProperties[currentTag].addAttribute(attrProperty);
1662 
1663  attrProperty = AttributeProperties(SUMO_ATTR_PRIORITY,
1665  "Whether the pedestrians have priority over the vehicles (automatically set to true at tls-controlled intersections)",
1666  "0");
1667  myTagProperties[currentTag].addAttribute(attrProperty);
1668 
1669  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
1671  "The width of the crossings",
1672  toString(OptionsCont::getOptions().getFloat("default.crossing-width")));
1673  myTagProperties[currentTag].addAttribute(attrProperty);
1674 
1677  "sets the tls-index for this crossing",
1678  "-1");
1679  myTagProperties[currentTag].addAttribute(attrProperty);
1680 
1683  "sets the opposite-direction tls-index for this crossing",
1684  "-1");
1685  myTagProperties[currentTag].addAttribute(attrProperty);
1686 
1689  "Overrids default shape of pedestrian crossing");
1690  myTagProperties[currentTag].addAttribute(attrProperty);
1691  }
1692  currentTag = SUMO_TAG_CONNECTION;
1693  {
1694  // set values of tag
1696  // set values of attributes
1697  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
1699  "The name of the edge the vehicles leave");
1700  myTagProperties[currentTag].addAttribute(attrProperty);
1701 
1702  attrProperty = AttributeProperties(SUMO_ATTR_TO,
1704  "The name of the edge the vehicles may reach when leaving 'from'");
1705  myTagProperties[currentTag].addAttribute(attrProperty);
1706 
1709  "the lane index of the incoming lane (numbers starting with 0)");
1710  myTagProperties[currentTag].addAttribute(attrProperty);
1711 
1712  attrProperty = AttributeProperties(SUMO_ATTR_TO_LANE,
1714  "the lane index of the outgoing lane (numbers starting with 0)");
1715  myTagProperties[currentTag].addAttribute(attrProperty);
1716 
1717  attrProperty = AttributeProperties(SUMO_ATTR_PASS,
1719  "if set, vehicles which pass this (lane-2-lane) connection) will not wait",
1720  "0");
1721  myTagProperties[currentTag].addAttribute(attrProperty);
1722 
1725  "if set to false, vehicles which pass this (lane-2-lane) connection) will not worry about blocking the intersection",
1726  "0");
1727  myTagProperties[currentTag].addAttribute(attrProperty);
1728 
1729  attrProperty = AttributeProperties(SUMO_ATTR_CONTPOS,
1731  "If set to a more than 0 value, an internal junction will be built at this position (in m) from the start of the internal lane for this connection",
1733  myTagProperties[currentTag].addAttribute(attrProperty);
1734 
1737  "If set to true, This connection will not be TLS-controlled despite its node being controlled",
1738  "0");
1739  myTagProperties[currentTag].addAttribute(attrProperty);
1740 
1743  "Vision distance between vehicles",
1745  myTagProperties[currentTag].addAttribute(attrProperty);
1746 
1749  "sets the distance to the connection at which all relevant foes are visible",
1750  "-1");
1751  myTagProperties[currentTag].addAttribute(attrProperty);
1752 
1753  attrProperty = AttributeProperties(SUMO_ATTR_SPEED,
1755  "sets custom speed limit for the connection",
1757  myTagProperties[currentTag].addAttribute(attrProperty);
1758 
1761  "sets custom shape for the connection");
1762  myTagProperties[currentTag].addAttribute(attrProperty);
1763 
1764  attrProperty = AttributeProperties(SUMO_ATTR_DIR,
1766  "turning direction for this connection (computed)");
1767  myTagProperties[currentTag].addAttribute(attrProperty);
1768 
1769  attrProperty = AttributeProperties(SUMO_ATTR_STATE,
1771  "link state for this connection (computed)");
1772  myTagProperties[currentTag].addAttribute(attrProperty);
1773  }
1774 }
1775 
1776 
1777 void
1779  // declare empty AttributeProperties
1780  AttributeProperties attrProperty;
1781  // fill additional elements
1782  SumoXMLTag currentTag = SUMO_TAG_BUS_STOP;
1783  {
1784  // set values of tag
1786  // set values of attributes
1787  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1789  "The id of bus stop");
1790  myTagProperties[currentTag].addAttribute(attrProperty);
1791 
1792  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
1794  "The name of the lane the bus stop shall be located at");
1795  myTagProperties[currentTag].addAttribute(attrProperty);
1796 
1797  attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS,
1799  "The begin position on the lane (the lower position on the lane) in meters");
1800 
1801  myTagProperties[currentTag].addAttribute(attrProperty);
1802  attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS,
1804  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1805  myTagProperties[currentTag].addAttribute(attrProperty);
1806 
1807  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
1809  "Name of " + toString(currentTag));
1810  myTagProperties[currentTag].addAttribute(attrProperty);
1811 
1814  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
1815  "0");
1816  myTagProperties[currentTag].addAttribute(attrProperty);
1817 
1818  attrProperty = AttributeProperties(SUMO_ATTR_LINES,
1820  "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes");
1821  myTagProperties[currentTag].addAttribute(attrProperty);
1822 
1825  "Meant to be the names of the bus lines that stop at this bus stop. This is only used for visualization purposes",
1826  "-1");
1827  myTagProperties[currentTag].addAttribute(attrProperty);
1828  }
1829  currentTag = SUMO_TAG_ACCESS;
1830  {
1831  // set values of tag
1833  // set values of attributes
1834  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
1836  "The name of the lane the stop access shall be located at");
1837  myTagProperties[currentTag].addAttribute(attrProperty);
1838 
1839  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
1841  "The position on the lane (the lower position on the lane) in meters",
1842  "0");
1843  myTagProperties[currentTag].addAttribute(attrProperty);
1844 
1845  attrProperty = AttributeProperties(SUMO_ATTR_LENGTH,
1847  "The walking length of the access in meters");
1848  myTagProperties[currentTag].addAttribute(attrProperty);
1849 
1852  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
1853  "0");
1854  myTagProperties[currentTag].addAttribute(attrProperty);
1855 
1856  }
1857  currentTag = SUMO_TAG_CONTAINER_STOP;
1858  {
1859  // set values of tag
1861  // set values of attributes
1862  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1864  "The id of container stop");
1865  myTagProperties[currentTag].addAttribute(attrProperty);
1866 
1867  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
1869  "The name of the lane the container stop shall be located at");
1870  myTagProperties[currentTag].addAttribute(attrProperty);
1871 
1872  attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS,
1874  "The begin position on the lane (the lower position on the lane) in meters");
1875  myTagProperties[currentTag].addAttribute(attrProperty);
1876 
1877  attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS,
1879  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1880  myTagProperties[currentTag].addAttribute(attrProperty);
1881 
1882  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
1884  "Name of " + toString(currentTag));
1885  myTagProperties[currentTag].addAttribute(attrProperty);
1886 
1889  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
1890  "0");
1891  myTagProperties[currentTag].addAttribute(attrProperty);
1892 
1893  attrProperty = AttributeProperties(SUMO_ATTR_LINES,
1895  "meant to be the names of the bus lines that stop at this container stop. This is only used for visualization purposes");
1896  myTagProperties[currentTag].addAttribute(attrProperty);
1897  }
1898  currentTag = SUMO_TAG_CHARGING_STATION;
1899  {
1900  // set values of tag
1902  // set values of attributes
1903  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1905  "The id of charging station");
1906  myTagProperties[currentTag].addAttribute(attrProperty);
1907 
1908  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
1910  "Lane of the charging station location");
1911  myTagProperties[currentTag].addAttribute(attrProperty);
1912 
1913  attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS,
1915  "Begin position in the specified lane");
1916  myTagProperties[currentTag].addAttribute(attrProperty);
1917 
1918  attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS,
1920  "End position in the specified lane");
1921  myTagProperties[currentTag].addAttribute(attrProperty);
1922 
1923  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
1925  "Name of " + toString(currentTag));
1926  myTagProperties[currentTag].addAttribute(attrProperty);
1927 
1930  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
1931  "0");
1932  myTagProperties[currentTag].addAttribute(attrProperty);
1933 
1936  "Charging power in W",
1937  "22000.00");
1938  myTagProperties[currentTag].addAttribute(attrProperty);
1939 
1942  "Charging efficiency [0,1]",
1943  "0.95");
1944  attrProperty.setRange(0, 1);
1945  myTagProperties[currentTag].addAttribute(attrProperty);
1946 
1949  "Enable or disable charge in transit, i.e. vehicle must or must not to stop for charging",
1950  "0");
1951  myTagProperties[currentTag].addAttribute(attrProperty);
1952 
1955  "Time delay after the vehicles has reached / stopped on the charging station, before the energy transfer (charging) begins",
1956  "0.00");
1957  myTagProperties[currentTag].addAttribute(attrProperty);
1958  }
1959  currentTag = SUMO_TAG_PARKING_AREA;
1960  {
1961  // set values of tag
1963  // set values of attributes
1964  attrProperty = AttributeProperties(SUMO_ATTR_ID,
1966  "The id of ParkingArea");
1967  myTagProperties[currentTag].addAttribute(attrProperty);
1968 
1969  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
1971  "The name of the lane the Parking Area shall be located at");
1972  myTagProperties[currentTag].addAttribute(attrProperty);
1973 
1974  attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS,
1976  "The begin position on the lane (the lower position on the lane) in meters");
1977  myTagProperties[currentTag].addAttribute(attrProperty);
1978 
1979  attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS,
1981  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
1982  myTagProperties[currentTag].addAttribute(attrProperty);
1983 
1984  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
1986  "Name of " + toString(currentTag));
1987  myTagProperties[currentTag].addAttribute(attrProperty);
1988 
1991  " The number of parking spaces for road-side parking",
1992  "0");
1993  myTagProperties[currentTag].addAttribute(attrProperty);
1994 
1995  attrProperty = AttributeProperties(SUMO_ATTR_ONROAD,
1997  "If set, vehicles will park on the road lane and thereby reducing capacity",
1998  "0");
1999  myTagProperties[currentTag].addAttribute(attrProperty);
2000 
2003  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2004  "0");
2005  myTagProperties[currentTag].addAttribute(attrProperty);
2006 
2007  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
2009  "The width of the road-side parking spaces",
2010  "3.20");
2011  myTagProperties[currentTag].addAttribute(attrProperty);
2012 
2013  attrProperty = AttributeProperties(SUMO_ATTR_LENGTH,
2015  "The length of the road-side parking spaces. By default (endPos - startPos) / roadsideCapacity");
2016  myTagProperties[currentTag].addAttribute(attrProperty);
2017 
2018  attrProperty = AttributeProperties(SUMO_ATTR_ANGLE,
2020  "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
2021  "0.00");
2022  myTagProperties[currentTag].addAttribute(attrProperty);
2023 
2024  }
2025  currentTag = SUMO_TAG_PARKING_SPACE;
2026  {
2027  // set values of tag
2029  // set values of attributes
2030  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2031  ATTRPROPERTY_STRING | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_POSITION | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
2032  "The x-y-z position of the parking vehicle on the plane");
2033  myTagProperties[currentTag].addAttribute(attrProperty);
2034 
2035  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
2037  "The width of the road-side parking spaces",
2038  "3.20");
2039  myTagProperties[currentTag].addAttribute(attrProperty);
2040 
2041  attrProperty = AttributeProperties(SUMO_ATTR_LENGTH,
2043  "The length of the road-side parking spaces",
2044  "5.00");
2045  myTagProperties[currentTag].addAttribute(attrProperty);
2046 
2047  attrProperty = AttributeProperties(SUMO_ATTR_ANGLE,
2049  "The angle of the road-side parking spaces relative to the lane angle, positive means clockwise",
2050  "0.00");
2051  myTagProperties[currentTag].addAttribute(attrProperty);
2052 
2053  }
2054  currentTag = SUMO_TAG_E1DETECTOR;
2055  {
2056  // set values of tag
2058  // set values of attributes
2059  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2061  "The id of E1");
2062  myTagProperties[currentTag].addAttribute(attrProperty);
2063 
2064  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2066  "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2067  myTagProperties[currentTag].addAttribute(attrProperty);
2068 
2069  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2071  "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length");
2072  myTagProperties[currentTag].addAttribute(attrProperty);
2073 
2076  "The aggregation period the values the detector collects shall be summed up",
2077  "900.00");
2078  myTagProperties[currentTag].addAttribute(attrProperty);
2079 
2080  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2082  "Name of " + toString(currentTag));
2083  myTagProperties[currentTag].addAttribute(attrProperty);
2084 
2085  attrProperty = AttributeProperties(SUMO_ATTR_FILE,
2087  "The path to the output file");
2088  myTagProperties[currentTag].addAttribute(attrProperty);
2089 
2090  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
2092  "Space separated list of vehicle type ids to consider");
2093  myTagProperties[currentTag].addAttribute(attrProperty);
2094 
2097  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2098  "0");
2099  myTagProperties[currentTag].addAttribute(attrProperty);
2100 
2101  }
2102  currentTag = SUMO_TAG_E2DETECTOR;
2103  {
2104  // set values of tag
2106  // set "file" as deprecated attribute
2107  myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_CONT);
2108  // set values of attributes
2109  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2111  "The id of E2");
2112  myTagProperties[currentTag].addAttribute(attrProperty);
2113 
2114  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2116  "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2117  myTagProperties[currentTag].addAttribute(attrProperty);
2118 
2119  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2121  "The position on the lane the detector shall be laid on in meters");
2122  myTagProperties[currentTag].addAttribute(attrProperty);
2123 
2124  attrProperty = AttributeProperties(SUMO_ATTR_LENGTH,
2126  "The length of the detector in meters",
2127  "10.00");
2128  myTagProperties[currentTag].addAttribute(attrProperty);
2129 
2132  "The aggregation period the values the detector collects shall be summed up",
2133  "900.00");
2134  myTagProperties[currentTag].addAttribute(attrProperty);
2135 
2136  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2138  "Name of " + toString(currentTag));
2139  myTagProperties[currentTag].addAttribute(attrProperty);
2140 
2141  attrProperty = AttributeProperties(SUMO_ATTR_FILE,
2143  "The path to the output file");
2144  myTagProperties[currentTag].addAttribute(attrProperty);
2145 
2146  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
2148  "Space separated list of vehicle type ids to consider");
2149  myTagProperties[currentTag].addAttribute(attrProperty);
2150 
2153  "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
2154  "1.00");
2155  myTagProperties[currentTag].addAttribute(attrProperty);
2156 
2159  "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2160  "1.39");
2161  myTagProperties[currentTag].addAttribute(attrProperty);
2162 
2165  "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
2166  "10.00");
2167  myTagProperties[currentTag].addAttribute(attrProperty);
2168 
2171  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2172  "0");
2173  myTagProperties[currentTag].addAttribute(attrProperty);
2174  }
2175  currentTag = SUMO_TAG_E2DETECTOR_MULTILANE;
2176  {
2177  // set values of tag
2179  // set "file" as deprecated attribute
2180  myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_CONT);
2181  // set values of attributes
2182  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2184  "The id of Multilane E2");
2185  myTagProperties[currentTag].addAttribute(attrProperty);
2186 
2187  attrProperty = AttributeProperties(SUMO_ATTR_LANES,
2189  "The list of secuencial lane ids in which the detector shall be laid on");
2190  myTagProperties[currentTag].addAttribute(attrProperty);
2191 
2192  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2194  "The position on the lane the detector shall be laid on in meters");
2195  myTagProperties[currentTag].addAttribute(attrProperty);
2196 
2197  attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS,
2199  "The end position on the lane the detector shall be laid on in meters");
2200  myTagProperties[currentTag].addAttribute(attrProperty);
2201 
2204  "The aggregation period the values the detector collects shall be summed up",
2205  "900.00");
2206  myTagProperties[currentTag].addAttribute(attrProperty);
2207 
2208  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2210  "Name of " + toString(currentTag));
2211  myTagProperties[currentTag].addAttribute(attrProperty);
2212 
2213  attrProperty = AttributeProperties(SUMO_ATTR_FILE,
2215  "The path to the output file");
2216  myTagProperties[currentTag].addAttribute(attrProperty);
2217 
2218  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
2220  "Space separated list of vehicle type ids to consider");
2221  myTagProperties[currentTag].addAttribute(attrProperty);
2222 
2225  "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting)",
2226  "1.00");
2227  myTagProperties[currentTag].addAttribute(attrProperty);
2228 
2231  "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2232  "1.39");
2233  myTagProperties[currentTag].addAttribute(attrProperty);
2234 
2237  "The minimum distance to the next standing vehicle in order to make this vehicle count as a participant to the jam) in m",
2238  "10.00");
2239  myTagProperties[currentTag].addAttribute(attrProperty);
2240 
2243  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2244  "0");
2245  myTagProperties[currentTag].addAttribute(attrProperty);
2246 
2247  }
2248  currentTag = SUMO_TAG_E3DETECTOR;
2249  {
2250  // set values of tag
2252  // set values of attributes
2253  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2255  "The id of E3");
2256  myTagProperties[currentTag].addAttribute(attrProperty);
2257 
2258  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2260  "X-Y position of detector in editor (Only used in NETEDIT)",
2261  "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
2262  myTagProperties[currentTag].addAttribute(attrProperty);
2263 
2266  "The aggregation period the values the detector collects shall be summed up",
2267  "900.00");
2268  myTagProperties[currentTag].addAttribute(attrProperty);
2269 
2270  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2272  "Name of " + toString(currentTag));
2273  myTagProperties[currentTag].addAttribute(attrProperty);
2274 
2275  attrProperty = AttributeProperties(SUMO_ATTR_FILE,
2277  "The path to the output file");
2278  myTagProperties[currentTag].addAttribute(attrProperty);
2279 
2280  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
2282  "Space separated list of vehicle type ids to consider");
2283  myTagProperties[currentTag].addAttribute(attrProperty);
2284 
2287  "The time-based threshold that describes how much time has to pass until a vehicle is recognized as halting) in s",
2288  "1.00");
2289  myTagProperties[currentTag].addAttribute(attrProperty);
2290 
2293  "The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting) in m/s",
2294  "1.39");
2295  myTagProperties[currentTag].addAttribute(attrProperty);
2296  }
2297  currentTag = SUMO_TAG_DET_ENTRY;
2298  {
2299  // set values of tag
2301  // set values of attributes
2302  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2304  "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2305  myTagProperties[currentTag].addAttribute(attrProperty);
2306 
2307  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2309  "The position on the lane the detector shall be laid on in meters");
2310  myTagProperties[currentTag].addAttribute(attrProperty);
2311 
2314  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2315  "0");
2316  myTagProperties[currentTag].addAttribute(attrProperty);
2317 
2318  }
2319  currentTag = SUMO_TAG_DET_EXIT;
2320  {
2321  // set values of tag
2323  // set values of attributes
2324  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2326  "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2327  myTagProperties[currentTag].addAttribute(attrProperty);
2328 
2329  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2331  "The position on the lane the detector shall be laid on in meters");
2332  myTagProperties[currentTag].addAttribute(attrProperty);
2333 
2336  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2337  "0");
2338  myTagProperties[currentTag].addAttribute(attrProperty);
2339 
2340  }
2341  currentTag = SUMO_TAG_INSTANT_INDUCTION_LOOP;
2342  {
2343  // set values of tag
2345  // set values of attributes
2346  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2348  "The id of Instant Induction Loop (E1Instant)");
2349  myTagProperties[currentTag].addAttribute(attrProperty);
2350 
2351  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2353  "The id of the lane the detector shall be laid on. The lane must be a part of the network used");
2354  myTagProperties[currentTag].addAttribute(attrProperty);
2355 
2356  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2358  "The position on the lane the detector shall be laid on in meters. The position must be a value between -1*lane's length and the lane's length");
2359  myTagProperties[currentTag].addAttribute(attrProperty);
2360 
2361  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2363  "Name of " + toString(currentTag));
2364  myTagProperties[currentTag].addAttribute(attrProperty);
2365 
2366  attrProperty = AttributeProperties(SUMO_ATTR_FILE,
2368  "The path to the output file");
2369  myTagProperties[currentTag].addAttribute(attrProperty);
2370 
2371  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
2373  "Space separated list of vehicle type ids to consider");
2374  myTagProperties[currentTag].addAttribute(attrProperty);
2375 
2378  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
2379  "0");
2380  myTagProperties[currentTag].addAttribute(attrProperty);
2381 
2382  }
2383  currentTag = SUMO_TAG_VSS;
2384  {
2385  // set values of tag
2387  // set "file" as deprecated attribute
2388  myTagProperties[currentTag].addDeprecatedAttribute(SUMO_ATTR_FILE);
2389  // set values of attributes
2390  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2392  "The id of Variable Speed Signal");
2393  myTagProperties[currentTag].addAttribute(attrProperty);
2394 
2395  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2397  "X-Y position of detector in editor (Only used in NETEDIT)",
2398  "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
2399  myTagProperties[currentTag].addAttribute(attrProperty);
2400 
2401  attrProperty = AttributeProperties(SUMO_ATTR_LANES,
2403  "list of lanes of Variable Speed Sign");
2404  myTagProperties[currentTag].addAttribute(attrProperty);
2405 
2406  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2408  "Name of " + toString(currentTag));
2409  myTagProperties[currentTag].addAttribute(attrProperty);
2410  }
2411  currentTag = SUMO_TAG_STEP;
2412  {
2413  // set values of tag
2415  // set values of attributes
2416  attrProperty = AttributeProperties(SUMO_ATTR_TIME,
2418  "Time");
2419  myTagProperties[currentTag].addAttribute(attrProperty);
2420 
2421  attrProperty = AttributeProperties(SUMO_ATTR_SPEED,
2423  "Speed",
2424  "13.89");
2425  myTagProperties[currentTag].addAttribute(attrProperty);
2426  }
2427  currentTag = SUMO_TAG_CALIBRATOR;
2428  {
2429  // set values of tag
2431  // set values of attributes
2432  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2434  "The id of Calibrator");
2435  myTagProperties[currentTag].addAttribute(attrProperty);
2436 
2437  attrProperty = AttributeProperties(SUMO_ATTR_EDGE,
2439  "The id of edge in the simulation network");
2440  myTagProperties[currentTag].addAttribute(attrProperty);
2441 
2442  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2444  "The position of the calibrator on the specified lane",
2445  "0");
2446  myTagProperties[currentTag].addAttribute(attrProperty);
2447 
2450  "The aggregation interval in which to calibrate the flows. Default is step-length",
2451  "1.00");
2452  myTagProperties[currentTag].addAttribute(attrProperty);
2453 
2454  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2456  "Name of " + toString(currentTag));
2457  myTagProperties[currentTag].addAttribute(attrProperty);
2458 
2461  "The id of the routeProbe element from which to determine the route distribution for generated vehicles");
2462  myTagProperties[currentTag].addAttribute(attrProperty);
2463 
2464  attrProperty = AttributeProperties(SUMO_ATTR_OUTPUT,
2466  "The output file for writing calibrator information or NULL");
2467  myTagProperties[currentTag].addAttribute(attrProperty);
2468  }
2469  currentTag = SUMO_TAG_LANECALIBRATOR;
2470  {
2471  // set values of tag
2473  // set values of attributes
2474  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2476  "The id of Calibrator");
2477  myTagProperties[currentTag].addAttribute(attrProperty);
2478 
2479  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2481  "The id of lane in the simulation network");
2482  myTagProperties[currentTag].addAttribute(attrProperty);
2483 
2484  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2486  "The position of the calibrator on the specified lane",
2487  "0");
2488  myTagProperties[currentTag].addAttribute(attrProperty);
2489 
2492  "The aggregation interval in which to calibrate the flows. Default is step-length",
2493  "100.00");
2494  myTagProperties[currentTag].addAttribute(attrProperty);
2495 
2496  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2498  "Name of " + toString(currentTag));
2499  myTagProperties[currentTag].addAttribute(attrProperty);
2500 
2503  "The id of the routeProbe element from which to determine the route distribution for generated vehicles");
2504  myTagProperties[currentTag].addAttribute(attrProperty);
2505 
2506  attrProperty = AttributeProperties(SUMO_ATTR_OUTPUT,
2508  "The output file for writing calibrator information or NULL");
2509  myTagProperties[currentTag].addAttribute(attrProperty);
2510  }
2511  currentTag = SUMO_TAG_FLOW_CALIBRATOR;
2512  {
2513  // set values of tag
2515  // set values of attributes
2516  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
2518  "The id of the vehicle type to use for this " + toString(currentTag),
2520  myTagProperties[currentTag].addAttribute(attrProperty);
2521 
2522  attrProperty = AttributeProperties(SUMO_ATTR_ROUTE,
2524  "The id of the route the vehicle shall drive along");
2525  myTagProperties[currentTag].addAttribute(attrProperty);
2526 
2527  // fill common vehicle attributes
2528  fillCommonVehicleAttributes(currentTag);
2529 
2530  attrProperty = AttributeProperties(SUMO_ATTR_BEGIN,
2532  "First " + toString(currentTag) + " departure time",
2533  "0.00");
2534  myTagProperties[currentTag].addAttribute(attrProperty);
2535 
2536  attrProperty = AttributeProperties(SUMO_ATTR_END,
2538  "End of departure interval",
2539  "3600.00");
2540  myTagProperties[currentTag].addAttribute(attrProperty);
2541 
2544  "Number of " + toString(currentTag) + "s per hour, equally spaced");
2545  myTagProperties[currentTag].addAttribute(attrProperty);
2546 
2547  attrProperty = AttributeProperties(SUMO_ATTR_SPEED,
2549  "Speed of " + toString(currentTag) + "s");
2550  myTagProperties[currentTag].addAttribute(attrProperty);
2551  }
2552  currentTag = SUMO_TAG_REROUTER;
2553  {
2554  // set values of tag
2556  // set values of attributes
2557  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2559  "The id of Rerouter");
2560  myTagProperties[currentTag].addAttribute(attrProperty);
2561 
2562  attrProperty = AttributeProperties(SUMO_ATTR_EDGES,
2564  "An edge id or a list of edge ids where vehicles shall be rerouted");
2565  myTagProperties[currentTag].addAttribute(attrProperty);
2566 
2567  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2569  "X,Y position in editor (Only used in NETEDIT)",
2570  "0,0"); // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
2571  myTagProperties[currentTag].addAttribute(attrProperty);
2572 
2573  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2575  "Name of " + toString(currentTag));
2576  myTagProperties[currentTag].addAttribute(attrProperty);
2577 
2578  attrProperty = AttributeProperties(SUMO_ATTR_FILE,
2580  "The path to the definition file (alternatively, the intervals may defined as children of the rerouter)");
2581  myTagProperties[currentTag].addAttribute(attrProperty);
2582 
2583  attrProperty = AttributeProperties(SUMO_ATTR_PROB,
2585  "The probability for vehicle rerouting (0-1)",
2586  "1.00");
2587  myTagProperties[currentTag].addAttribute(attrProperty);
2588 
2591  "The waiting time threshold (in s) that must be reached to activate rerouting (default -1 which disables the threshold)",
2592  "0.00");
2593  myTagProperties[currentTag].addAttribute(attrProperty);
2594 
2595  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
2597  "The list of vehicle types that shall be affected by this rerouter (empty to affect all types)");
2598  myTagProperties[currentTag].addAttribute(attrProperty);
2599 
2600  attrProperty = AttributeProperties(SUMO_ATTR_OFF,
2602  "Whether the router should be inactive initially (and switched on in the gui)",
2603  "0");
2604  myTagProperties[currentTag].addAttribute(attrProperty);
2605  }
2606  currentTag = SUMO_TAG_INTERVAL;
2607  {
2608  // set values of tag
2610  // set values of attributes
2611  attrProperty = AttributeProperties(SUMO_ATTR_BEGIN,
2613  "Begin",
2614  "0");
2615  myTagProperties[currentTag].addAttribute(attrProperty);
2616 
2617  attrProperty = AttributeProperties(SUMO_ATTR_END,
2619  "End",
2620  "3600.00");
2621  myTagProperties[currentTag].addAttribute(attrProperty);
2622  }
2623  currentTag = SUMO_TAG_CLOSING_REROUTE;
2624  {
2625  // set values of tag
2627  // set values of attributes
2628  attrProperty = AttributeProperties(SUMO_ATTR_EDGE,
2630  "Edge ID");
2631  attrProperty.setSynonym(SUMO_ATTR_ID);
2632  myTagProperties[currentTag].addAttribute(attrProperty);
2633 
2634  attrProperty = AttributeProperties(SUMO_ATTR_ALLOW,
2636  "allowed vehicles");
2637  myTagProperties[currentTag].addAttribute(attrProperty);
2638 
2639  attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW,
2641  "disallowed vehicles");
2642  myTagProperties[currentTag].addAttribute(attrProperty);
2643  }
2644  currentTag = SUMO_TAG_CLOSING_LANE_REROUTE;
2645  {
2646  // set values of tag
2648  // set values of attributes
2649  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2651  "Lane ID");
2652  attrProperty.setSynonym(SUMO_ATTR_ID);
2653  myTagProperties[currentTag].addAttribute(attrProperty);
2654 
2655  attrProperty = AttributeProperties(SUMO_ATTR_ALLOW,
2657  "allowed vehicles");
2658  myTagProperties[currentTag].addAttribute(attrProperty);
2659 
2660  attrProperty = AttributeProperties(SUMO_ATTR_DISALLOW,
2662  "disallowed vehicles");
2663  myTagProperties[currentTag].addAttribute(attrProperty);
2664  }
2665  currentTag = SUMO_TAG_DEST_PROB_REROUTE;
2666  {
2667  // set values of tag
2669  // set values of attributes
2670  attrProperty = AttributeProperties(SUMO_ATTR_EDGE,
2672  "Edge ID");
2673  attrProperty.setSynonym(SUMO_ATTR_ID);
2674  myTagProperties[currentTag].addAttribute(attrProperty);
2675 
2676  attrProperty = AttributeProperties(SUMO_ATTR_PROB,
2678  "SUMO Probability",
2679  "1.00");
2680  myTagProperties[currentTag].addAttribute(attrProperty);
2681  }
2682  currentTag = SUMO_TAG_PARKING_ZONE_REROUTE;
2683  {
2684  // set values of tag
2686  // set values of attributes
2687  attrProperty = AttributeProperties(SUMO_ATTR_PARKING,
2689  "ParkingArea ID");
2690  attrProperty.setSynonym(SUMO_ATTR_ID);
2691  myTagProperties[currentTag].addAttribute(attrProperty);
2692 
2693  attrProperty = AttributeProperties(SUMO_ATTR_PROB,
2695  "SUMO Probability",
2696  "1.00");
2697  myTagProperties[currentTag].addAttribute(attrProperty);
2698 
2699  attrProperty = AttributeProperties(SUMO_ATTR_VISIBLE,
2701  "Enable or disable visibility for parking area reroutes",
2702  "1");
2703  myTagProperties[currentTag].addAttribute(attrProperty);
2704  }
2705  currentTag = SUMO_TAG_ROUTE_PROB_REROUTE;
2706  {
2707  // set values of tag
2709  // set values of attributes
2710  attrProperty = AttributeProperties(SUMO_ATTR_ROUTE,
2712  "Route");
2713  attrProperty.setSynonym(SUMO_ATTR_ID);
2714  myTagProperties[currentTag].addAttribute(attrProperty);
2715 
2716  attrProperty = AttributeProperties(SUMO_ATTR_PROB,
2718  "SUMO Probability",
2719  "1.00");
2720  myTagProperties[currentTag].addAttribute(attrProperty);
2721  }
2722  currentTag = SUMO_TAG_ROUTEPROBE;
2723  {
2724  // set values of tag
2726  // set values of attributes
2727  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2729  "The id of RouteProbe");
2730  myTagProperties[currentTag].addAttribute(attrProperty);
2731 
2732  attrProperty = AttributeProperties(SUMO_ATTR_EDGE,
2734  "The id of an edge in the simulation network");
2735  myTagProperties[currentTag].addAttribute(attrProperty);
2736 
2739  "The frequency in which to report the distribution",
2740  "3600");
2741  myTagProperties[currentTag].addAttribute(attrProperty);
2742 
2743  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2745  "Name of " + toString(currentTag));
2746  myTagProperties[currentTag].addAttribute(attrProperty);
2747 
2748  attrProperty = AttributeProperties(SUMO_ATTR_FILE,
2750  "The file for generated output");
2751  myTagProperties[currentTag].addAttribute(attrProperty);
2752 
2753  attrProperty = AttributeProperties(SUMO_ATTR_BEGIN,
2755  "The time at which to start generating output",
2756  "0");
2757  myTagProperties[currentTag].addAttribute(attrProperty);
2758  }
2759  currentTag = SUMO_TAG_VAPORIZER;
2760  {
2761  // set values of tag
2763  // set values of attributes
2764  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2766  "Edge in which vaporizer is placed");
2767  myTagProperties[currentTag].addAttribute(attrProperty);
2768 
2769  attrProperty = AttributeProperties(SUMO_ATTR_BEGIN,
2771  "Start Time",
2772  "0");
2773  myTagProperties[currentTag].addAttribute(attrProperty);
2774 
2775  attrProperty = AttributeProperties(SUMO_ATTR_END,
2777  "End Time",
2778  "3600.00");
2779  myTagProperties[currentTag].addAttribute(attrProperty);
2780 
2781  attrProperty = AttributeProperties(SUMO_ATTR_NAME,
2783  "Name of " + toString(currentTag));
2784  myTagProperties[currentTag].addAttribute(attrProperty);
2785  }
2786  currentTag = SUMO_TAG_TAZ;
2787  {
2788  // set values of tag
2790  // set values of attributes
2791  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2793  "The id of the TAZ");
2794  myTagProperties[currentTag].addAttribute(attrProperty);
2795 
2796  attrProperty = AttributeProperties(SUMO_ATTR_SHAPE,
2798  "The shape of the TAZ");
2799  myTagProperties[currentTag].addAttribute(attrProperty);
2800 
2801  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
2803  "The RGBA color with which the TAZ shall be displayed",
2804  "red");
2805  myTagProperties[currentTag].addAttribute(attrProperty);
2806  }
2807  currentTag = SUMO_TAG_TAZSOURCE;
2808  {
2809  // set values of tag
2811  // set values of attributes
2812  attrProperty = AttributeProperties(SUMO_ATTR_EDGE,
2814  "The id of edge in the simulation network");
2815  attrProperty.setSynonym(SUMO_ATTR_ID);
2816  myTagProperties[currentTag].addAttribute(attrProperty);
2817 
2818  attrProperty = AttributeProperties(SUMO_ATTR_WEIGHT,
2820  "Depart weight associated to this Edge",
2821  "1");
2822  myTagProperties[currentTag].addAttribute(attrProperty);
2823  }
2824  currentTag = SUMO_TAG_TAZSINK;
2825  {
2826  // set values of tag
2828  // set values of attributes
2829  attrProperty = AttributeProperties(SUMO_ATTR_EDGE,
2831  "The id of edge in the simulation network");
2832  attrProperty.setSynonym(SUMO_ATTR_ID);
2833  myTagProperties[currentTag].addAttribute(attrProperty);
2834 
2835  attrProperty = AttributeProperties(SUMO_ATTR_WEIGHT,
2837  "Arrival weight associated to this Edget",
2838  "1");
2839  myTagProperties[currentTag].addAttribute(attrProperty);
2840  }
2841 }
2842 
2843 
2844 void
2846  // declare empty AttributeProperties
2847  AttributeProperties attrProperty;
2848  // fill shape ACs
2849  SumoXMLTag currentTag = SUMO_TAG_POLY;
2850  {
2851  // set values of tag
2853  // set values of attributes
2854  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2856  "The id of the polygon");
2857  myTagProperties[currentTag].addAttribute(attrProperty);
2858 
2859  attrProperty = AttributeProperties(SUMO_ATTR_SHAPE,
2861  "The shape of the polygon");
2862  myTagProperties[currentTag].addAttribute(attrProperty);
2863 
2864  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
2866  "The RGBA color with which the polygon shall be displayed",
2867  "red");
2868  myTagProperties[currentTag].addAttribute(attrProperty);
2869 
2870  attrProperty = AttributeProperties(SUMO_ATTR_FILL,
2872  "An information whether the polygon shall be filled",
2873  "0");
2874  myTagProperties[currentTag].addAttribute(attrProperty);
2875 
2878  "The default line width for drawing an unfilled polygon",
2879  "1");
2880  myTagProperties[currentTag].addAttribute(attrProperty);
2881 
2882  attrProperty = AttributeProperties(SUMO_ATTR_LAYER,
2884  "The layer in which the polygon lies",
2886  myTagProperties[currentTag].addAttribute(attrProperty);
2887 
2888  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
2890  "A typename for the polygon",
2892  myTagProperties[currentTag].addAttribute(attrProperty);
2893 
2894  attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE,
2896  "A bitmap to use for rendering this polygon",
2898  myTagProperties[currentTag].addAttribute(attrProperty);
2899 
2902  "Enable or disable use image file as a relative path",
2904  myTagProperties[currentTag].addAttribute(attrProperty);
2905 
2906  attrProperty = AttributeProperties(SUMO_ATTR_ANGLE,
2908  "Angle of rendered image in degree",
2910  myTagProperties[currentTag].addAttribute(attrProperty);
2911  }
2912  currentTag = SUMO_TAG_POI;
2913  {
2914  // set values of tag
2916  // set values of attributes
2917  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2919  "The id of the POI");
2920  myTagProperties[currentTag].addAttribute(attrProperty);
2921 
2922  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2923  ATTRPROPERTY_STRING | ATTRPROPERTY_POSITION | ATTRPROPERTY_UNIQUE | ATTRPROPERTY_UPDATEGEOMETRY, // virtual attribute from the combination of the actually attributes SUMO_ATTR_X, SUMO_ATTR_Y
2924  "The position in view");
2925  myTagProperties[currentTag].addAttribute(attrProperty);
2926 
2927  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
2929  "The color with which the poi shall be displayed",
2930  "red");
2931  myTagProperties[currentTag].addAttribute(attrProperty);
2932 
2933  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
2935  "A typename for the poi",
2937  myTagProperties[currentTag].addAttribute(attrProperty);
2938 
2939  attrProperty = AttributeProperties(SUMO_ATTR_LAYER,
2941  "The layer of the poi for drawing and selecting",
2943  myTagProperties[currentTag].addAttribute(attrProperty);
2944 
2945  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
2947  "Width of rendered image in meters",
2949  myTagProperties[currentTag].addAttribute(attrProperty);
2950 
2951  attrProperty = AttributeProperties(SUMO_ATTR_HEIGHT,
2953  "Height of rendered image in meters",
2955  myTagProperties[currentTag].addAttribute(attrProperty);
2956 
2957  attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE,
2959  "A bitmap to use for rendering this poi",
2961  myTagProperties[currentTag].addAttribute(attrProperty);
2962 
2965  "Enable or disable use image file as a relative path",
2967  myTagProperties[currentTag].addAttribute(attrProperty);
2968 
2969  attrProperty = AttributeProperties(SUMO_ATTR_ANGLE,
2971  "Angle of rendered image in degree",
2973  myTagProperties[currentTag].addAttribute(attrProperty);
2974  }
2975  currentTag = SUMO_TAG_POILANE;
2976  {
2977  // set values of tag
2979  // set values of attributes
2980  attrProperty = AttributeProperties(SUMO_ATTR_ID,
2982  "The id of the POI");
2983  myTagProperties[currentTag].addAttribute(attrProperty);
2984 
2985  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
2987  "The name of the lane the poi is located at");
2988  myTagProperties[currentTag].addAttribute(attrProperty);
2989 
2990  attrProperty = AttributeProperties(SUMO_ATTR_POSITION,
2992  "The position on the named lane or in the net in meters at which the poi is located at");
2993  myTagProperties[currentTag].addAttribute(attrProperty);
2994 
2997  "The lateral offset on the named lane at which the poi is located at",
2998  "0.00");
2999  myTagProperties[currentTag].addAttribute(attrProperty);
3000 
3001  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
3003  "The color with which the poi shall be displayed",
3004  "red");
3005  myTagProperties[currentTag].addAttribute(attrProperty);
3006 
3007  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
3009  "A typename for the poi",
3011  myTagProperties[currentTag].addAttribute(attrProperty);
3012 
3013  attrProperty = AttributeProperties(SUMO_ATTR_LAYER,
3015  "The layer of the poi for drawing and selecting",
3017  myTagProperties[currentTag].addAttribute(attrProperty);
3018 
3019  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
3021  "Width of rendered image in meters",
3023  myTagProperties[currentTag].addAttribute(attrProperty);
3024 
3025  attrProperty = AttributeProperties(SUMO_ATTR_HEIGHT,
3027  "Height of rendered image in meters",
3029  myTagProperties[currentTag].addAttribute(attrProperty);
3030 
3031  attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE,
3033  "A bitmap to use for rendering this poi",
3035  myTagProperties[currentTag].addAttribute(attrProperty);
3036 
3039  "Enable or disable use image file as a relative path",
3041  myTagProperties[currentTag].addAttribute(attrProperty);
3042 
3043  attrProperty = AttributeProperties(SUMO_ATTR_ANGLE,
3045  "Angle of rendered image in degree",
3047  myTagProperties[currentTag].addAttribute(attrProperty);
3048  }
3049 }
3050 
3051 
3052 void
3054  // first VClass separate between vehicles and persons
3055  std::vector<std::string> vClassesVehicles, vClassesPersons;
3056  auto vClasses = SumoVehicleClassStrings.getStrings();
3057  for (const auto& i : vClasses) {
3058  if (i == SumoVehicleClassStrings.getString(SVC_PEDESTRIAN)) {
3059  vClassesPersons.push_back(i);
3060  } else {
3061  vClassesVehicles.push_back(i);
3062  }
3063  }
3064  // declare empty AttributeProperties
3065  AttributeProperties attrProperty;
3066 
3067  // fill demand elements
3068  SumoXMLTag currentTag = SUMO_TAG_ROUTE;
3069  {
3070  // set values of tag
3072 
3073  // set values of attributes
3074  attrProperty = AttributeProperties(SUMO_ATTR_ID,
3076  "The id of Route");
3077  myTagProperties[currentTag].addAttribute(attrProperty);
3078 
3079  attrProperty = AttributeProperties(SUMO_ATTR_EDGES,
3081  "The edges the vehicle shall drive along, given as their ids, separated using spaces");
3082  myTagProperties[currentTag].addAttribute(attrProperty);
3083 
3084  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
3086  "This route's color",
3087  "yellow");
3088  myTagProperties[currentTag].addAttribute(attrProperty);
3089  }
3090  currentTag = SUMO_TAG_EMBEDDEDROUTE;
3091  {
3092  // set values of tag
3094 
3095  // set values of attributes
3096  attrProperty = AttributeProperties(SUMO_ATTR_EDGES,
3098  "The edges the vehicle shall drive along, given as their ids, separated using spaces");
3099  myTagProperties[currentTag].addAttribute(attrProperty);
3100 
3101  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
3103  "This route's color",
3104  "yellow");
3105  myTagProperties[currentTag].addAttribute(attrProperty);
3106  }
3107  currentTag = SUMO_TAG_VTYPE;
3108  {
3109  // set values of tag
3111 
3112  // set values of attributes
3113  attrProperty = AttributeProperties(SUMO_ATTR_ID,
3115  "The id of VehicleType");
3116  myTagProperties[currentTag].addAttribute(attrProperty);
3117 
3118  attrProperty = AttributeProperties(SUMO_ATTR_VCLASS,
3120  "An abstract vehicle class",
3121  "passenger");
3122  attrProperty.setDiscreteValues(vClassesVehicles);
3123  myTagProperties[currentTag].addAttribute(attrProperty);
3124 
3125  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
3127  "This vehicle type's color",
3128  "");
3129  myTagProperties[currentTag].addAttribute(attrProperty);
3130 
3131  attrProperty = AttributeProperties(SUMO_ATTR_LENGTH,
3133  "The vehicle's netto-length (length) [m]");
3134  myTagProperties[currentTag].addAttribute(attrProperty);
3135 
3136  attrProperty = AttributeProperties(SUMO_ATTR_MINGAP,
3138  "Empty space after leader [m]");
3139  myTagProperties[currentTag].addAttribute(attrProperty);
3140 
3141  attrProperty = AttributeProperties(SUMO_ATTR_MAXSPEED,
3143  "The vehicle's maximum velocity [m/s]");
3144  myTagProperties[currentTag].addAttribute(attrProperty);
3145 
3148  "The vehicles expected multiplicator for lane speed limits");
3149  myTagProperties[currentTag].addAttribute(attrProperty);
3150 
3151  attrProperty = AttributeProperties(SUMO_ATTR_SPEEDDEV,
3153  "The deviation of the speedFactor");
3154  myTagProperties[currentTag].addAttribute(attrProperty);
3155 
3158  "An abstract emission class");
3160  myTagProperties[currentTag].addAttribute(attrProperty);
3161 
3162  attrProperty = AttributeProperties(SUMO_ATTR_GUISHAPE,
3164  "How this vehicle is rendered");
3165  attrProperty.setDiscreteValues(SumoVehicleShapeStrings.getStrings());
3166  myTagProperties[currentTag].addAttribute(attrProperty);
3167 
3168  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
3170  "The vehicle's width [m] (only used for drawing)",
3171  "1.8");
3172  myTagProperties[currentTag].addAttribute(attrProperty);
3173 
3174  attrProperty = AttributeProperties(SUMO_ATTR_HEIGHT,
3176  "The vehicle's height [m] (only used for drawing)",
3177  "1.5");
3178  myTagProperties[currentTag].addAttribute(attrProperty);
3179 
3180  attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE,
3182  "Image file for rendering vehicles of this type (should be grayscale to allow functional coloring)");
3183  myTagProperties[currentTag].addAttribute(attrProperty);
3184 
3187  "The model used for changing lanes",
3188  "default");
3189  attrProperty.setDiscreteValues(SUMOXMLDefinitions::LaneChangeModels.getStrings());
3190  myTagProperties[currentTag].addAttribute(attrProperty);
3191 
3194  "The model used for car following",
3195  "Krauss");
3196  attrProperty.setDiscreteValues(SUMOXMLDefinitions::CarFollowModels.getStrings());
3197  myTagProperties[currentTag].addAttribute(attrProperty);
3198 
3201  "The number of persons (excluding an autonomous driver) the vehicle can transport");
3202  myTagProperties[currentTag].addAttribute(attrProperty);
3203 
3206  "The number of containers the vehicle can transport");
3207  myTagProperties[currentTag].addAttribute(attrProperty);
3208 
3211  "The time required by a person to board the vehicle",
3212  "0.50");
3213  myTagProperties[currentTag].addAttribute(attrProperty);
3214 
3217  "The time required to load a container onto the vehicle",
3218  "90.00");
3219  myTagProperties[currentTag].addAttribute(attrProperty);
3220 
3223  "The preferred lateral alignment when using the sublane-model",
3224  "center");
3225  attrProperty.setDiscreteValues(SUMOXMLDefinitions::LateralAlignments.getStrings());
3226  myTagProperties[currentTag].addAttribute(attrProperty);
3227 
3230  "The minimum lateral gap at a speed difference of 50km/h when using the sublane-model",
3231  "0.12");
3232  myTagProperties[currentTag].addAttribute(attrProperty);
3233 
3236  "The maximum lateral speed when using the sublane-model",
3237  "1.00");
3238  myTagProperties[currentTag].addAttribute(attrProperty);
3239 
3242  "The interval length for which vehicle performs its decision logic (acceleration and lane-changing)",
3243  toString(OptionsCont::getOptions().getFloat("default.action-step-length")));
3244  myTagProperties[currentTag].addAttribute(attrProperty);
3245 
3246  attrProperty = AttributeProperties(SUMO_ATTR_PROB,
3248  "The probability when being added to a distribution without an explicit probability",
3250  myTagProperties[currentTag].addAttribute(attrProperty);
3251 
3254  "Whether vehicles of this type are equipped with a driver (i.e. MSDriverState))",
3255  "0");
3256  myTagProperties[currentTag].addAttribute(attrProperty);
3257 
3258  attrProperty = AttributeProperties(SUMO_ATTR_OSGFILE,
3260  "3D model file for this class",
3261  "");
3262  myTagProperties[currentTag].addAttribute(attrProperty);
3263 
3266  "Carriage lengths");
3267  myTagProperties[currentTag].addAttribute(attrProperty);
3268 
3271  "Locomotive lengths");
3272  myTagProperties[currentTag].addAttribute(attrProperty);
3273 
3276  "GAP between carriages",
3277  "1");
3278  myTagProperties[currentTag].addAttribute(attrProperty);
3279 
3280  // fill VType Car Following Model Values (implemented in a separated function to improve code legibility)
3281  fillCarFollowingModelAttributes(currentTag);
3282 
3283  // fill VType Junction Model Parameters (implemented in a separated function to improve code legibility)
3284  fillJunctionModelAttributes(currentTag);
3285 
3286  // fill VType Lane Change Model Parameters (implemented in a separated function to improve code legibility)
3287  fillLaneChangingModelAttributes(currentTag);
3288  }
3289  currentTag = SUMO_TAG_PTYPE;
3290  {
3291  // set values of tag
3293 
3294  // set values of attributes
3295  attrProperty = AttributeProperties(SUMO_ATTR_ID,
3297  "The id of PersonType");
3298  myTagProperties[currentTag].addAttribute(attrProperty);
3299 
3300  attrProperty = AttributeProperties(SUMO_ATTR_VCLASS,
3302  "An abstract person class",
3303  "pedestrian");
3304  attrProperty.setDiscreteValues(vClassesPersons);
3305  myTagProperties[currentTag].addAttribute(attrProperty);
3306 
3307  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
3309  "This person type's color",
3310  "");
3311  myTagProperties[currentTag].addAttribute(attrProperty);
3312 
3313  attrProperty = AttributeProperties(SUMO_ATTR_WIDTH,
3315  "The person's width [m] (only used for drawing)");
3316  myTagProperties[currentTag].addAttribute(attrProperty);
3317 
3318  attrProperty = AttributeProperties(SUMO_ATTR_LENGTH,
3320  "The person's netto-length (length) [m]");
3321  myTagProperties[currentTag].addAttribute(attrProperty);
3322 
3323  attrProperty = AttributeProperties(SUMO_ATTR_MINGAP,
3325  "Empty space after leader [m]");
3326  myTagProperties[currentTag].addAttribute(attrProperty);
3327 
3328  attrProperty = AttributeProperties(SUMO_ATTR_MAXSPEED,
3330  "The person's maximum velocity [m/s]");
3331  myTagProperties[currentTag].addAttribute(attrProperty);
3332 
3335  "This value causes persons to violate a red light if the duration of the red phase is lower than the given threshold.",
3336  "-1");
3337  myTagProperties[currentTag].addAttribute(attrProperty);
3338 
3339  attrProperty = AttributeProperties(SUMO_ATTR_IMGFILE,
3341  "Image file for rendering persons of this type (should be grayscale to allow functional coloring)");
3342  myTagProperties[currentTag].addAttribute(attrProperty);
3343  }
3344 }
3345 
3346 
3347 void
3349  // declare empty AttributeProperties
3350  AttributeProperties attrProperty;
3351  // fill vehicle ACs
3352  SumoXMLTag currentTag = SUMO_TAG_VEHICLE;
3353  {
3354  // set values of tag
3356  // set values of attributes
3357  attrProperty = AttributeProperties(SUMO_ATTR_ID,
3359  "The name of the " + toString(currentTag));
3360  myTagProperties[currentTag].addAttribute(attrProperty);
3361 
3362  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
3364  "The id of the vehicle type to use for this " + toString(currentTag),
3366  myTagProperties[currentTag].addAttribute(attrProperty);
3367 
3368  attrProperty = AttributeProperties(SUMO_ATTR_ROUTE,
3370  "The id of the route the " + toString(currentTag) + " shall drive along");
3371  myTagProperties[currentTag].addAttribute(attrProperty);
3372 
3373  // add common attributes
3374  fillCommonVehicleAttributes(currentTag);
3375 
3376  attrProperty = AttributeProperties(SUMO_ATTR_DEPART,
3378  "The time step at which the " + toString(currentTag) + " shall enter the network",
3379  "0");
3380  myTagProperties[currentTag].addAttribute(attrProperty);
3381  }
3382  currentTag = SUMO_TAG_ROUTEFLOW;
3383  {
3384  // set values of tag
3386  // set values of attributes
3387  attrProperty = AttributeProperties(SUMO_ATTR_ID,
3389  "The name of the " + toString(currentTag));
3390  myTagProperties[currentTag].addAttribute(attrProperty);
3391 
3392  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
3394  "The id of the " + toString(currentTag) + " type to use for this " + toString(currentTag),
3396  myTagProperties[currentTag].addAttribute(attrProperty);
3397 
3398  attrProperty = AttributeProperties(SUMO_ATTR_ROUTE,
3400  "The id of the route the " + toString(currentTag) + " shall drive along");
3401  myTagProperties[currentTag].addAttribute(attrProperty);
3402 
3403  // add common attributes
3404  fillCommonVehicleAttributes(currentTag);
3405 
3406  // add flow attributes
3407  fillCommonFlowAttributes(currentTag);
3408  }
3409  currentTag = SUMO_TAG_TRIP;
3410  {
3411  // set values of tag
3413  // set values of attributes
3414  attrProperty = AttributeProperties(SUMO_ATTR_ID,
3416  "The name of " + toString(currentTag) + "s that will be generated using this trip definition");
3417  myTagProperties[currentTag].addAttribute(attrProperty);
3418 
3419  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
3421  "The id of the " + toString(currentTag) + " type to use for this " + toString(currentTag),
3423  myTagProperties[currentTag].addAttribute(attrProperty);
3424 
3425  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3427  "The name of the edge the " + toString(currentTag) + " starts at");
3428  myTagProperties[currentTag].addAttribute(attrProperty);
3429 
3430  attrProperty = AttributeProperties(SUMO_ATTR_TO,
3432  "The name of the edge the " + toString(currentTag) + " ends at");
3433  myTagProperties[currentTag].addAttribute(attrProperty);
3434 
3435  attrProperty = AttributeProperties(SUMO_ATTR_VIA,
3437  "List of intermediate edge ids which shall be part of the " + toString(currentTag));
3438  myTagProperties[currentTag].addAttribute(attrProperty);
3439 
3440  // add common attributes
3441  fillCommonVehicleAttributes(currentTag);
3442 
3443  attrProperty = AttributeProperties(SUMO_ATTR_DEPART,
3445  "The departure time of the (first) " + toString(currentTag) + " which is generated using this " + toString(currentTag) + " definition",
3446  "0");
3447  myTagProperties[currentTag].addAttribute(attrProperty);
3448  }
3449  currentTag = SUMO_TAG_FLOW;
3450  {
3451  // set values of tag
3453  // set values of attributes
3454  attrProperty = AttributeProperties(SUMO_ATTR_ID,
3456  "The name of the " + toString(currentTag));
3457  myTagProperties[currentTag].addAttribute(attrProperty);
3458 
3459  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
3461  "The id of the " + toString(currentTag) + " type to use for this " + toString(currentTag),
3463  myTagProperties[currentTag].addAttribute(attrProperty);
3464 
3465  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3467  "The name of the edge the " + toString(currentTag) + " starts at");
3468  myTagProperties[currentTag].addAttribute(attrProperty);
3469 
3470  attrProperty = AttributeProperties(SUMO_ATTR_TO,
3472  "The name of the edge the " + toString(currentTag) + " ends at");
3473  myTagProperties[currentTag].addAttribute(attrProperty);
3474 
3475  attrProperty = AttributeProperties(SUMO_ATTR_VIA,
3477  "List of intermediate edge ids which shall be part of the " + toString(currentTag));
3478  myTagProperties[currentTag].addAttribute(attrProperty);
3479 
3480  // add common attributes
3481  fillCommonVehicleAttributes(currentTag);
3482 
3483  // add flow attributes
3484  fillCommonFlowAttributes(currentTag);
3485  }
3486  /* currently disabled. See #5259
3487  currentTag = SUMO_TAG_TRIP_TAZ;
3488  {
3489  // set values of tag
3490  myTagProperties[currentTag] = TagProperties(currentTag, TAGTYPE_DEMANDELEMENT | TAGTYPE_VEHICLE, TAGPROPERTY_DRAWABLE, ICON_TRIP);
3491  }
3492  */
3493 }
3494 
3495 
3496 void
3498  // declare empty AttributeProperties
3499  AttributeProperties attrProperty;
3500  // fill stops ACs
3501  SumoXMLTag currentTag = SUMO_TAG_STOP_LANE;
3502  {
3503  // set values of tag
3505  // set values of attributes
3506  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
3508  "The name of the lane the stop shall be located at");
3509  myTagProperties[currentTag].addAttribute(attrProperty);
3510 
3511  attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS,
3513  "The begin position on the lane (the lower position on the lane) in meters");
3514  myTagProperties[currentTag].addAttribute(attrProperty);
3515 
3516  attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS,
3518  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
3519  myTagProperties[currentTag].addAttribute(attrProperty);
3520 
3523  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
3524  "0");
3525  myTagProperties[currentTag].addAttribute(attrProperty);
3526 
3527  // fill common stop attributes
3528  fillCommonStopAttributes(currentTag);
3529  }
3530  currentTag = SUMO_TAG_STOP_BUSSTOP;
3531  {
3532  // set values of tag
3534  // set values of attributes
3535  attrProperty = AttributeProperties(SUMO_ATTR_BUS_STOP,
3537  "BusStop associated with this stop");
3538  myTagProperties[currentTag].addAttribute(attrProperty);
3539 
3540  // fill common stop attributes
3541  fillCommonStopAttributes(currentTag);
3542  }
3543  currentTag = SUMO_TAG_STOP_CONTAINERSTOP;
3544  {
3545  // set values of tag
3547  // set values of attributes
3550  "ContainerStop associated with this stop");
3551  myTagProperties[currentTag].addAttribute(attrProperty);
3552 
3553  // fill common stop attributes
3554  fillCommonStopAttributes(currentTag);
3555  }
3556  currentTag = SUMO_TAG_STOP_CHARGINGSTATION;
3557  {
3558  // set values of tag
3560  // set values of attributes
3563  "ChargingStation associated with this stop");
3564  myTagProperties[currentTag].addAttribute(attrProperty);
3565 
3566  // fill common stop attributes
3567  fillCommonStopAttributes(currentTag);
3568  }
3569  currentTag = SUMO_TAG_STOP_PARKINGAREA;
3570  {
3571  // set values of tag
3573  // set values of attributes
3576  "ParkingArea associated with this stop");
3577  myTagProperties[currentTag].addAttribute(attrProperty);
3578 
3579  // fill common stop attributes
3580  fillCommonStopAttributes(currentTag);
3581  }
3582 }
3583 
3584 
3585 void
3587  // declare empty AttributeProperties
3588  AttributeProperties attrProperty;
3589  // fill vehicle ACs
3590  SumoXMLTag currentTag = SUMO_TAG_PERSON;
3591  {
3592  // set values of tag
3594 
3595  // add flow attributes
3596  fillCommonPersonAttributes(currentTag);
3597 
3598  // set specific attribute depart (note: Persons doesn't support triggered and containerTriggered values)
3599  attrProperty = AttributeProperties(SUMO_ATTR_DEPART,
3601  "The time step at which the " + toString(currentTag) + " shall enter the network",
3602  "0");
3603  myTagProperties[currentTag].addAttribute(attrProperty);
3604 
3605  }
3606  currentTag = SUMO_TAG_PERSONFLOW;
3607  {
3608  // set values of tag
3610 
3611  // add flow attributes
3612  fillCommonPersonAttributes(currentTag);
3613 
3614  // add flow attributes
3615  fillCommonFlowAttributes(currentTag);
3616  }
3617  currentTag = SUMO_TAG_PERSONTRIP_FROMTO;
3618  {
3619  // set values of tag
3621  // set values of attributes
3622  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3624  "The name of the edge the " + toString(currentTag) + " starts at");
3625  myTagProperties[currentTag].addAttribute(attrProperty);
3626 
3627  attrProperty = AttributeProperties(SUMO_ATTR_TO,
3629  "The name of the edge the " + toString(currentTag) + " ends at");
3630  myTagProperties[currentTag].addAttribute(attrProperty);
3631 
3632  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
3634  "List of possible vehicle types to take");
3635  myTagProperties[currentTag].addAttribute(attrProperty);
3636 
3637  attrProperty = AttributeProperties(SUMO_ATTR_MODES,
3639  "List of possible traffic modes. Walking is always possible regardless of this value");
3640  myTagProperties[currentTag].addAttribute(attrProperty);
3641 
3644  "arrival position on the destination edge",
3645  "-1");
3646  myTagProperties[currentTag].addAttribute(attrProperty);
3647  }
3648  currentTag = SUMO_TAG_PERSONTRIP_BUSSTOP;
3649  {
3650  // set values of tag
3652  // set values of attributes
3653  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3655  "The name of the edge the " + toString(currentTag) + " starts at");
3656  myTagProperties[currentTag].addAttribute(attrProperty);
3657 
3658  attrProperty = AttributeProperties(SUMO_ATTR_BUS_STOP,
3660  "Id of the destination " + toString(SUMO_TAG_BUS_STOP));
3661  myTagProperties[currentTag].addAttribute(attrProperty);
3662 
3663  attrProperty = AttributeProperties(SUMO_ATTR_VTYPES,
3665  "List of possible vehicle types to take");
3666  myTagProperties[currentTag].addAttribute(attrProperty);
3667 
3668  attrProperty = AttributeProperties(SUMO_ATTR_MODES,
3670  "List of possible traffic modes. Walking is always possible regardless of this value");
3671  myTagProperties[currentTag].addAttribute(attrProperty);
3672  }
3673  currentTag = SUMO_TAG_RIDE_FROMTO;
3674  {
3675  // set values of tag
3677  // set values of attributes
3678  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3680  "The name of the edge the " + toString(currentTag) + " starts at");
3681  myTagProperties[currentTag].addAttribute(attrProperty);
3682 
3683  attrProperty = AttributeProperties(SUMO_ATTR_TO,
3685  "The name of the edge the " + toString(currentTag) + " ends at");
3686  myTagProperties[currentTag].addAttribute(attrProperty);
3687 
3688  attrProperty = AttributeProperties(SUMO_ATTR_LINES,
3690  "list of vehicle alternatives to take for the " + toString(currentTag),
3691  "ANY");
3692  myTagProperties[currentTag].addAttribute(attrProperty);
3693 
3696  "arrival position on the destination edge",
3697  "-1");
3698  myTagProperties[currentTag].addAttribute(attrProperty);
3699  }
3700  currentTag = SUMO_TAG_RIDE_BUSSTOP;
3701  {
3702  // set values of tag
3704  // set values of attributes
3705  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3707  "The name of the edge the " + toString(currentTag) + " starts at");
3708  myTagProperties[currentTag].addAttribute(attrProperty);
3709 
3710  attrProperty = AttributeProperties(SUMO_ATTR_BUS_STOP,
3712  "Id of the destination " + toString(SUMO_TAG_BUS_STOP));
3713  myTagProperties[currentTag].addAttribute(attrProperty);
3714 
3715  attrProperty = AttributeProperties(SUMO_ATTR_LINES,
3717  "list of vehicle alternatives to take for the ride",
3718  "ANY");
3719  myTagProperties[currentTag].addAttribute(attrProperty);
3720  }
3721  currentTag = SUMO_TAG_WALK_EDGES;
3722  {
3723  // set values of tag
3725  // set values of attributes
3726  attrProperty = AttributeProperties(SUMO_ATTR_EDGES,
3728  "id of the edges to walk");
3729  myTagProperties[currentTag].addAttribute(attrProperty);
3730 
3733  "Arrival position on the destination edge",
3734  "-1");
3735  myTagProperties[currentTag].addAttribute(attrProperty);
3736  }
3737 
3738  currentTag = SUMO_TAG_WALK_ROUTE;
3739  {
3740  // set values of tag
3742  // set values of attributes
3743  attrProperty = AttributeProperties(SUMO_ATTR_ROUTE,
3745  "The id of the route to walk");
3746  myTagProperties[currentTag].addAttribute(attrProperty);
3747 
3750  "Arrival position on the destination edge",
3751  "-1");
3752  myTagProperties[currentTag].addAttribute(attrProperty);
3753  }
3754  currentTag = SUMO_TAG_WALK_FROMTO;
3755  {
3756  // set values of tag
3758  // set values of attributes
3759  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3761  "Id of the start edge");
3762  myTagProperties[currentTag].addAttribute(attrProperty);
3763 
3764  attrProperty = AttributeProperties(SUMO_ATTR_TO,
3766  "Id of the destination edge");
3767  myTagProperties[currentTag].addAttribute(attrProperty);
3768 
3769  attrProperty = AttributeProperties(SUMO_ATTR_VIA,
3771  "Ids of the intermediate edges");
3772  myTagProperties[currentTag].addAttribute(attrProperty);
3773 
3774 
3777  "Arrival position on the destination edge",
3778  "-1");
3779  myTagProperties[currentTag].addAttribute(attrProperty);
3780  }
3781 
3782  currentTag = SUMO_TAG_WALK_BUSSTOP;
3783  {
3784  // set values of tag
3786  // set values of attributes
3787  attrProperty = AttributeProperties(SUMO_ATTR_FROM,
3789  "Id of the start edge");
3790  myTagProperties[currentTag].addAttribute(attrProperty);
3791 
3792  attrProperty = AttributeProperties(SUMO_ATTR_BUS_STOP,
3794  "Id of the destination " + toString(SUMO_TAG_BUS_STOP));
3795  myTagProperties[currentTag].addAttribute(attrProperty);
3796  }
3797 }
3798 
3799 
3800 void
3802  // declare empty AttributeProperties
3803  AttributeProperties attrProperty;
3804  // fill vehicle ACs
3805  SumoXMLTag currentTag = SUMO_TAG_PERSONSTOP_LANE;
3806  {
3807  // set values of tag
3809  // set values of attributes
3810  attrProperty = AttributeProperties(SUMO_ATTR_LANE,
3812  "The name of the lane the stop shall be located at");
3813  myTagProperties[currentTag].addAttribute(attrProperty);
3814 
3815  attrProperty = AttributeProperties(SUMO_ATTR_STARTPOS,
3817  "The begin position on the lane (the lower position on the lane) in meters");
3818  myTagProperties[currentTag].addAttribute(attrProperty);
3819 
3820  attrProperty = AttributeProperties(SUMO_ATTR_ENDPOS,
3822  "The end position on the lane (the higher position on the lane) in meters, must be larger than startPos by more than 0.1m");
3823  myTagProperties[currentTag].addAttribute(attrProperty);
3824 
3827  "If set, no error will be reported if element is placed behind the lane. Instead,it will be placed 0.1 meters from the lanes end or at position 0.1, if the position was negative and larger than the lanes length after multiplication with - 1",
3828  "0");
3829  myTagProperties[currentTag].addAttribute(attrProperty);
3830 
3831  // fill common stop attributes
3832  fillCommonStopAttributes(currentTag);
3833  }
3834  currentTag = SUMO_TAG_PERSONSTOP_BUSSTOP;
3835  {
3836  // set values of tag
3838  // set values of attributes
3839  attrProperty = AttributeProperties(SUMO_ATTR_BUS_STOP,
3841  "BusStop associated with this stop");
3842  myTagProperties[currentTag].addAttribute(attrProperty);
3843 
3844  // fill common stop attributes
3845  fillCommonStopAttributes(currentTag);
3846  }
3847 }
3848 
3849 
3850 void
3852  // declare empty AttributeProperties
3853  AttributeProperties attrProperty;
3854 
3855  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
3857  "This " + toString(currentTag) + "'s color",
3858  "yellow");
3859  myTagProperties[currentTag].addAttribute(attrProperty);
3860 
3863  "The lane on which the " + toString(currentTag) + " shall be inserted",
3864  "first");
3865  myTagProperties[currentTag].addAttribute(attrProperty);
3866 
3868  ATTRPROPERTY_COMPLEX | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_WRITEXMLOPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */,
3869  "The position at which the " + toString(currentTag) + " shall enter the net",
3870  "base");
3871  myTagProperties[currentTag].addAttribute(attrProperty);
3872 
3874  ATTRPROPERTY_COMPLEX | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_WRITEXMLOPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */,
3875  "The speed with which the " + toString(currentTag) + " shall enter the network",
3876  "0");
3877  myTagProperties[currentTag].addAttribute(attrProperty);
3878 
3880  ATTRPROPERTY_COMPLEX | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_WRITEXMLOPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */,
3881  "The lane at which the " + toString(currentTag) + " shall leave the network",
3882  "current");
3883  myTagProperties[currentTag].addAttribute(attrProperty);
3884 
3886  ATTRPROPERTY_COMPLEX | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_WRITEXMLOPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */,
3887  "The position at which the " + toString(currentTag) + " shall leave the network",
3888  "max");
3889  myTagProperties[currentTag].addAttribute(attrProperty);
3890 
3892  ATTRPROPERTY_COMPLEX | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_WRITEXMLOPTIONAL /* ATTRPROPERTY_MULTIDISCRETE (Currently disabled) */,
3893  "The speed with which the " + toString(currentTag) + " shall leave the network",
3894  "current");
3895  myTagProperties[currentTag].addAttribute(attrProperty);
3896 
3897  attrProperty = AttributeProperties(SUMO_ATTR_LINE,
3899  "A string specifying the id of a public transport line which can be used when specifying person rides");
3900  myTagProperties[currentTag].addAttribute(attrProperty);
3901 
3904  "The number of occupied seats when the " + toString(currentTag) + " is inserted",
3905  "0");
3906  myTagProperties[currentTag].addAttribute(attrProperty);
3907 
3910  "The number of occupied container places when the " + toString(currentTag) + " is inserted",
3911  "0");
3912  myTagProperties[currentTag].addAttribute(attrProperty);
3913 
3916  "The lateral position on the departure lane at which the " + toString(currentTag) + " shall enter the net",
3917  "center");
3918  myTagProperties[currentTag].addAttribute(attrProperty);
3919 
3922  "The lateral position on the arrival lane at which the " + toString(currentTag) + " shall arrive",
3923  "center");
3924  myTagProperties[currentTag].addAttribute(attrProperty);
3925 }
3926 
3927 
3928 void
3930  // declare empty AttributeProperties
3931  AttributeProperties attrProperty;
3932 
3933  attrProperty = AttributeProperties(SUMO_ATTR_BEGIN,
3935  "First " + toString(currentTag) + " departure time",
3936  "0.00");
3937  myTagProperties[currentTag].addAttribute(attrProperty);
3938 
3939  attrProperty = AttributeProperties(SUMO_ATTR_END,
3941  "End of departure interval",
3942  "3600.00");
3943  myTagProperties[currentTag].addAttribute(attrProperty);
3944 
3945  attrProperty = AttributeProperties(SUMO_ATTR_NUMBER,
3947  "probability for emitting a " + toString(currentTag) + " each second (not together with vehsPerHour or period)",
3948  "1800");
3949  myTagProperties[currentTag].addAttribute(attrProperty);
3950 
3953  "Number of " + toString(currentTag) + "s per hour, equally spaced (not together with period or probability)",
3954  "1800");
3955  myTagProperties[currentTag].addAttribute(attrProperty);
3956 
3957  attrProperty = AttributeProperties(SUMO_ATTR_PERIOD,
3959  "Insert equally spaced " + toString(currentTag) + "s at that period (not together with vehsPerHour or probability)",
3960  "2");
3961  myTagProperties[currentTag].addAttribute(attrProperty);
3962 
3963  attrProperty = AttributeProperties(SUMO_ATTR_PROB,
3965  "probability for emitting a " + toString(currentTag) + " each second (not together with vehsPerHour or period)",
3966  "0.5");
3967  myTagProperties[currentTag].addAttribute(attrProperty);
3968 }
3969 
3970 
3971 void
3973  // declare empty AttributeProperties
3974  AttributeProperties attrProperty;
3975 
3976  attrProperty = AttributeProperties(SUMO_ATTR_ACCEL,
3978  "The acceleration ability of vehicles of this type [m/s^2]",
3979  "2.60");
3980  myTagProperties[currentTag].addAttribute(attrProperty);
3981 
3982  attrProperty = AttributeProperties(SUMO_ATTR_DECEL,
3984  "The deceleration ability of vehicles of this type [m/s^2]",
3985  "4.50");
3986  myTagProperties[currentTag].addAttribute(attrProperty);
3987 
3990  "The apparent deceleration of the vehicle as used by the standard model [m/s^2]",
3991  "4.50");
3992  myTagProperties[currentTag].addAttribute(attrProperty);
3993 
3996  "The maximal physically possible deceleration for the vehicle [m/s^2]",
3997  "4.50");
3998  myTagProperties[currentTag].addAttribute(attrProperty);
3999 
4000  attrProperty = AttributeProperties(SUMO_ATTR_SIGMA,
4002  "Car-following model parameter",
4003  "0.50");
4004  attrProperty.setRange(0, 1);
4005  myTagProperties[currentTag].addAttribute(attrProperty);
4006 
4007  attrProperty = AttributeProperties(SUMO_ATTR_TAU,
4009  "Car-following model parameter",
4010  "1.00");
4011  myTagProperties[currentTag].addAttribute(attrProperty);
4012 
4013  attrProperty = AttributeProperties(SUMO_ATTR_TMP1,
4015  "SKRAUSSX parameter 1",
4016  "");
4017  myTagProperties[currentTag].addAttribute(attrProperty);
4018 
4019  attrProperty = AttributeProperties(SUMO_ATTR_TMP2,
4021  "SKRAUSSX parameter 2",
4022  "");
4023  myTagProperties[currentTag].addAttribute(attrProperty);
4024 
4025  attrProperty = AttributeProperties(SUMO_ATTR_TMP3,
4027  "SKRAUSSX parameter 3",
4028  "");
4029  myTagProperties[currentTag].addAttribute(attrProperty);
4030 
4031  attrProperty = AttributeProperties(SUMO_ATTR_TMP4,
4033  "SKRAUSSX parameter 4",
4034  "");
4035  myTagProperties[currentTag].addAttribute(attrProperty);
4036 
4037  attrProperty = AttributeProperties(SUMO_ATTR_TMP5,
4039  "SKRAUSSX parameter 5",
4040  "");
4041  myTagProperties[currentTag].addAttribute(attrProperty);
4042 
4045  "Peter Wagner 2009 parameter",
4046  "");
4047  myTagProperties[currentTag].addAttribute(attrProperty);
4048 
4051  "Peter Wagner 2009 parameter",
4052  "");
4053  myTagProperties[currentTag].addAttribute(attrProperty);
4054 
4057  "IDMM parameter",
4058  "");
4059  myTagProperties[currentTag].addAttribute(attrProperty);
4060 
4063  "IDMM parameter",
4064  "");
4065  myTagProperties[currentTag].addAttribute(attrProperty);
4066 
4069  "Wiedemann parameter",
4070  "");
4071  myTagProperties[currentTag].addAttribute(attrProperty);
4072 
4075  "Wiedemann parameter",
4076  "");
4077  myTagProperties[currentTag].addAttribute(attrProperty);
4078 
4081  "MinGap factor parameter",
4082  "");
4083  myTagProperties[currentTag].addAttribute(attrProperty);
4084 
4085  attrProperty = AttributeProperties(SUMO_ATTR_K,
4087  "K parameter",
4088  "");
4089  myTagProperties[currentTag].addAttribute(attrProperty);
4090 
4091 
4094  "Kerner Phi parameter",
4095  "");
4096  myTagProperties[currentTag].addAttribute(attrProperty);
4097 
4100  "IDM Delta parameter",
4101  "");
4102  myTagProperties[currentTag].addAttribute(attrProperty);
4103 
4106  "IDM Stepping parameter",
4107  "");
4108  myTagProperties[currentTag].addAttribute(attrProperty);
4109 
4112  "Train Types",
4113  "NGT400");
4114  attrProperty.setDiscreteValues(SUMOXMLDefinitions::TrainTypes.getStrings());
4115  myTagProperties[currentTag].addAttribute(attrProperty);
4116 }
4117 
4118 
4119 void
4121  // declare empty AttributeProperties
4122  AttributeProperties attrProperty;
4125  "Minimum distance to pedestrians that are walking towards the conflict point with the ego vehicle.",
4126  "10");
4127  myTagProperties[currentTag].addAttribute(attrProperty);
4128 
4131  "The accumulated waiting time after which a vehicle will drive onto an intersection even though this might cause jamming.",
4132  "-1");
4133  myTagProperties[currentTag].addAttribute(attrProperty);
4134 
4137  "This value causes vehicles to violate a yellow light if the duration of the yellow phase is lower than the given threshold.",
4138  "-1");
4139  myTagProperties[currentTag].addAttribute(attrProperty);
4140 
4143  "This value causes vehicles to violate a red light if the duration of the red phase is lower than the given threshold.",
4144  "-1");
4145  myTagProperties[currentTag].addAttribute(attrProperty);
4146 
4149  "This value causes vehicles affected by jmDriveAfterRedTime to slow down when violating a red light.",
4150  "0.0");
4151  myTagProperties[currentTag].addAttribute(attrProperty);
4152 
4155  "This value causes vehicles to ignore foe vehicles that have right-of-way with the given probability.",
4156  "0.0");
4157  myTagProperties[currentTag].addAttribute(attrProperty);
4158 
4161  "This value is used in conjunction with jmIgnoreFoeProb. Only vehicles with a speed below or equal to the given value may be ignored.",
4162  "0.0");
4163  myTagProperties[currentTag].addAttribute(attrProperty);
4164 
4167  "This value configures driving imperfection (dawdling) while passing a minor link.",
4168  "0.0");
4169  myTagProperties[currentTag].addAttribute(attrProperty);
4170 
4173  "This value defines the minimum time gap when passing ahead of a prioritized vehicle. ",
4174  "1");
4175  myTagProperties[currentTag].addAttribute(attrProperty);
4176 
4179  "Willingess of drivers to impede vehicles with higher priority",
4180  "0.0");
4181  myTagProperties[currentTag].addAttribute(attrProperty);
4182 }
4183 
4184 
4185 void
4187  // declare empty AttributeProperties
4188  AttributeProperties attrProperty;
4189 
4192  "The eagerness for performing strategic lane changing. Higher values result in earlier lane-changing.",
4193  "1.0");
4194  myTagProperties[currentTag].addAttribute(attrProperty);
4195 
4198  "The willingness for performing cooperative lane changing. Lower values result in reduced cooperation.",
4199  "1.0");
4200  myTagProperties[currentTag].addAttribute(attrProperty);
4201 
4204  "The eagerness for performing lane changing to gain speed. Higher values result in more lane-changing.",
4205  "1.0");
4206  myTagProperties[currentTag].addAttribute(attrProperty);
4207 
4210  "The eagerness for following the obligation to keep right. Higher values result in earlier lane-changing.",
4211  "1.0");
4212  myTagProperties[currentTag].addAttribute(attrProperty);
4213 
4216  "The eagerness for using the configured lateral alignment within the lane. Higher values result in increased willingness to sacrifice speed for alignment.",
4217  "1.0");
4218  myTagProperties[currentTag].addAttribute(attrProperty);
4219 
4222  "The eagerness for overtaking through the opposite-direction lane. Higher values result in more lane-changing.",
4223  "1.0");
4224  myTagProperties[currentTag].addAttribute(attrProperty);
4225 
4228  "Willingness to encroach laterally on other drivers.",
4229  "0.00");
4230  myTagProperties[currentTag].addAttribute(attrProperty);
4231 
4234  "Minimum lateral gap when encroaching laterally on other drives (alternative way to define lcPushy)",
4235  "0.00");
4236  myTagProperties[currentTag].addAttribute(attrProperty);
4237 
4240  "Willingness to accept lower front and rear gaps on the target lane.",
4241  "1.0");
4242  myTagProperties[currentTag].addAttribute(attrProperty);
4243 
4246  "Dynamic factor for modifying lcAssertive and lcPushy.",
4247  "0.00");
4248  myTagProperties[currentTag].addAttribute(attrProperty);
4249 
4252  "Time to reach maximum impatience (of 1). Impatience grows whenever a lane-change manoeuvre is blocked.",
4253  "infinity");
4254  myTagProperties[currentTag].addAttribute(attrProperty);
4255 
4258  "Maximum lateral acceleration per second.",
4259  "1.0");
4260  myTagProperties[currentTag].addAttribute(attrProperty);
4261 
4264  "Factor for configuring the strategic lookahead distance when a change to the left is necessary (relative to right lookahead).",
4265  "2.0");
4266  myTagProperties[currentTag].addAttribute(attrProperty);
4267 
4270  "Factor for configuring the treshold asymmetry when changing to the left or to the right for speed gain.",
4271  "0.1");
4272  myTagProperties[currentTag].addAttribute(attrProperty);
4273 
4276  "Upper bound on lateral speed when standing.",
4277  "0.00");
4278  myTagProperties[currentTag].addAttribute(attrProperty);
4279 
4282  "Upper bound on lateral speed while moving computed as lcMaxSpeedLatStanding + lcMaxSpeedLatFactor * getSpeed()",
4283  "1.00");
4284  myTagProperties[currentTag].addAttribute(attrProperty);
4285 
4288  "Distance to an upcoming turn on the vehicles route, below which the alignment should be dynamically adapted to match the turn direction.",
4289  "0.00");
4290  myTagProperties[currentTag].addAttribute(attrProperty);
4291 
4294  "The probability for violating rules gainst overtaking on the right.",
4295  "0.00");
4296  myTagProperties[currentTag].addAttribute(attrProperty);
4297 
4298  /*
4299  attrProperty = AttributeProperties(SUMO_ATTR_LCA_EXPERIMENTAL1,
4300  ATTRPROPERTY_FLOAT | ATTRPROPERTY_POSITIVE | ATTRPROPERTY_DEFAULTVALUESTATIC | ATTRPROPERTY_WRITEXMLOPTIONAL | ATTRPROPERTY_EXTENDED,
4301  "XXXXX",
4302  "0.00");
4303  myTagProperties[currentTag].addAttribute(attrProperty);
4304  */
4305 }
4306 
4307 
4308 void
4310  // declare empty AttributeProperties
4311  AttributeProperties attrProperty;
4312 
4313  attrProperty = AttributeProperties(SUMO_ATTR_ID,
4315  "The name of the " + toString(currentTag));
4316  myTagProperties[currentTag].addAttribute(attrProperty);
4317 
4318  attrProperty = AttributeProperties(SUMO_ATTR_TYPE,
4320  "The id of the " + toString(currentTag) + " type to use for this " + toString(currentTag) +
4322  myTagProperties[currentTag].addAttribute(attrProperty);
4323 
4324  attrProperty = AttributeProperties(SUMO_ATTR_COLOR,
4326  "This " + toString(currentTag) + "'s color",
4327  "yellow");
4328  myTagProperties[currentTag].addAttribute(attrProperty);
4329 
4332  "The position at which the " + toString(currentTag) + " shall enter the net",
4333  "base");
4334  myTagProperties[currentTag].addAttribute(attrProperty);
4335 }
4336 
4337 
4338 void
4340  // declare empty AttributeProperties
4341  AttributeProperties attrProperty;
4342 
4343  attrProperty = AttributeProperties(SUMO_ATTR_DURATION,
4345  "Minimum duration for stopping",
4346  "60");
4347  myTagProperties[currentTag].addAttribute(attrProperty);
4348 
4349  attrProperty = AttributeProperties(SUMO_ATTR_UNTIL,
4351  "The time step at which the route continues",
4352  "0");
4353  myTagProperties[currentTag].addAttribute(attrProperty);
4354 
4355  attrProperty = AttributeProperties(SUMO_ATTR_INDEX,
4357  "Where to insert the stop in the vehicle's list of stops",
4358  "end");
4359  myTagProperties[currentTag].addAttribute(attrProperty);
4360 
4363  "Whether a person may end the stop",
4364  "0");
4365  myTagProperties[currentTag].addAttribute(attrProperty);
4366 
4367  attrProperty = AttributeProperties(SUMO_ATTR_EXPECTED,
4369  "List of persons that must board the vehicle before it may continue");
4370  myTagProperties[currentTag].addAttribute(attrProperty);
4371 
4374  "Whether a container may end the stop",
4375  "0");
4376  myTagProperties[currentTag].addAttribute(attrProperty);
4377 
4380  "List of containers that must be loaded onto the vehicle before it may continue");
4381  myTagProperties[currentTag].addAttribute(attrProperty);
4382 
4383  attrProperty = AttributeProperties(SUMO_ATTR_PARKING,
4385  "whether the vehicle stops on the road or beside ",
4386  "0");
4387  myTagProperties[currentTag].addAttribute(attrProperty);
4388 
4389  attrProperty = AttributeProperties(SUMO_ATTR_ACTTYPE,
4391  "Activity displayed for stopped person in GUI and output files ",
4392  "waiting");
4393  myTagProperties[currentTag].addAttribute(attrProperty);
4394 
4395  attrProperty = AttributeProperties(SUMO_ATTR_TRIP_ID,
4397  "Value used for trips that uses this stop");
4398  myTagProperties[currentTag].addAttribute(attrProperty);
4399 }
4400 
4401 
4402 bool
4404  const AttributeProperties& attrProperties, const SumoXMLAttr attribute,
4405  std::string& defaultValue, std::string& parsedAttribute, std::string& warningMessage) {
4406  // declare a string for details about error formats
4407  std::string errorFormat;
4408  // set extra check for ID Values
4409  if (attribute == SUMO_ATTR_ID) {
4410  if (parsedAttribute.empty()) {
4411  errorFormat = "ID cannot be empty; ";
4412  } else if (tagProperties.isDetector()) {
4413  // special case for detectors (because in this case empty spaces are allowed)
4414  if (SUMOXMLDefinitions::isValidDetectorID(parsedAttribute) == false) {
4415  errorFormat = "Detector ID contains invalid characters; ";
4416  }
4417  } else if (tagProperties.isDemandElement()) {
4418  // special case for detectors (because in this case empty spaces are allowed)
4419  if (SUMOXMLDefinitions::isValidVehicleID(parsedAttribute) == false) {
4420  errorFormat = "Demand Element ID contains invalid characters; ";
4421  }
4422  } else if (SUMOXMLDefinitions::isValidNetID(parsedAttribute) == false) {
4423  errorFormat = "ID contains invalid characters; ";
4424  }
4425  }
4426  // Set extra checks for int values
4427  if (attrProperties.isInt()) {
4428  if (canParse<int>(parsedAttribute)) {
4429  // obtain int value
4430  int parsedIntAttribute = parse<int>(parsedAttribute);
4431  // check if attribute can be negative or zero
4432  if (attrProperties.isPositive() && (parsedIntAttribute < 0)) {
4433  errorFormat = "Cannot be negative; ";
4434  } else if (attrProperties.cannotBeZero() && (parsedIntAttribute == 0)) {
4435  errorFormat = "Cannot be zero; ";
4436  }
4437  } else if (canParse<double>(parsedAttribute)) {
4438  errorFormat = "Float cannot be reinterpreted as int; ";
4439  } else {
4440  errorFormat = "Cannot be parsed to int; ";
4441  }
4442  }
4443  // Set extra checks for float(double) values
4444  if (attrProperties.isFloat()) {
4445  if (canParse<double>(parsedAttribute)) {
4446  // obtain double value
4447  double parsedDoubleAttribute = parse<double>(parsedAttribute);
4448  //check if can be negative and Zero
4449  if (attrProperties.isPositive() && (parsedDoubleAttribute < 0)) {
4450  errorFormat = "Cannot be negative; ";
4451  } else if (attrProperties.cannotBeZero() && (parsedDoubleAttribute == 0)) {
4452  errorFormat = "Cannot be zero; ";
4453  }
4454  } else {
4455  errorFormat = "Cannot be parsed to float; ";
4456  }
4457  }
4458  // Set extra checks for bool values
4459  if (attrProperties.isBool()) {
4460  if (!canParse<bool>(parsedAttribute)) {
4461  errorFormat = "Cannot be parsed to boolean; ";
4462  }
4463  }
4464  // Set extra checks for position values
4465  if (attrProperties.isposition()) {
4466  // check if we're parsing a single position or an entire shape
4467  if (attrProperties.isList()) {
4468  // check if parsed attribute can be parsed to Position Vector
4469  if (!canParse<PositionVector>(parsedAttribute)) {
4470  errorFormat = "List of Positions aren't neither x,y nor x,y,z; ";
4471  }
4472  } else if (!canParse<Position>(parsedAttribute)) {
4473  errorFormat = "Position is neither x,y nor x,y,z; ";
4474  }
4475  }
4476  // set extra check for time(double) values
4477  if (attrProperties.isSUMOTime()) {
4478  if (!canParse<SUMOTime>(parsedAttribute)) {
4479  errorFormat = "Cannot be parsed to SUMOTime; ";
4480  }
4481  }
4482  // set extra check for probability values
4483  if (attrProperties.isProbability()) {
4484  if (canParse<double>(parsedAttribute)) {
4485  // parse to double and check if is between [0,1]
4486  double probability = parse<double>(parsedAttribute);
4487  if (probability < 0) {
4488  errorFormat = "Probability cannot be smaller than 0; ";
4489  } else if (probability > 1) {
4490  errorFormat = "Probability cannot be greather than 1; ";
4491  }
4492  } else {
4493  errorFormat = "Cannot be parsed to probability; ";
4494  }
4495  }
4496  // set extra check for range values
4497  if (attrProperties.hasAttrRange()) {
4498  if (canParse<double>(parsedAttribute)) {
4499  // parse to double and check if is in range
4500  double range = parse<double>(parsedAttribute);
4501  if (range < attrProperties.getMinimumRange()) {
4502  errorFormat = "Float cannot be smaller than " + toString(attrProperties.getMinimumRange()) + "; ";
4503  } else if (range > attrProperties.getMaximumRange()) {
4504  errorFormat = "Float cannot be greather than " + toString(attrProperties.getMaximumRange()) + "; ";
4505  }
4506  } else {
4507  errorFormat = "Cannot be parsed to float; ";
4508  }
4509  }
4510  // set extra check for discrete values
4511  if (attrProperties.isDiscrete()) {
4512  // search value in the list of discretes values of attribute properties
4513  auto finder = std::find(attrProperties.getDiscreteValues().begin(), attrProperties.getDiscreteValues().end(), parsedAttribute);
4514  // check if attribute is valid
4515  if (finder == attrProperties.getDiscreteValues().end()) {
4516  errorFormat = "value is not within the set of allowed values for attribute '" + toString(attribute) + "'";
4517  }
4518  }
4519  // set extra check for color values
4520  if (attrProperties.isColor() && !canParse<RGBColor>(parsedAttribute)) {
4521  errorFormat = "Invalid RGB format or named color; ";
4522  }
4523  // set extra check for filename values
4524  if (attrProperties.isFilename()) {
4525  if (SUMOXMLDefinitions::isValidFilename(parsedAttribute) == false) {
4526  errorFormat = "Filename contains invalid characters; ";
4527  } else if (parsedAttribute.empty() && !attrProperties.isWriteXMLOptional()) {
4528  errorFormat = "Filename cannot be empty; ";
4529  }
4530  }
4531  // set extra check for name values
4532  if ((attribute == SUMO_ATTR_NAME) && !SUMOXMLDefinitions::isValidAttribute(parsedAttribute)) {
4533  errorFormat = "name contains invalid characters; ";
4534  }
4535  // set extra check for SVCPermissions values
4536  if (attrProperties.isVClass()) {
4537  if (!canParseVehicleClasses(parsedAttribute)) {
4538  errorFormat = "List of VClasses isn't valid; ";
4539  parsedAttribute = defaultValue;
4540  }
4541  }
4542  // set extra check for RouteProbes
4543  if ((attribute == SUMO_ATTR_ROUTEPROBE) && !SUMOXMLDefinitions::isValidNetID(parsedAttribute)) {
4544  errorFormat = "RouteProbe ID contains invalid characters; ";
4545  }
4546  // set extra check for list of edges
4547  if ((attribute == SUMO_ATTR_EDGES) && parsedAttribute.empty()) {
4548  errorFormat = "List of edges cannot be empty; ";
4549  }
4550  // set extra check for list of lanes
4551  if ((attribute == SUMO_ATTR_LANES) && parsedAttribute.empty()) {
4552  errorFormat = "List of lanes cannot be empty; ";
4553  }
4554  // set extra check for list of VTypes
4555  if ((attribute == SUMO_ATTR_VTYPES) && !parsedAttribute.empty() && !SUMOXMLDefinitions::isValidListOfTypeID(parsedAttribute)) {
4556  errorFormat = "List of vTypes contains invalid characters; ";
4557  }
4558  // set extra check for list of RouteProbe
4559  if ((attribute == SUMO_ATTR_ROUTEPROBE) && !parsedAttribute.empty() && !SUMOXMLDefinitions::isValidNetID(parsedAttribute)) {
4560  errorFormat = "RouteProbe ID contains invalid characters; ";
4561  }
4562  // If attribute has an invalid format
4563  if (errorFormat.size() > 0) {
4564  // if attribute is optional and has a default value, obtain it as string. In other case, abort.
4565  if (attrProperties.isWriteXMLOptional()) {
4566  WRITE_DEBUG("Format of optional " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " +
4567  warningMessage + " is invalid; " + errorFormat + "Default value will be used.");
4568  // set default value defined in AttrProperties
4569  parsedAttribute = attrProperties.getDefaultValue();
4570  } else {
4571  WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " +
4572  warningMessage + " is invalid; " + errorFormat + tagProperties.getTagStr() + " cannot be created");
4573  // set default value (To avoid errors in parse<T>(parsedAttribute))
4574  parsedAttribute = defaultValue;
4575  // return false to abort creation of element
4576  return false;
4577  }
4578  }
4579  // return true to continue creation of element
4580  return true;
4581 }
4582 
4583 
4584 bool
4585 GNEAttributeCarrier::parseMaskedPositionAttribute(const SUMOSAXAttributes& attrs, const std::string& objectID, const TagProperties& tagProperties,
4586  const AttributeProperties& attrProperties, std::string& parsedAttribute, std::string& warningMessage) {
4587  // if element can mask their XYPosition, then must be extracted X Y coordiantes separeted
4588  std::string x, y, z;
4589  bool parsedOk = true;
4590  // give a default value to parsedAttribute to avoid problem parsing invalid positions
4591  parsedAttribute = "0,0";
4592  if (attrs.hasAttribute(SUMO_ATTR_X)) {
4593  x = attrs.get<std::string>(SUMO_ATTR_X, objectID.c_str(), parsedOk, false);
4594  // check that X attribute is valid
4595  if (!canParse<double>(x)) {
4596  WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_X) + "' of " +
4597  warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created");
4598  // abort parsing (and creation) of element
4599  return false;
4600  }
4601  } else {
4602  WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_X) + "' of " +
4603  warningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created");
4604  // abort parsing (and creation) of element
4605  return false;
4606  }
4607  if (attrs.hasAttribute(SUMO_ATTR_Y)) {
4608  y = attrs.get<std::string>(SUMO_ATTR_Y, objectID.c_str(), parsedOk, false);
4609  // check that X attribute is valid
4610  if (!canParse<double>(y)) {
4611  WRITE_WARNING("Format of essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Y) + "' of " +
4612  warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created");
4613  // abort parsing (and creation) of element
4614  return false;
4615  }
4616  } else {
4617  WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Y) + "' of " +
4618  warningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created");
4619  // abort parsing (and creation) of element
4620  return false;
4621  }
4622  // Z attribute is optional
4623  if (attrs.hasAttribute(SUMO_ATTR_Z)) {
4624  z = attrs.get<std::string>(SUMO_ATTR_Z, objectID.c_str(), parsedOk, false);
4625  // check that Z attribute is valid
4626  if (!canParse<double>(z)) {
4627  WRITE_WARNING("Format of optional " + attrProperties.getDescription() + " attribute '" + toString(SUMO_ATTR_Z) + "' of " +
4628  warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created");
4629  // leave Z attribute empty
4630  z.clear();
4631  }
4632  }
4633  // create Position attribute using parsed coordinates X, Y and, optionally, Z
4634  if (z.empty()) {
4635  parsedAttribute = x + "," + y;
4636  } else {
4637  parsedAttribute = x + "," + y + "," + z;
4638  }
4639  // continue creation of element
4640  return true;
4641 }
4642 /****************************************************************************/
GNEAttributeCarrier::TagProperties::hasGenericParameters
bool hasGenericParameters() const
return true if Tag correspond to an element that supports generic parameters
Definition: GNEAttributeCarrier.cpp:856
GNEAttributeCarrier::AttributeProperties::setSynonym
void setSynonym(const SumoXMLAttr synonym)
set synonim
Definition: GNEAttributeCarrier.cpp:138
SUMO_ATTR_ENDOFFSET
Definition: SUMOXMLDefinitions.h:415
GNEAttributeCarrier::TAGPROPERTY_WRITECHILDRENSEPARATE
Definition: GNEAttributeCarrier.h:317
GNEAttributeCarrier::AttributeProperties::isProbability
bool isProbability() const
return true if atribute is a probability
Definition: GNEAttributeCarrier.cpp:374
GNEAttributeCarrier::fillAttributeCarriers
static void fillAttributeCarriers()
fill Attribute Carriers
Definition: GNEAttributeCarrier.cpp:1387
SUMOXMLDefinitions::isValidAttribute
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
Definition: SUMOXMLDefinitions.cpp:988
SUMO_ATTR_MAXSPEED
Definition: SUMOXMLDefinitions.h:442
GNEAttributeCarrier::TagProperties::isPerson
bool isPerson() const
return true if tag correspond to a person element
Definition: GNEAttributeCarrier.cpp:754
SUMO_ATTR_OSGFILE
Definition: SUMOXMLDefinitions.h:788
SUMO_TAG_WALK_FROMTO
Definition: SUMOXMLDefinitions.h:308
SUMO_ATTR_TYPE
Definition: SUMOXMLDefinitions.h:382
ICON_EDGE
Definition: GUIIcons.h:253
SUMO_ATTR_ANGLE
Definition: SUMOXMLDefinitions.h:791
SUMO_ATTR_BOARDING_DURATION
Definition: SUMOXMLDefinitions.h:462
ICON_CONNECTION
Definition: GUIIcons.h:255
SUMO_ATTR_LCA_SPEEDGAIN_PARAM
Definition: SUMOXMLDefinitions.h:590
SVC_PEDESTRIAN
pedestrian
Definition: SUMOVehicleClass.h:157
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:134
GNEAttributeCarrier::TAGPROPERTY_SELECTABLE
Definition: GNEAttributeCarrier.h:314
SUMOXMLDefinitions::LaneChangeModels
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
Definition: SUMOXMLDefinitions.h:1390
SUMO_ATTR_CF_WIEDEMANN_ESTIMATION
Definition: SUMOXMLDefinitions.h:839
GNEAttributeCarrier::getIcon
FXIcon * getIcon() const
get FXIcon associated to this AC
Definition: GNEAttributeCarrier.cpp:1177
OptionsCont::getInt
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
Definition: OptionsCont.cpp:216
SUMO_ATTR_ACCELERATION
Definition: SUMOXMLDefinitions.h:889
GNEAttributeCarrier::GNEAttributeCarrier
GNEAttributeCarrier(const SumoXMLTag tag)
Constructor.
Definition: GNEAttributeCarrier.cpp:913
SUMO_ATTR_DEPART
Definition: SUMOXMLDefinitions.h:432
SUMOSAXAttributes::hasAttribute
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
SUMO_TAG_LANECALIBRATOR
A calibrator placed over lane (used in netedit)
Definition: SUMOXMLDefinitions.h:94
GNEAttributeCarrier::AttributeProperties::isSUMOTime
bool isSUMOTime() const
return true if atribute is a SUMOTime
Definition: GNEAttributeCarrier.cpp:350
SUMO_ATTR_HALTING_SPEED_THRESHOLD
Definition: SUMOXMLDefinitions.h:748
SUMO_TAG_STOP_PARKINGAREA
stop placed over a parking area (used in netedit)
Definition: SUMOXMLDefinitions.h:189
GNEAttributeCarrier::TagProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:324
SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME
Definition: SUMOXMLDefinitions.h:615
GNEAttributeCarrier::dummyTagProperty
static TagProperties dummyTagProperty
dummy TagProperty used for reference some elements (for Example, dummyEdge)
Definition: GNEAttributeCarrier.h:798
GNEAttributeCarrier::ATTRPROPERTY_INT
Definition: GNEAttributeCarrier.h:67
GNEAttributeCarrier::mySelected
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
Definition: GNEAttributeCarrier.h:795
SUMO_ATTR_IMGFILE
Definition: SUMOXMLDefinitions.h:789
GNEAttributeCarrier::checkParsedAttribute
static bool checkParsedAttribute(const TagProperties &tagProperties, const AttributeProperties &attrProperties, const SumoXMLAttr attribute, std::string &defaultValue, std::string &parsedAttribute, std::string &warningMessage)
parse and check attribute (note: This function is only to improve legilibility)
Definition: GNEAttributeCarrier.cpp:4403
GNEAttributeCarrier::TagProperties::addDeprecatedAttribute
void addDeprecatedAttribute(SumoXMLAttr attr)
add deprecated Attribute
Definition: GNEAttributeCarrier.cpp:608
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1187
SUMO_ATTR_DISALLOW
Definition: SUMOXMLDefinitions.h:780
StringUtils::toBool
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
Definition: StringUtils.cpp:342
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:239
GNEAttributeCarrier::TAGTYPE_VTYPE
Definition: GNEAttributeCarrier.h:289
GNEAttributeCarrier::TagProperties::isAdditional
bool isAdditional() const
return true if tag correspond to an additional
Definition: GNEAttributeCarrier.cpp:696
GNEAttributeCarrier::AttributeProperties::checkAttributeIntegrity
void checkAttributeIntegrity()
check Attribute integrity (For example, throw an exception if tag has a Float default value,...
Definition: GNEAttributeCarrier.cpp:103
SUMO_ATTR_MINGAP_LAT
Definition: SUMOXMLDefinitions.h:445
SUMO_TAG_POLY
begin/end of the description of a polygon
Definition: SUMOXMLDefinitions.h:58
NODETYPE_DEAD_END_DEPRECATED
Definition: SUMOXMLDefinitions.h:1065
RIGHT_OF_WAY_DEFAULT
Definition: SUMOXMLDefinitions.h:1100
SUMO_ATTR_PARKING_AREA
Definition: SUMOXMLDefinitions.h:768
SUMO_ATTR_CF_IDMM_ADAPT_FACTOR
Definition: SUMOXMLDefinitions.h:835
GNEAttributeCarrier::AttributeProperties::isposition
bool isposition() const
return true if atribute is a position
Definition: GNEAttributeCarrier.cpp:368
SUMO_ATTR_CONTAINER_STOP
Definition: SUMOXMLDefinitions.h:767
ICON_TRIP
Definition: GUIIcons.h:296
GNEAttributeCarrier::TagProperties::getTagStr
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Definition: GNEAttributeCarrier.cpp:527
GNEAttributeCarrier::ATTRPROPERTY_COMPLEX
Definition: GNEAttributeCarrier.h:94
GNEAttributeCarrier::TagProperties::isPlacedInRTree
bool isPlacedInRTree() const
return true if Tag correspond to an element that has has to be placed in RTREE
Definition: GNEAttributeCarrier.cpp:863
SUMO_ATTR_LATALIGNMENT
Definition: SUMOXMLDefinitions.h:444
SUMO_ATTR_LENGTH
Definition: SUMOXMLDefinitions.h:394
GNEAttributeCarrier::TagProperties::isTAZ
bool isTAZ() const
return true if tag correspond to a TAZ
Definition: GNEAttributeCarrier.cpp:707
GNEAttributeCarrier::ATTRPROPERTY_UNIQUE
Definition: GNEAttributeCarrier.h:77
SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
Definition: SUMOXMLDefinitions.h:181
SUMO_ATTR_TLTYPE
node: the type of traffic light
Definition: SUMOXMLDefinitions.h:681
SUMO_ATTR_LCA_COOPERATIVE_PARAM
Definition: SUMOXMLDefinitions.h:589
GNEAttributeCarrier::TagProperties::canMaskStartEndPos
bool canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
Definition: GNEAttributeCarrier.cpp:893
GNEAttributeCarrier::ATTRPROPERTY_EXTENDED
Definition: GNEAttributeCarrier.h:91
SUMOXMLDefinitions::isValidFilename
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
Definition: SUMOXMLDefinitions.cpp:994
SUMO_ATTR_CF_IDM_STEPPING
Definition: SUMOXMLDefinitions.h:834
GNEAttributeCarrier::TAGPROPERTY_SYNONYM
Definition: GNEAttributeCarrier.h:312
GeomConvHelper.h
GNEAttributeCarrier::TagProperties::isStoppingPlace
bool isStoppingPlace() const
return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML)
Definition: GNEAttributeCarrier.cpp:719
SUMO_ATTR_UNTIL
Definition: SUMOXMLDefinitions.h:666
ICON_PARKINGSPACE
Definition: GUIIcons.h:278
SUMO_ATTR_MAXSPEED_LAT
Definition: SUMOXMLDefinitions.h:443
ICON_FLOW
Definition: GUIIcons.h:297
GNEAttributeCarrier::AttributeProperties::isOptional
bool isOptional() const
return true if atribute is optional
Definition: GNEAttributeCarrier.cpp:476
GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUEMUTABLE
Definition: GNEAttributeCarrier.h:87
GNEAttributeCarrier::parseIDs
static std::string parseIDs(const std::vector< T > &ACs)
parses a list of specific Attribute Carriers into a string of IDs
OptionsCont.h
GNEAttributeCarrier::fillCommonFlowAttributes
static void fillCommonFlowAttributes(SumoXMLTag currentTag)
fill common flow attributes (used by flows, routeFlows and personFlows)
Definition: GNEAttributeCarrier.cpp:3929
StringTokenizer::hasNext
bool hasNext()
returns the information whether further substrings exist
Definition: StringTokenizer.cpp:95
SUMO_ATTR_TMP2
Definition: SUMOXMLDefinitions.h:551
SUMO_ATTR_LINE
Definition: SUMOXMLDefinitions.h:772
StringUtils::toDouble
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
Definition: StringUtils.cpp:313
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:78
GNEAttributeCarrier::TagProperties::isNetElement
bool isNetElement() const
return true if tag correspond to a netElement
Definition: GNEAttributeCarrier.cpp:690
ICON_EMPTY
Definition: GUIIcons.h:42
SUMOSAXAttributes::get
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
Definition: SUMOSAXAttributes.h:493
SUMO_ATTR_TO_LANE
Definition: SUMOXMLDefinitions.h:717
GNEAttributeCarrier::ATTRPROPERTY_DISCRETE
Definition: GNEAttributeCarrier.h:80
SUMO_ATTR_SPEEDFACTOR
Definition: SUMOXMLDefinitions.h:456
SUMO_TAG_WALK_ROUTE
Definition: SUMOXMLDefinitions.h:310
ICON_STOPELEMENT
Definition: GUIIcons.h:299
GNEAttributeCarrier::ATTRPROPERTY_ENABLITABLE
Definition: GNEAttributeCarrier.h:95
GNEAttributeCarrier::AttributeProperties::isPositive
bool isPositive() const
return true if atribute is positive
Definition: GNEAttributeCarrier.cpp:386
SUMO_TAG_TAZSOURCE
a source within a district (connection road)
Definition: SUMOXMLDefinitions.h:136
SUMO_TAG_CONTAINER_STOP
A container stop.
Definition: SUMOXMLDefinitions.h:106
GNEAttributeCarrier::fillPersonStopElements
static void fillPersonStopElements()
fill PersonStop elements
Definition: GNEAttributeCarrier.cpp:3801
GNEAttributeCarrier::TagProperties::canBeSortedManually
bool canBeSortedManually() const
return true if Tag correspond to an element that can be sorted within their parent
Definition: GNEAttributeCarrier.cpp:869
SUMO_ATTR_CUSTOMSHAPE
whether a given shape is user-defined
Definition: SUMOXMLDefinitions.h:699
SUMO_ATTR_ARRIVALPOS_LAT
Definition: SUMOXMLDefinitions.h:439
SUMO_ATTR_OFF
Definition: SUMOXMLDefinitions.h:761
ICON_TAZ
Definition: GUIIcons.h:286
GNEAttributeCarrier::TAGTYPE_DEMANDELEMENT
Definition: GNEAttributeCarrier.h:285
GNEAttributeCarrier::fillShapes
static void fillShapes()
fill Shapes
Definition: GNEAttributeCarrier.cpp:2845
SUMO_ATTR_Z
Definition: SUMOXMLDefinitions.h:401
SUMO_ATTR_JM_DRIVE_AFTER_YELLOW_TIME
Definition: SUMOXMLDefinitions.h:612
SUMO_ATTR_NUMLANES
Definition: SUMOXMLDefinitions.h:384
SUMO_ATTR_TMP1
Definition: SUMOXMLDefinitions.h:550
Shape::DEFAULT_LAYER
static const double DEFAULT_LAYER
Definition: Shape.h:44
SUMO_ATTR_PERIOD
Definition: SUMOXMLDefinitions.h:643
GNEAttributeCarrier::TagProperties::begin
std::vector< AttributeProperties >::const_iterator begin() const
get begin of attribute values (used for iterate)
Definition: GNEAttributeCarrier.cpp:634
StringBijection::getStrings
std::vector< std::string > getStrings() const
Definition: StringBijection.h:132
SUMOXMLDefinitions::RightOfWayValues
static StringBijection< RightOfWay > RightOfWayValues
righ of way algorithms
Definition: SUMOXMLDefinitions.h:1372
SUMO_TAG_PERSON
Definition: SUMOXMLDefinitions.h:296
SUMO_ATTR_CF_PWAGNER2009_APPROB
Definition: SUMOXMLDefinitions.h:832
SUMO_TAG_LANE
begin/end of the description of a single lane
Definition: SUMOXMLDefinitions.h:50
GNEAttributeCarrier::isGenericParametersValid
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
Definition: GNEAttributeCarrier.cpp:1354
GNEAttributeCarrier::TAGPROPERTY_DIALOG
Definition: GNEAttributeCarrier.h:308
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
SUMO_ATTR_EDGE
Definition: SUMOXMLDefinitions.h:424
ICON_PTYPE
Definition: GUIIcons.h:294
SUMO_ATTR_TLID
link,node: the traffic light id responsible for this link
Definition: SUMOXMLDefinitions.h:679
SUMO_ATTR_LINES
Definition: SUMOXMLDefinitions.h:773
GNEAttributeCarrier::TagProperties::isRoute
bool isRoute() const
return true if tag correspond to a route element
Definition: GNEAttributeCarrier.cpp:742
GNEAttributeCarrier::AttributeProperties::isUnique
bool isUnique() const
return true if atribute is unique
Definition: GNEAttributeCarrier.cpp:434
NODETYPE_INTERNAL
Definition: SUMOXMLDefinitions.h:1063
GNEAttributeCarrier::AttributeProperties::getDefinition
const std::string & getDefinition() const
get default value
Definition: GNEAttributeCarrier.cpp:194
ICON_DESTPROBREROUTE
Definition: GUIIcons.h:283
SUMO_ATTR_LOADING_DURATION
Definition: SUMOXMLDefinitions.h:463
GNEAttributeCarrier::AttributeProperties::isFloat
bool isFloat() const
return true if atribute is a float
Definition: GNEAttributeCarrier.cpp:344
SUMO_TAG_PTYPE
description of a person type (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:124
GNEAttributeCarrier::TAGTYPE_ADDITIONAL
Definition: GNEAttributeCarrier.h:283
SUMO_ATTR_COLOR
A color information.
Definition: SUMOXMLDefinitions.h:701
GNEAttributeCarrier::AttributeProperties::setDiscreteValues
void setDiscreteValues(const std::vector< std::string > &discreteValues)
set discrete values
Definition: GNEAttributeCarrier.cpp:128
EmptyData
Definition: UtilExceptions.h:69
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:58
SUMO_TAG_POI
begin/end of the description of a Point of interest
Definition: SUMOXMLDefinitions.h:54
StringTokenizer::next
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
Definition: StringTokenizer.cpp:100
GNEAttributeCarrier::TagProperties::isStop
bool isStop() const
return true if tag correspond to a stop element
Definition: GNEAttributeCarrier.cpp:748
GNEAttributeCarrier::TagProperties::end
std::vector< AttributeProperties >::const_iterator end() const
get end of attribute values (used for iterate)
Definition: GNEAttributeCarrier.cpp:640
GNEAttributeCarrier::TagProperties::isShape
bool isShape() const
return true if tag correspond to a shape
Definition: GNEAttributeCarrier.cpp:701
GNEAttributeCarrier::ATTRPROPERTY_VCLASS
Definition: GNEAttributeCarrier.h:74
GNEAttributeCarrier::TagProperties::isVehicleType
bool isVehicleType() const
return true if tag correspond to a vehicle type element
Definition: GNEAttributeCarrier.cpp:731
GNEAttributeCarrier::TAGPROPERTY_MASKSTARTENDPOS
Definition: GNEAttributeCarrier.h:315
SUMO_ATTR_SPEED
Definition: SUMOXMLDefinitions.h:385
GNE_ATTR_SHAPE_END
last coordinate of edge shape
Definition: SUMOXMLDefinitions.h:974
SUMO_ATTR_CONTAINER_CAPACITY
Definition: SUMOXMLDefinitions.h:648
GNEAttributeCarrier::ATTRPROPERTY_OPTIONAL
Definition: GNEAttributeCarrier.h:93
SUMO_ATTR_ARRIVALPOS
Definition: SUMOXMLDefinitions.h:438
SUMO_ATTR_SPEEDDEV
Definition: SUMOXMLDefinitions.h:457
SUMO_ATTR_VISIBILITY_DISTANCE
foe visibility distance of a link
Definition: SUMOXMLDefinitions.h:707
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
SUMO_TAG_DET_ENTRY
an e3 entry point
Definition: SUMOXMLDefinitions.h:82
SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:44
GNEAttributeCarrier::TagProperties::TagProperties
TagProperties()
default constructor
Definition: GNEAttributeCarrier.cpp:496
SUMO_ATTR_LANE
Definition: SUMOXMLDefinitions.h:635
ICON_WALK_EDGES
Definition: GUIIcons.h:304
SUMO_ATTR_ROUTEPROBE
Definition: SUMOXMLDefinitions.h:667
GNEAttributeCarrier::TagProperties::hasGEOShape
bool hasGEOShape() const
return true if tag correspond to an element that can use a geo shape
Definition: GNEAttributeCarrier.cpp:826
GNEAttributeCarrier::ATTRPROPERTY_UPDATEGEOMETRY
Definition: GNEAttributeCarrier.h:92
GNEAttributeCarrier::TagProperties::checkTagIntegrity
void checkTagIntegrity() const
check Tag integrity (this include all their attributes)
Definition: GNEAttributeCarrier.cpp:533
ICON_LANE
Definition: GUIIcons.h:254
SUMO_ATTR_CF_IDM_DELTA
Definition: SUMOXMLDefinitions.h:833
SUMO_TAG_VTYPE
description of a vehicle type
Definition: SUMOXMLDefinitions.h:122
SUMO_ATTR_CHARGING_STATION
Definition: SUMOXMLDefinitions.h:771
SUMO_ATTR_ENDPOS
Definition: SUMOXMLDefinitions.h:795
PositionVector
A list of positions.
Definition: PositionVector.h:46
SUMO_ATTR_CHARGEINTRANSIT
Allow/disallow charge in transit in Charging Stations.
Definition: SUMOXMLDefinitions.h:473
SUMO_ATTR_LCA_MAXSPEEDLATFACTOR
Definition: SUMOXMLDefinitions.h:603
SUMO_ATTR_LCA_KEEPRIGHT_PARAM
Definition: SUMOXMLDefinitions.h:591
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:602
GNEAttributeCarrier::TagProperties::hasMinimumNumberOfChildren
bool hasMinimumNumberOfChildren() const
return true if tag correspond to an element that only have a limited number of children
Definition: GNEAttributeCarrier.cpp:850
SUMOXMLDefinitions::isValidDetectorID
static bool isValidDetectorID(const std::string &value)
whether the given string is a valid id for an detector
Definition: SUMOXMLDefinitions.cpp:982
SUMO_TAG_PARKING_SPACE
A parking space for a single vehicle within a parking area.
Definition: SUMOXMLDefinitions.h:110
ICON_ROUTEPROBE
Definition: GUIIcons.h:273
SUMO_ATTR_LANE_CHANGE_MODEL
Definition: SUMOXMLDefinitions.h:458
ICON_WALK_BUSSTOP
Definition: GUIIcons.h:306
SUMO_ATTR_TMP5
Definition: SUMOXMLDefinitions.h:554
GNEAttributeCarrier::fillAdditionals
static void fillAdditionals()
fill Additionals
Definition: GNEAttributeCarrier.cpp:1778
SUMO_ATTR_TMP3
Definition: SUMOXMLDefinitions.h:552
GNEAttributeCarrier::TagProperties::canWriteChildrenSeparate
bool canWriteChildrenSeparate() const
return true if tag correspond to an element that can sort their children automatic
Definition: GNEAttributeCarrier.cpp:887
GNEAttributeCarrier::ATTRPROPERTY_PROBABILITY
Definition: GNEAttributeCarrier.h:81
SUMO_ATTR_SPREADTYPE
The information about how to spread the lanes from the given position.
Definition: SUMOXMLDefinitions.h:689
SUMO_ATTR_FILE
Definition: SUMOXMLDefinitions.h:662
SUMO_ATTR_DIR
The abstract direction of a link.
Definition: SUMOXMLDefinitions.h:703
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
GNEAttributeCarrier::fillDemandElements
static void fillDemandElements()
fill Demand Elements
Definition: GNEAttributeCarrier.cpp:3053
GNEAttributeCarrier::TAGPROPERTY_MASKXYZPOSITION
Definition: GNEAttributeCarrier.h:316
SUMO_ATTR_JM_IGNORE_FOE_PROB
Definition: SUMOXMLDefinitions.h:617
GNEAttributeCarrier::ATTRPROPERTY_FLOAT
Definition: GNEAttributeCarrier.h:68
SUMO_ATTR_JM_TIMEGAP_MINOR
Definition: SUMOXMLDefinitions.h:619
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:521
SUMO_ATTR_HASDRIVERSTATE
Definition: SUMOXMLDefinitions.h:450
GNEAttributeCarrier::AttributeProperties::isList
bool isList() const
return true if atribute is a list
Definition: GNEAttributeCarrier.cpp:422
SumoVehicleClassStrings
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
SUMO_ATTR_WEIGHT
Definition: SUMOXMLDefinitions.h:422
GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUESTATIC
Definition: GNEAttributeCarrier.h:86
SUMO_ATTR_JM_IGNORE_FOE_SPEED
Definition: SUMOXMLDefinitions.h:616
SUMO_ATTR_BEGIN
weights: time range begin
Definition: SUMOXMLDefinitions.h:675
SVS_UNKNOWN
not defined
Definition: SUMOVehicleClass.h:53
GNEAttributeCarrier::TAGTYPE_PERSONTRIP
Definition: GNEAttributeCarrier.h:295
GNEJunction.h
SUMO_ATTR_TO
Definition: SUMOXMLDefinitions.h:638
Shape::DEFAULT_IMG_HEIGHT
static const double DEFAULT_IMG_HEIGHT
Definition: Shape.h:51
SUMOXMLDefinitions::CarFollowModels
static StringBijection< SumoXMLTag > CarFollowModels
car following models
Definition: SUMOXMLDefinitions.h:1393
SUMO_ATTR_CHARGEDELAY
Delay in the charge of charging stations.
Definition: SUMOXMLDefinitions.h:475
SUMO_ATTR_LCA_PUSHYGAP
Definition: SUMOXMLDefinitions.h:595
GNEAttributeCarrier::parseMaskedPositionAttribute
static bool parseMaskedPositionAttribute(const SUMOSAXAttributes &attrs, const std::string &objectID, const TagProperties &tagProperties, const AttributeProperties &attrProperties, std::string &parsedAttribute, std::string &warningMessage)
parse and check masked (note: This function is only to improve legilibility)
Definition: GNEAttributeCarrier.cpp:4585
GNEAttributeCarrier::TagProperties::hasAttribute
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute attr
Definition: GNEAttributeCarrier.cpp:678
SUMO_ATTR_LCA_MAXSPEEDLATSTANDING
Definition: SUMOXMLDefinitions.h:602
GNEAttributeCarrier::AttributeProperties::cannotBeZero
bool cannotBeZero() const
return true if atribute cannot be zero
Definition: GNEAttributeCarrier.cpp:392
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEAttributeCarrier::ATTRPROPERTY_SYNONYM
Definition: GNEAttributeCarrier.h:89
GNEAttributeCarrier::TagProperties::canAutomaticSortChildren
bool canAutomaticSortChildren() const
return true if tag correspond to an element that can sort their children automatic
Definition: GNEAttributeCarrier.cpp:881
SUMO_ATTR_PERSON_NUMBER
Definition: SUMOXMLDefinitions.h:649
SUMO_TAG_PARKING_ZONE_REROUTE
entry for an alternative parking zone
Definition: SUMOXMLDefinitions.h:199
GNEAttributeCarrier::TagProperties::getTagSynonym
SumoXMLTag getTagSynonym() const
get tag synonym
Definition: GNEAttributeCarrier.cpp:668
GNEAttributeCarrier::TAGTYPE_VEHICLE
Definition: GNEAttributeCarrier.h:290
GNE_ATTR_SHAPE_START
first coordinate of edge shape
Definition: SUMOXMLDefinitions.h:972
NumberFormatException
Definition: UtilExceptions.h:96
Shape::DEFAULT_RELATIVEPATH
static const bool DEFAULT_RELATIVEPATH
Definition: Shape.h:49
SUMO_TAG_WALK_EDGES
Definition: SUMOXMLDefinitions.h:307
GNEAttributeCarrier::TagProperties::isVehicle
bool isVehicle() const
return true if tag correspond to a vehicle element
Definition: GNEAttributeCarrier.cpp:737
SUMO_TAG_DEST_PROB_REROUTE
probability of destiny of a reroute
Definition: SUMOXMLDefinitions.h:191
SUMO_ATTR_LCA_SUBLANE_PARAM
Definition: SUMOXMLDefinitions.h:592
GNEAttributeCarrier::FEATURE_GUESSED
static const std::string FEATURE_GUESSED
feature has been reguessed (may still be unchanged be we can't tell (yet)
Definition: GNEAttributeCarrier.h:587
GNEAttributeCarrier::fillCommonVehicleAttributes
static void fillCommonVehicleAttributes(SumoXMLTag currentTag)
fill common vehicle attributes (used by vehicles, trips, routeFlows and flows)
Definition: GNEAttributeCarrier.cpp:3851
GNEAttributeCarrier::AttributeProperties::AttributeProperties
AttributeProperties()
default constructor
Definition: GNEAttributeCarrier.cpp:58
RGBColor
Definition: RGBColor.h:40
SUMO_ATTR_LINEWIDTH
Definition: SUMOXMLDefinitions.h:712
SUMO_TAG_ROUTEFLOW
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:152
SUMO_ATTR_ARRIVALSPEED
Definition: SUMOXMLDefinitions.h:440
SUMO_ATTR_TRIP_ID
Definition: SUMOXMLDefinitions.h:774
GNEAttributeCarrier::ATTRPROPERTY_POSITION
Definition: GNEAttributeCarrier.h:72
SUMO_ATTR_APPARENTDECEL
Definition: SUMOXMLDefinitions.h:449
ICON_E3EXIT
Definition: GUIIcons.h:270
canParseVehicleClasses
bool canParseVehicleClasses(const std::string &classes)
Checks whether the given string contains only known vehicle classes.
Definition: SUMOVehicleClass.cpp:252
GNEAttributeCarrier::TagProperties::isAttributeDeprecated
bool isAttributeDeprecated(SumoXMLAttr attr) const
return true if attribute of this tag is deprecated
Definition: GNEAttributeCarrier.cpp:905
SUMO_ATTR_CHARGINGPOWER
Definition: SUMOXMLDefinitions.h:469
GNEAttributeCarrier::TagProperties::canBlockShape
bool canBlockShape() const
return true if tag correspond to an element that can block their shape
Definition: GNEAttributeCarrier.cpp:808
SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
Definition: SUMOXMLDefinitions.h:150
ICON_CHARGINGSTATION
Definition: GUIIcons.h:265
SUMO_ATTR_PROB
Definition: SUMOXMLDefinitions.h:627
SUMO_ATTR_DECEL
Definition: SUMOXMLDefinitions.h:447
GNEAttributeCarrier::AttributeProperties::isFilename
bool isFilename() const
return true if atribute is a filename
Definition: GNEAttributeCarrier.cpp:404
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1171
SUMO_ATTR_COLLISION_MINGAP_FACTOR
Definition: SUMOXMLDefinitions.h:461
SUMO_ATTR_STARTPOS
Definition: SUMOXMLDefinitions.h:794
GNEAttributeCarrier::fillStopElements
static void fillStopElements()
fill Stop elements
Definition: GNEAttributeCarrier.cpp:3497
SUMO_TAG_CHARGING_STATION
A Charging Station.
Definition: SUMOXMLDefinitions.h:112
SUMO_TAG_STOP_CHARGINGSTATION
stop placed over a charging station (used in netedit)
Definition: SUMOXMLDefinitions.h:187
ICON_VAPORIZER
Definition: GUIIcons.h:274
SUMO_ATTR_ACCEL
Definition: SUMOXMLDefinitions.h:446
GNEAttributeCarrier::ATTRPROPERTY_RANGE
Definition: GNEAttributeCarrier.h:90
GNEAttributeCarrier::lanesConsecutives
static bool lanesConsecutives(const std::vector< GNELane * > &lanes)
check if lanes are consecutives
Definition: GNEAttributeCarrier.cpp:1128
SUMO_ATTR_KEEP_CLEAR
Whether vehicles must keep the junction clear.
Definition: SUMOXMLDefinitions.h:693
GNEAttributeCarrier::AttributeProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:99
PollutantsInterface.h
GNEAttributeCarrier::AttributeProperties::isColor
bool isColor() const
return true if atribute is a color
Definition: GNEAttributeCarrier.cpp:398
GNEAttributeCarrier::allowedTagsByCategory
static std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGTYPE_NETELEMENT,...
Definition: GNEAttributeCarrier.cpp:1231
SUMO_ATTR_LCA_OPPOSITE_PARAM
Definition: SUMOXMLDefinitions.h:593
SUMO_TAG_POILANE
begin/end of the description of a Point of interest over Lane (used by Netedit)
Definition: SUMOXMLDefinitions.h:56
SUMO_TAG_VSS
A variable speed sign.
Definition: SUMOXMLDefinitions.h:90
SUMO_TAG_PERSONSTOP_LANE
Definition: SUMOXMLDefinitions.h:314
GNEAttributeCarrier::AttributeProperties::isEnablitable
bool isEnablitable() const
return true if atribute is enablitable
Definition: GNEAttributeCarrier.cpp:488
NBEdge::UNSPECIFIED_CONTPOS
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:312
GNEAttributeCarrier::TAGPROPERTY_GEOSHAPE
Definition: GNEAttributeCarrier.h:307
SUMO_ATTR_PASS
Definition: SUMOXMLDefinitions.h:765
GNEAttributeCarrier::TAGPROPERTY_RTREE
Definition: GNEAttributeCarrier.h:319
SUMO_ATTR_TLLINKINDEX2
link: the index of the opposite direction link of a pedestrian crossing
Definition: SUMOXMLDefinitions.h:685
GNEAttributeCarrier::fillPersonElements
static void fillPersonElements()
fill Person Elements
Definition: GNEAttributeCarrier.cpp:3586
ICON_ACCESS
Definition: GUIIcons.h:263
SUMOVehicleShape
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
Definition: SUMOVehicleClass.h:51
StringTokenizer
Definition: StringTokenizer.h:62
GNEAttributeCarrier::TagProperties::isDemandElement
bool isDemandElement() const
return true if tag correspond to a demand element
Definition: GNEAttributeCarrier.cpp:713
SUMO_ATTR_NOTHING
invalid attribute
Definition: SUMOXMLDefinitions.h:375
ICON_VEHICLE
Definition: GUIIcons.h:295
DEFAULT_VTYPE_ID
const std::string DEFAULT_VTYPE_ID
SUMO_ATTR_DEPARTPOS_LAT
Definition: SUMOXMLDefinitions.h:435
GNEAttributeCarrier::TagProperties::hasGEOPosition
bool hasGEOPosition() const
return true if tag correspond to an element that can use a geo position
Definition: GNEAttributeCarrier.cpp:820
RGBColor::parseColor
static RGBColor parseColor(std::string coldef)
Parses a color information.
Definition: RGBColor.cpp:177
GNEAttributeCarrier::AttributeProperties::isWriteXMLOptional
bool isWriteXMLOptional() const
return true if atribute is write XML optional
Definition: GNEAttributeCarrier.cpp:440
ICON_LOCATEPOI
Definition: GUIIcons.h:84
SUMO_ATTR_LCA_SPEEDGAINRIGHT
Definition: SUMOXMLDefinitions.h:601
GNEAttributeCarrier::TAGTYPE_ROUTE
Definition: GNEAttributeCarrier.h:291
SUMO_ATTR_CONT
Definition: SUMOXMLDefinitions.h:745
SUMO_ATTR_WIDTH
Definition: SUMOXMLDefinitions.h:387
SUMO_ATTR_DEPARTSPEED
Definition: SUMOXMLDefinitions.h:436
SUMO_ATTR_ROUTE
Definition: SUMOXMLDefinitions.h:441
SUMO_ATTR_EDGES
the edges of a route
Definition: SUMOXMLDefinitions.h:428
GNEAttributeCarrier::ATTRPROPERTY_LIST
Definition: GNEAttributeCarrier.h:83
SUMO_ATTR_DEPARTLANE
Definition: SUMOXMLDefinitions.h:433
SUMO_TAG_PARKING_AREA
A parking area.
Definition: SUMOXMLDefinitions.h:108
ICON_E2
Definition: GUIIcons.h:267
SUMO_ATTR_JM_DRIVE_RED_SPEED
Definition: SUMOXMLDefinitions.h:614
GNEAttributeCarrier::TAGTYPE_TAZ
Definition: GNEAttributeCarrier.h:286
SUMO_ATTR_LAYER
A layer number.
Definition: SUMOXMLDefinitions.h:709
SUMO_TAG_EDGE
begin/end of the description of an edge
Definition: SUMOXMLDefinitions.h:48
GNEAttributeCarrier::ATTRPROPERTY_SUMOTIME
Definition: GNEAttributeCarrier.h:69
ICON_PERSONTRIP_BUSSTOP
Definition: GUIIcons.h:303
SUMO_ATTR_TRIGGERED
Definition: SUMOXMLDefinitions.h:796
GNEAttributeCarrier::TAGPROPERTY_AUTOMATICSORTING
Definition: GNEAttributeCarrier.h:313
GNEAttributeCarrier::TagProperties::getParentTag
SumoXMLTag getParentTag() const
if Tag owns a parent, return parent tag
Definition: GNEAttributeCarrier.cpp:658
GNEAttributeCarrier::TAGPROPERTY_GEOPOSITION
Definition: GNEAttributeCarrier.h:306
ProcessError
Definition: UtilExceptions.h:40
SUMO_TAG_STEP
trigger: a step description
Definition: SUMOXMLDefinitions.h:158
SUMO_ATTR_PERSON_CAPACITY
Definition: SUMOXMLDefinitions.h:647
ICON_LOCATEPOLY
Definition: GUIIcons.h:85
GNEAttributeCarrier::TagProperties::addAttribute
void addAttribute(const AttributeProperties &attributeProperty)
add attribute (duplicated attributed aren't allowed)
Definition: GNEAttributeCarrier.cpp:588
Shape::DEFAULT_TYPE
static const std::string DEFAULT_TYPE
Definition: Shape.h:43
SUMO_ATTR_LCA_LOOKAHEADLEFT
Definition: SUMOXMLDefinitions.h:600
GNEAttributeCarrier::AttributeProperties::setTagPropertyParent
void setTagPropertyParent(TagProperties *tagPropertyParent)
set tag property parent
Definition: GNEAttributeCarrier.cpp:159
SUMO_ATTR_CONTAINER_NUMBER
Definition: SUMOXMLDefinitions.h:650
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
GNEAttributeCarrier::myTagProperties
static std::map< SumoXMLTag, TagProperties > myTagProperties
map with the tags properties
Definition: GNEAttributeCarrier.h:864
SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
Definition: SUMOXMLDefinitions.h:197
GNEEdge.h
GNEAttributeCarrier::AttributeProperties::getAttrStr
const std::string & getAttrStr() const
get XML Attribute
Definition: GNEAttributeCarrier.cpp:171
GNEAttributeCarrier::myTagProperty
const TagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
Definition: GNEAttributeCarrier.h:792
SUMO_ATTR_LCA_OVERTAKE_RIGHT
Definition: SUMOXMLDefinitions.h:605
GNEAttributeCarrier::AttributeProperties::getDefaultValue
const std::string & getDefaultValue() const
get default value
Definition: GNEAttributeCarrier.cpp:200
GNEAttributeCarrier::ATTRPROPERTY_STRING
Definition: GNEAttributeCarrier.h:71
GNEAttributeCarrier::TAGPROPERTY_MINIMUMCHILDREN
Definition: GNEAttributeCarrier.h:310
SUMOXMLDefinitions::isValidGenericParameterKey
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
Definition: SUMOXMLDefinitions.cpp:1034
ICON_CROSSING
Definition: GUIIcons.h:257
GNEAttributeCarrier::TagProperties::canBeReparent
bool canBeReparent() const
return true if tag correspond to an element that can be reparent
Definition: GNEAttributeCarrier.cpp:875
SUMO_ATTR_LCA_STRATEGIC_PARAM
Definition: SUMOXMLDefinitions.h:588
GNEAttributeCarrier::AttributeProperties::getMinimumRange
double getMinimumRange() const
get minimum range
Definition: GNEAttributeCarrier.cpp:295
SUMO_ATTR_Y
Definition: SUMOXMLDefinitions.h:400
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
SUMO_ATTR_JM_SIGMA_MINOR
Definition: SUMOXMLDefinitions.h:618
GNEAttributeCarrier::TagProperties::isWalk
bool isWalk() const
return true if tag correspond to a walk element
Definition: GNEAttributeCarrier.cpp:772
SUMO_TAG_REROUTER
A rerouter.
Definition: SUMOXMLDefinitions.h:96
ICON_E3
Definition: GUIIcons.h:268
NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
Definition: NBEdge.h:315
SUMO_TAG_PERSONTRIP_BUSSTOP
Definition: SUMOXMLDefinitions.h:306
GNEAttributeCarrier::ATTRPROPERTY_ANGLE
Definition: GNEAttributeCarrier.h:82
GNEAttributeCarrier::AttributeProperties::~AttributeProperties
~AttributeProperties()
destructor
Definition: GNEAttributeCarrier.cpp:99
GNEAttributeCarrier::fillVehicleElements
static void fillVehicleElements()
fill vehicle elements
Definition: GNEAttributeCarrier.cpp:3348
GNEAttributeCarrier::AttributeProperties::getAttr
SumoXMLAttr getAttr() const
get XML Attribute
Definition: GNEAttributeCarrier.cpp:165
GUIIcon
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:36
FormatException
Definition: UtilExceptions.h:82
SUMO_ATTR_DISTANCE
Definition: SUMOXMLDefinitions.h:396
GNEAttributeCarrier::AttributeProperties::isSecuential
bool isSecuential() const
return true if atribute is sequential
Definition: GNEAttributeCarrier.cpp:428
GNEAttributeCarrier::AttributeProperties::isVClass
bool isVClass() const
return true if atribute is a VehicleClass
Definition: GNEAttributeCarrier.cpp:410
NBEdge::UNSPECIFIED_SPEED
static const double UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:309
ICON_ROUTEFLOW
Definition: GUIIcons.h:298
SUMO_TAG_CLOSING_REROUTE
reroute of type closing
Definition: SUMOXMLDefinitions.h:193
GNEAttributeCarrier::AttributeProperties::getMaximumRange
double getMaximumRange() const
get maximum range
Definition: GNEAttributeCarrier.cpp:305
SUMO_ATTR_LCA_IMPATIENCE
Definition: SUMOXMLDefinitions.h:597
SUMO_TAG_VEHICLE
description of a vehicle
Definition: SUMOXMLDefinitions.h:120
SUMO_ATTR_TIME
trigger: the time of the step
Definition: SUMOXMLDefinitions.h:673
SUMO_ATTR_RELATIVEPATH
Definition: SUMOXMLDefinitions.h:790
SUMO_ATTR_FRIENDLY_POS
Definition: SUMOXMLDefinitions.h:762
string2time
SUMOTime string2time(const std::string &r)
Definition: SUMOTime.cpp:42
GNEAttributeCarrier::TAGPROPERTY_BLOCKSHAPE
Definition: GNEAttributeCarrier.h:304
GNELane.h
ICON_PERSONFLOW
Definition: GUIIcons.h:301
GNEAttributeCarrier::TAGTYPE_DETECTOR
Definition: GNEAttributeCarrier.h:288
GNEAttributeCarrier::AttributeProperties::getTagPropertyParent
const TagProperties & getTagPropertyParent() const
get reference to tagProperty parent
Definition: GNEAttributeCarrier.cpp:177
GNEAttributeCarrier::TAGPROPERTY_NOGENERICPARAMETERS
Definition: GNEAttributeCarrier.h:318
ICON_VTYPE
Definition: GUIIcons.h:293
SUMO_ATTR_FREQUENCY
Definition: SUMOXMLDefinitions.h:660
SUMOXMLDefinitions::isValidGenericParameterValue
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
Definition: SUMOXMLDefinitions.cpp:1041
SUMO_ATTR_LCA_ASSERTIVE
Definition: SUMOXMLDefinitions.h:596
GNEAttributeCarrier::TAGPROPERTY_PARENT
Definition: GNEAttributeCarrier.h:309
GNEAttributeCarrier::ATTRPROPERTY_SECUENCIAL
Definition: GNEAttributeCarrier.h:84
SUMO_ATTR_POSITION
Definition: SUMOXMLDefinitions.h:658
NODETYPE_DEAD_END
Definition: SUMOXMLDefinitions.h:1064
SUMO_ATTR_FILL
Fill the polygon.
Definition: SUMOXMLDefinitions.h:711
ICON_E1INSTANT
Definition: GUIIcons.h:271
GNEAttributeCarrier::ATTRPROPERTY_WRITEXMLOPTIONAL
Definition: GNEAttributeCarrier.h:85
GNEAttributeCarrier::AttributeProperties::hasMutableDefaultValue
bool hasMutableDefaultValue() const
return true if attribute owns a mutable default value
Definition: GNEAttributeCarrier.cpp:321
SUMO_ATTR_CF_WIEDEMANN_SECURITY
Definition: SUMOXMLDefinitions.h:838
GNEAttributeCarrier::AttributeProperties::hasStaticDefaultValue
bool hasStaticDefaultValue() const
return true if attribute owns a static default value
Definition: GNEAttributeCarrier.cpp:315
SUMO_ATTR_FROM_LANE
Definition: SUMOXMLDefinitions.h:716
SUMO_ATTR_INDEX
Definition: SUMOXMLDefinitions.h:801
SUMO_TAG_E2DETECTOR_MULTILANE
an e2 detector over multiple lanes (used by Netedit)
Definition: SUMOXMLDefinitions.h:70
GNEAttributeCarrier::TagProperties::~TagProperties
~TagProperties()
destructor
Definition: GNEAttributeCarrier.cpp:517
SUMO_ATTR_FROM
Definition: SUMOXMLDefinitions.h:637
GNEAttributeCarrier::ATTRPROPERTY_FILENAME
Definition: GNEAttributeCarrier.h:78
GNEAttributeCarrier::INVALID_POSITION
static const double INVALID_POSITION
invalid double position
Definition: GNEAttributeCarrier.h:600
SUMO_ATTR_CARRIAGE_GAP
Definition: SUMOXMLDefinitions.h:1011
SUMO_ATTR_RADIUS
The turning radius at an intersection in m.
Definition: SUMOXMLDefinitions.h:691
GNEAttributeCarrier::parse
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
SUMO_ATTR_LANES
Definition: SUMOXMLDefinitions.h:636
GNEAttributeCarrier::AttributeProperties::isDiscrete
bool isDiscrete() const
return true if atribute is discrete
Definition: GNEAttributeCarrier.cpp:446
SUMO_TAG_TAZ
a traffic assignment zone
Definition: SUMOXMLDefinitions.h:134
GNEAttributeCarrier::TagProperties::isPersonTrip
bool isPersonTrip() const
return true if tag correspond to a person trip
Definition: GNEAttributeCarrier.cpp:766
GNEAttributeCarrier::TAGTYPE_STOP
Definition: GNEAttributeCarrier.h:292
SUMO_ATTR_JM_CROSSING_GAP
Definition: SUMOXMLDefinitions.h:611
ICON_PARKINGZONEREROUTE
Definition: GUIIcons.h:284
GNEAttributeCarrier::fillCommonStopAttributes
static void fillCommonStopAttributes(SumoXMLTag currentTag)
fill stop person attributes (used by stops and personStps)
Definition: GNEAttributeCarrier.cpp:4339
SumoVehicleShapeStrings
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
OptionsCont::getFloat
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
Definition: OptionsCont.cpp:209
GNEAttributeCarrier::TAGPROPERTY_BLOCKMOVEMENT
Definition: GNEAttributeCarrier.h:303
SUMO_ATTR_HEIGHT
Definition: SUMOXMLDefinitions.h:786
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
GNEAttributeCarrier::fillCarFollowingModelAttributes
static void fillCarFollowingModelAttributes(SumoXMLTag currentTag)
fill Car Following Model of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:3972
GNEAttributeCarrier::TagProperties::isPersonPlan
bool isPersonPlan() const
return true if tag correspond to a person plan
Definition: GNEAttributeCarrier.cpp:760
GNEAttributeCarrier::TagProperties::isSelectable
bool isSelectable() const
return true if tag correspond to a selectable element
Definition: GNEAttributeCarrier.cpp:796
SUMO_TAG_BUS_STOP
A bus stop.
Definition: SUMOXMLDefinitions.h:98
SUMO_ATTR_CF_PWAGNER2009_TAULAST
Definition: SUMOXMLDefinitions.h:831
SUMO_TAG_TAZSINK
a sink within a district (connection road)
Definition: SUMOXMLDefinitions.h:138
SUMO_ATTR_STATE
The state of a link.
Definition: SUMOXMLDefinitions.h:705
GNEAttributeCarrier::TagProperties::getDefaultValue
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
Definition: GNEAttributeCarrier.cpp:572
SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
Definition: SUMOXMLDefinitions.h:185
StringUtils::toInt
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
Definition: StringUtils.cpp:246
GNEAttributeCarrier::allowedTags
static std::vector< SumoXMLTag > allowedTags(bool onlyDrawables)
get tags of all editable element types
Definition: GNEAttributeCarrier.cpp:1214
SUMO_ATTR_PRIORITY
Definition: SUMOXMLDefinitions.h:383
SUMO_ATTR_TRAIN_TYPE
Definition: SUMOXMLDefinitions.h:583
SUMO_ATTR_DURATION
Definition: SUMOXMLDefinitions.h:665
SUMO_ATTR_VIA
Definition: SUMOXMLDefinitions.h:720
ICON_PARKINGAREA
Definition: GUIIcons.h:277
SUMO_ATTR_ROADSIDE_CAPACITY
Definition: SUMOXMLDefinitions.h:769
SUMO_ATTR_SIGMA
Definition: SUMOXMLDefinitions.h:548
SUMO_TAG_CROSSING
crossing between edges for pedestrians
Definition: SUMOXMLDefinitions.h:227
SUMO_ATTR_HALTING_TIME_THRESHOLD
Definition: SUMOXMLDefinitions.h:747
GNEAttributeCarrier::TAGTYPE_PERSONPLAN
Definition: GNEAttributeCarrier.h:294
GNEAttributeCarrier::AttributeProperties::getDiscreteValues
const std::vector< std::string > & getDiscreteValues() const
get discrete values
Definition: GNEAttributeCarrier.cpp:279
SUMO_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:154
SUMO_ATTR_OUTPUT
Definition: SUMOXMLDefinitions.h:785
SUMO_ATTR_EXPECTED
Definition: SUMOXMLDefinitions.h:799
GNEAttributeCarrier::TagProperties::isPersonStop
bool isPersonStop() const
return true if tag correspond to a person stop element
Definition: GNEAttributeCarrier.cpp:784
SUMO_ATTR_CAR_FOLLOW_MODEL
Definition: SUMOXMLDefinitions.h:459
ICON_TAZEDGE
Definition: GUIIcons.h:287
GNEAttributeCarrier::TagProperties::hasTagSynonym
bool hasTagSynonym() const
return true if tag correspond to an element that will be written in XML with another tag
Definition: GNEAttributeCarrier.cpp:838
ICON_RIDE_FROMTO
Definition: GUIIcons.h:308
SUMO_ATTR_IMPATIENCE
Definition: SUMOXMLDefinitions.h:793
GNEAttributeCarrier::TAGTYPE_PERSONSTOP
Definition: GNEAttributeCarrier.h:298
ICON_E1
Definition: GUIIcons.h:266
SUMO_ATTR_TLLINKINDEX
link: the index of the link within the traffic light
Definition: SUMOXMLDefinitions.h:683
SUMO_ATTR_VTYPES
Definition: SUMOXMLDefinitions.h:630
GNEAttributeCarrier::~GNEAttributeCarrier
virtual ~GNEAttributeCarrier()
Destructor.
Definition: GNEAttributeCarrier.cpp:919
GNEAttributeCarrier::AttributeProperties::isBool
bool isBool() const
return true if atribute is boolean
Definition: GNEAttributeCarrier.cpp:356
GNEAttributeCarrier::fillLaneChangingModelAttributes
static void fillLaneChangingModelAttributes(SumoXMLTag currentTag)
fill Junction Model Attributes of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:4186
SUMO_ATTR_EXPECTED_CONTAINERS
Definition: SUMOXMLDefinitions.h:800
SUMOXMLDefinitions::TrainTypes
static StringBijection< TrainType > TrainTypes
train types
Definition: SUMOXMLDefinitions.h:1402
SUMO_ATTR_LCA_TIME_TO_IMPATIENCE
Definition: SUMOXMLDefinitions.h:598
GNEAttributeCarrier::FEATURE_MODIFIED
static const std::string FEATURE_MODIFIED
feature has been manually modified (implies approval)
Definition: GNEAttributeCarrier.h:590
GNEAttributeCarrier::AttributeProperties::hasAttrSynonym
bool hasAttrSynonym() const
return true if Attr correspond to an element that will be written in XML with another name
Definition: GNEAttributeCarrier.cpp:327
SUMO_ATTR_GUISHAPE
Definition: SUMOXMLDefinitions.h:787
GNEAttributeCarrier::TagProperties::canBlockMovement
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
Definition: GNEAttributeCarrier.cpp:802
SUMOXMLDefinitions::isValidNetID
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
Definition: SUMOXMLDefinitions.cpp:964
SUMO_TAG_VAPORIZER
vaporizer of vehicles
Definition: SUMOXMLDefinitions.h:219
SUMOXMLDefinitions::isValidVehicleID
static bool isValidVehicleID(const std::string &value)
whether the given string is a valid id for a vehicle or flow
Definition: SUMOXMLDefinitions.cpp:970
SUMO_ATTR_K
Definition: SUMOXMLDefinitions.h:816
ICON_JUNCTION
Definition: GUIIcons.h:252
SUMO_ATTR_CONTAINER_TRIGGERED
Definition: SUMOXMLDefinitions.h:797
GNEAttributeCarrier::getAttribute
virtual std::string getAttribute(SumoXMLAttr key) const =0
GNEAttributeCarrier::AttributeProperties::isNumerical
bool isNumerical() const
return true if atribute is numerical (int or float)
Definition: GNEAttributeCarrier.cpp:380
ICON_WALK_FROMTO
Definition: GUIIcons.h:305
ICON_VARIABLESPEEDSIGN
Definition: GUIIcons.h:275
SUMO_ATTR_VISIBLE
Definition: SUMOXMLDefinitions.h:893
ICON_CLOSINGLANEREROUTE
Definition: GUIIcons.h:282
GNEAttributeCarrier::TAGTYPE_RIDE
Definition: GNEAttributeCarrier.h:297
SUMO_ATTR_EFFICIENCY
Eficiency of the charge in Charging Stations.
Definition: SUMOXMLDefinitions.h:471
SUMO_ATTR_ONROAD
Definition: SUMOXMLDefinitions.h:770
SUMO_TAG_PERSONTRIP_FROMTO
Definition: SUMOXMLDefinitions.h:305
ICON_CLOSINGREROUTE
Definition: GUIIcons.h:281
SUMO_ATTR_CARRIAGE_LENGTH
Definition: SUMOXMLDefinitions.h:1009
SUMO_ATTR_ALLOW
Definition: SUMOXMLDefinitions.h:779
SUMO_TAG_RIDE_BUSSTOP
Definition: SUMOXMLDefinitions.h:312
ICON_ROUTE
Definition: GUIIcons.h:292
SUMO_ATTR_POSITION_LAT
Definition: SUMOXMLDefinitions.h:659
SUMO_ATTR_RIGHT_OF_WAY
How to compute right of way.
Definition: SUMOXMLDefinitions.h:695
SUMO_TAG_CONNECTION
connectio between two lanes
Definition: SUMOXMLDefinitions.h:203
GNEAttributeCarrier::TagProperties::isDrawable
bool isDrawable() const
return true if tag correspond to a drawable element
Definition: GNEAttributeCarrier.cpp:790
GNEAttributeCarrier::TagProperties::isDetector
bool isDetector() const
return true if tag correspond to a shape (Only used to group all detectors in the XML)
Definition: GNEAttributeCarrier.cpp:725
SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME
Definition: SUMOXMLDefinitions.h:613
joinToString
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:247
GNEAttributeCarrier::ATTRPROPERTY_COLOR
Definition: GNEAttributeCarrier.h:73
SUMO_ATTR_EMERGENCYDECEL
Definition: SUMOXMLDefinitions.h:448
GNEAttributeCarrier::TAGTYPE_STOPPINGPLACE
Definition: GNEAttributeCarrier.h:287
SUMO_ATTR_UNCONTROLLED
Definition: SUMOXMLDefinitions.h:764
SUMO_ATTR_VCLASS
Definition: SUMOXMLDefinitions.h:452
GNEAttributeCarrier::TagProperties::hasDialog
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
Definition: GNEAttributeCarrier.cpp:844
SUMO_ATTR_MODES
Definition: SUMOXMLDefinitions.h:651
GNEAttributeCarrier::AttributeProperties::requiereUpdateGeometry
bool requiereUpdateGeometry() const
return true if atribute requieres a update geometry in setAttribute(...)
Definition: GNEAttributeCarrier.cpp:470
SUMOXMLDefinitions::TrafficLightTypes
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types
Definition: SUMOXMLDefinitions.h:1387
GNEAttributeCarrier::TAGTYPE_NETELEMENT
Definition: GNEAttributeCarrier.h:282
SUMO_TAG_ROUTEPROBE
a routeprobe detector
Definition: SUMOXMLDefinitions.h:116
SUMO_TAG_WALK_BUSSTOP
Definition: SUMOXMLDefinitions.h:309
GNENet::retrieveEdge
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:1020
GNEAttributeCarrier::FEATURE_APPROVED
static const std::string FEATURE_APPROVED
feature has been approved but not changed (i.e. after being reguessed)
Definition: GNEAttributeCarrier.h:593
GNEAttributeCarrier::TagProperties::getGUIIcon
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
Definition: GNEAttributeCarrier.cpp:652
SUMO_ATTR_PARKING
Definition: SUMOXMLDefinitions.h:798
SUMO_ATTR_JAM_DIST_THRESHOLD
Definition: SUMOXMLDefinitions.h:749
GNEAttributeCarrier.h
SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:126
GNEAttributeCarrier::getAttributeForSelection
virtual std::string getAttributeForSelection(SumoXMLAttr key) const
method for getting the attribute in the context of object selection
Definition: GNEAttributeCarrier.cpp:1159
GNENet::retrieveLane
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
Definition: GNENet.cpp:1179
Shape::DEFAULT_ANGLE
static const double DEFAULT_ANGLE
Definition: Shape.h:47
StringTokenizer::getVector
std::vector< std::string > getVector()
return vector of strings
Definition: StringTokenizer.cpp:192
SUMOXMLDefinitions::FringeTypeValues
static StringBijection< FringeType > FringeTypeValues
fringe types
Definition: SUMOXMLDefinitions.h:1375
GNEAttributeCarrier::AttributeProperties::getPositionListed
int getPositionListed() const
get position in list (used in frames for listing attributes with certain sort)
Definition: GNEAttributeCarrier.cpp:183
SUMO_TAG_E3DETECTOR
an e3 detector
Definition: SUMOXMLDefinitions.h:74
SUMO_ATTR_MINGAP
Definition: SUMOXMLDefinitions.h:460
GNEAttributeCarrier::TagProperties::getAttributeProperties
const AttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
Definition: GNEAttributeCarrier.cpp:621
GNEAttributeCarrier::getTagProperties
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
Definition: GNEAttributeCarrier.cpp:1196
ICON_CALIBRATOR
Definition: GUIIcons.h:276
SUMOXMLDefinitions::LaneSpreadFunctions
static StringBijection< LaneSpreadFunction > LaneSpreadFunctions
lane spread functions
Definition: SUMOXMLDefinitions.h:1369
SUMO_TAG_PERSONFLOW
Definition: SUMOXMLDefinitions.h:300
SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
Definition: SUMOXMLDefinitions.h:195
GNEAttributeCarrier::AttributeProperties::isCombinable
bool isCombinable() const
return true if atribute is combinable with other Attribute
Definition: GNEAttributeCarrier.cpp:452
SUMO_ATTR_ACTIONSTEPLENGTH
Definition: SUMOXMLDefinitions.h:451
GNEAttributeCarrier::AttributeProperties::isNonEditable
bool isNonEditable() const
return true if atribute isn't editable
Definition: GNEAttributeCarrier.cpp:458
StringTokenizer.h
SUMO_ATTR_END
weights: time range end
Definition: SUMOXMLDefinitions.h:677
GNEAttributeCarrier::ATTRPROPERTY_POSITIVE
Definition: GNEAttributeCarrier.h:75
GNEAttributeCarrier::TagProperties::canCloseShape
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
Definition: GNEAttributeCarrier.cpp:814
GNEAttributeCarrier::TAGPROPERTY_SORTINGCHILDREN
Definition: GNEAttributeCarrier.h:320
GNEAttributeCarrier::AttributeProperties::isExtended
bool isExtended() const
return true if atribute is extended
Definition: GNEAttributeCarrier.cpp:464
SUMO_ATTR_LOCOMOTIVE_LENGTH
Definition: SUMOXMLDefinitions.h:1010
SUMO_TAG_STOP_BUSSTOP
stop placed over a busStop (used in netedit)
Definition: SUMOXMLDefinitions.h:183
PollutantsInterface::getAllClassesStr
static const std::vector< std::string > & getAllClassesStr()
Get all SUMOEmissionClass in string format.
Definition: PollutantsInterface.cpp:83
GNEAttributeCarrier::TagProperties::hasParent
bool hasParent() const
return true if tag correspond to an element that can had another element as parent
Definition: GNEAttributeCarrier.cpp:832
FRINGE_TYPE_DEFAULT
Definition: SUMOXMLDefinitions.h:1108
GNEAttributeCarrier::TAGPROPERTY_DRAWABLE
Definition: GNEAttributeCarrier.h:302
GNEAttributeCarrier::ATTRPROPERTY_BOOL
Definition: GNEAttributeCarrier.h:70
ICON_PERSONTRIP_FROMTO
Definition: GUIIcons.h:302
SUMO_ATTR_FRINGE
Fringe type of node.
Definition: SUMOXMLDefinitions.h:697
GNEAttributeCarrier::AttributeProperties::isInt
bool isInt() const
return true if atribute is an integer
Definition: GNEAttributeCarrier.cpp:338
ICON_E3ENTRY
Definition: GUIIcons.h:269
GNEAttributeCarrier::AttributeProperties::getAttrSynonym
SumoXMLAttr getAttrSynonym() const
get tag synonym
Definition: GNEAttributeCarrier.cpp:285
SUMO_ATTR_DEPARTPOS
Definition: SUMOXMLDefinitions.h:434
SUMO_ATTR_TMP4
Definition: SUMOXMLDefinitions.h:553
SUMOXMLDefinitions::LateralAlignments
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
Definition: SUMOXMLDefinitions.h:1396
SUMO_TAG_INTERVAL
an aggreagated-output interval
Definition: SUMOXMLDefinitions.h:160
GNEAttributeCarrier::TagProperties::isRide
bool isRide() const
return true if tag correspond to a ride element
Definition: GNEAttributeCarrier.cpp:778
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1165
SUMOXMLDefinitions::isValidListOfTypeID
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed)
Definition: SUMOXMLDefinitions.cpp:1017
SUMO_ATTR_NAME
Definition: SUMOXMLDefinitions.h:381
GNEAttributeCarrier::TAGPROPERTY_REPARENT
Definition: GNEAttributeCarrier.h:311
SUMO_TAG_PERSONSTOP_BUSSTOP
Definition: SUMOXMLDefinitions.h:313
GNEAttributeCarrier::AttributeProperties::hasAttrRange
bool hasAttrRange() const
return true if Attr correspond to an element that only accept a range of values
Definition: GNEAttributeCarrier.cpp:332
SUMO_ATTR_VEHSPERHOUR
Definition: SUMOXMLDefinitions.h:783
GNEAttributeCarrier::AttributeProperties::isSVCPermission
bool isSVCPermission() const
return true if atribute is a VehicleClass
Definition: GNEAttributeCarrier.cpp:416
Shape::DEFAULT_IMG_FILE
static const std::string DEFAULT_IMG_FILE
Definition: Shape.h:48
ICON_VSSSTEP
Definition: GUIIcons.h:280
GNEAttributeCarrier::fillJunctionModelAttributes
static void fillJunctionModelAttributes(SumoXMLTag currentTag)
fill Junction Model Attributes of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:4120
SUMO_TAG_ACCESS
An access point for a train stop.
Definition: SUMOXMLDefinitions.h:104
GNEAttributeCarrier::TAGTYPE_WALK
Definition: GNEAttributeCarrier.h:296
GNEAttributeCarrier::FEATURE_LOADED
static const std::string FEATURE_LOADED
Definition: GNEAttributeCarrier.h:584
GNEAttributeCarrier::AttributeProperties::isString
bool isString() const
return true if atribute is a string
Definition: GNEAttributeCarrier.cpp:362
SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
Definition: SUMOXMLDefinitions.h:92
SUMO_ATTR_BUS_STOP
Definition: SUMOXMLDefinitions.h:766
GNEAttributeCarrier::AttributeProperties::isComplex
bool isComplex() const
return true if atribute is complex
Definition: GNEAttributeCarrier.cpp:482
GNEAttributeCarrier::ATTRPROPERTY_NONEDITABLE
Definition: GNEAttributeCarrier.h:79
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:373
SUMO_TAG_EMBEDDEDROUTE
begin/end of the description of a embedded route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:128
GNE_ATTR_BIDIR
whether an edge is part of a bidirectional railway
Definition: SUMOXMLDefinitions.h:976
SVC_IGNORING
vehicles ignoring classes
Definition: SUMOVehicleClass.h:136
SUMO_TAG_E1DETECTOR
an e1 detector
Definition: SUMOXMLDefinitions.h:64
ICON_PERSON
Definition: GUIIcons.h:300
SUMO_ATTR_NUMBER
Definition: SUMOXMLDefinitions.h:664
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:57
SUMO_ATTR_ACTTYPE
Definition: SUMOXMLDefinitions.h:871
SUMO_ATTR_SHAPE
edge: the shape in xml-definition
Definition: SUMOXMLDefinitions.h:687
DEFAULT_VEH_PROB
const double DEFAULT_VEH_PROB
SUMO_ATTR_X
Definition: SUMOXMLDefinitions.h:399
SUMO_TAG_E2DETECTOR
an e2 detector
Definition: SUMOXMLDefinitions.h:68
SUMO_TAG_DET_EXIT
an e3 exit point
Definition: SUMOXMLDefinitions.h:84
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
SUMO_ATTR_ARRIVALLANE
Definition: SUMOXMLDefinitions.h:437
GNEAttributeCarrier::TAGTYPE_SHAPE
Definition: GNEAttributeCarrier.h:284
GNEAttributeCarrier::fillNetElements
static void fillNetElements()
fill Net Elements
Definition: GNEAttributeCarrier.cpp:1405
GNEAttributeCarrier::fillCommonPersonAttributes
static void fillCommonPersonAttributes(SumoXMLTag currentTag)
fill common person attributes (used by person and personFlows)
Definition: GNEAttributeCarrier.cpp:4309
SUMO_ATTR_EMISSIONCLASS
Definition: SUMOXMLDefinitions.h:792
Shape::DEFAULT_LAYER_POI
static const double DEFAULT_LAYER_POI
Definition: Shape.h:46
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:246
ICON_ROUTEPROBREROUTE
Definition: GUIIcons.h:285
SUMO_TAG_RIDE_FROMTO
Definition: SUMOXMLDefinitions.h:311
ICON_WALK_ROUTE
Definition: GUIIcons.h:307
GNENet.h
SUMO_TAG_TRIP
a single trip definition (used by router)
Definition: SUMOXMLDefinitions.h:146
SUMO_ATTR_LCA_PUSHY
Definition: SUMOXMLDefinitions.h:594
SUMOXMLDefinitions::NodeTypes
static StringBijection< SumoXMLNodeType > NodeTypes
node types
Definition: SUMOXMLDefinitions.h:1363
GNEAttributeCarrier::TagProperties::canMaskXYZPositions
bool canMaskXYZPositions() const
return true if tag correspond to an element that can mask the attributes "X", "Y" and "Z" position as...
Definition: GNEAttributeCarrier.cpp:899
GNEAttributeCarrier::TAGPROPERTY_CLOSESHAPE
Definition: GNEAttributeCarrier.h:305
GNEAttributeCarrier::MAXNUMBEROFATTRIBUTES
static const size_t MAXNUMBEROFATTRIBUTES
max number of attributes allowed for every tag
Definition: GNEAttributeCarrier.h:597
ICON_CONTAINERSTOP
Definition: GUIIcons.h:264
SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
Definition: SUMOXMLDefinitions.h:88
ICON_RIDE_BUSSTOP
Definition: GUIIcons.h:309
GNEAttributeCarrier::TagProperties::getNumberOfAttributes
int getNumberOfAttributes() const
get number of attributes
Definition: GNEAttributeCarrier.cpp:646
SUMO_ATTR_CF_KERNER_PHI
Definition: SUMOXMLDefinitions.h:837
GNEAttributeCarrier::AttributeProperties::getDescription
std::string getDescription() const
return a description of attribute
Definition: GNEAttributeCarrier.cpp:206
SUMO_TAG_JUNCTION
begin/end of the description of a junction
Definition: SUMOXMLDefinitions.h:60
GNEAttributeCarrier::ATTRPROPERTY_NOTZERO
Definition: GNEAttributeCarrier.h:76
ICON_REROUTERINTERVAL
Definition: GUIIcons.h:279
SUMO_ATTR_CONTPOS
Definition: SUMOXMLDefinitions.h:746
SUMO_ATTR_TAU
Definition: SUMOXMLDefinitions.h:549
GNEAttributeCarrier::AttributeProperties::setRange
void setRange(const double minimum, const double maximum)
set range
Definition: GNEAttributeCarrier.cpp:148
SUMO_ATTR_CF_IDMM_ADAPT_TIME
Definition: SUMOXMLDefinitions.h:836
SUMO_ATTR_LCA_ACCEL_LAT
Definition: SUMOXMLDefinitions.h:599
Shape::DEFAULT_IMG_WIDTH
static const double DEFAULT_IMG_WIDTH
Definition: Shape.h:50
NODETYPE_NOJUNCTION
Definition: SUMOXMLDefinitions.h:1062
SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE
Definition: SUMOXMLDefinitions.h:604
ICON_REROUTER
Definition: GUIIcons.h:272
GeomConvHelper::parseShapeReporting
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.
Definition: GeomConvHelper.cpp:39
GNEAttributeCarrier::TAGTYPE_PERSON
Definition: GNEAttributeCarrier.h:293
GNEAttributeCarrier::ATTRPROPERTY_COMBINABLE
Definition: GNEAttributeCarrier.h:88