Eclipse SUMO - Simulation of Urban MObility
GNEVehicleTypeDialog.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 // Dialog for edit vehicleTypes
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
23 #include <netedit/GNEUndoList.h>
24 #include <netedit/GNEViewNet.h>
30 
31 #include "GNEVehicleTypeDialog.h"
32 
33 
34 // ===========================================================================
35 // FOX callback mapping
36 // ===========================================================================
37 
38 FXDEFMAP(GNEVehicleTypeDialog::VTypeAtributes) VTypeAtributesMap[] = {
41 };
42 
43 FXDEFMAP(GNEVehicleTypeDialog::CarFollowingModelParameters) CarFollowingModelParametersMap[] = {
45 };
46 
47 // Object implementation
48 FXIMPLEMENT(GNEVehicleTypeDialog::VTypeAtributes, FXVerticalFrame, VTypeAtributesMap, ARRAYNUMBER(VTypeAtributesMap))
49 FXIMPLEMENT(GNEVehicleTypeDialog::CarFollowingModelParameters, FXGroupBox, CarFollowingModelParametersMap, ARRAYNUMBER(CarFollowingModelParametersMap))
50 
51 // ===========================================================================
52 // member method definitions
53 // ===========================================================================
54 
55 // ---------------------------------------------------------------------------
56 // GNEVehicleTypeDialog::VClassRow - methods
57 // ---------------------------------------------------------------------------
58 
59 GNEVehicleTypeDialog::VTypeAtributes::VClassRow::VClassRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column) :
60  FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame),
61  myVTypeAtributesParent(VTypeAtributesParent) {
62  // create two auxiliar frames
63  FXVerticalFrame* verticalFrameLabelAndComboBox = new FXVerticalFrame(this, GUIDesignAuxiliarVerticalFrame);
64  // create FXComboBox for VClass
65  new FXLabel(verticalFrameLabelAndComboBox, toString(SUMO_ATTR_VCLASS).c_str(), nullptr, GUIDesignLabelAttribute150);
66  myComboBoxVClass = new FXComboBox(verticalFrameLabelAndComboBox, GUIDesignComboBoxNCol,
67  VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox);
68  myComboBoxVClassLabelImage = new FXLabel(this, "", nullptr, GUIDesignLabelTickedIcon180x46);
69  myComboBoxVClassLabelImage->setBackColor(FXRGBA(255, 255, 255, 255));
70  // fill combo Box with all allowed VClass for the current edited VType
71  for (const auto& i : myVTypeAtributesParent->myVehicleTypeDialog->getEditedDemandElement()->getTagProperty().getAttributeProperties(SUMO_ATTR_VCLASS).getDiscreteValues()) {
72  if (i != SumoVehicleClassStrings.getString(SVC_IGNORING)) {
73  myComboBoxVClass->appendItem(i.c_str());
74  }
75  }
76  // only show as maximum 10 VClasses
77  if (myComboBoxVClass->getNumItems() > 10) {
78  myComboBoxVClass->setNumVisible(10);
79  } else {
80  myComboBoxVClass->setNumVisible(myComboBoxVClass->getNumItems());
81  }
82 }
83 
84 
87  // set color of myComboBoxVClass, depending if current value is valid or not
88  myComboBoxVClass->setTextColor(FXRGB(0, 0, 0));
90  myComboBoxVClass->setTextColor(FXRGB(0, 0, 0));
91  // check if VType has to be updated
93  // update VClass in VType
96  // update label image
98  // obtain default vType parameters
100  // check if mutable rows haben to be updated
102  myVTypeAtributesParent->myLength->updateValue(toString(defaultVTypeParameters.length));
103  }
105  myVTypeAtributesParent->myMinGap->updateValue(toString(defaultVTypeParameters.minGap));
106  }
108  myVTypeAtributesParent->myMaxSpeed->updateValue(toString(defaultVTypeParameters.maxSpeed));
109  }
111  myVTypeAtributesParent->mySpeedFactor->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
112  }
114  myVTypeAtributesParent->mySpeedDev->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
115  }
117  myVTypeAtributesParent->myEmissionClass->updateValue(toString(defaultVTypeParameters.emissionClass));
118  }
120  myVTypeAtributesParent->myWidth->updateValue(toString(defaultVTypeParameters.width));
121  }
123  myVTypeAtributesParent->myHeight->updateValue(toString(defaultVTypeParameters.height));
124  }
126  myVTypeAtributesParent->myOSGFile->updateValue(toString(defaultVTypeParameters.osgFile));
127  }
129  myVTypeAtributesParent->myPersonCapacity->updateValue(toString(defaultVTypeParameters.personCapacity));
130  }
132  myVTypeAtributesParent->myContainerCapacity->updateValue(toString(defaultVTypeParameters.containerCapacity));
133  }
135  myVTypeAtributesParent->myCarriageLength->updateValue(toString(defaultVTypeParameters.containerCapacity));
136  }
138  myVTypeAtributesParent->myLocomotiveLength->updateValue(toString(defaultVTypeParameters.containerCapacity));
139  }
140  }
141  } else {
142  myComboBoxVClass->setTextColor(FXRGB(255, 0, 0));
145  }
147 }
148 
149 
155 }
156 
157 
158 void
160  // by default vclass is passenger
163  } else {
164  // set Icon in label depending of current VClass
166  case SVC_PRIVATE:
168  break;
169  case SVC_EMERGENCY:
171  break;
172  case SVC_AUTHORITY:
174  break;
175  case SVC_ARMY:
177  break;
178  case SVC_VIP:
180  break;
181  case SVC_PASSENGER:
183  break;
184  case SVC_HOV:
186  break;
187  case SVC_TAXI:
189  break;
190  case SVC_BUS:
192  break;
193  case SVC_COACH:
195  break;
196  case SVC_DELIVERY:
198  break;
199  case SVC_TRUCK:
201  break;
202  case SVC_TRAILER:
204  break;
205  case SVC_TRAM:
207  break;
208  case SVC_RAIL_URBAN:
210  break;
211  case SVC_RAIL:
213  break;
214  case SVC_RAIL_ELECTRIC:
216  break;
217  case SVC_RAIL_FAST:
219  break;
220  case SVC_MOTORCYCLE:
222  break;
223  case SVC_MOPED:
225  break;
226  case SVC_BICYCLE:
228  break;
229  case SVC_PEDESTRIAN:
231  break;
232  case SVC_E_VEHICLE:
234  break;
235  case SVC_SHIP:
237  break;
238  case SVC_CUSTOM1:
240  break;
241  case SVC_CUSTOM2:
243  break;
244  default:
246  break;
247  }
248  }
249 }
250 
251 // ---------------------------------------------------------------------------
252 // GNEVehicleTypeDialog::VShapeRow - methods
253 // ---------------------------------------------------------------------------
254 
255 GNEVehicleTypeDialog::VTypeAtributes::VShapeRow::VShapeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column) :
256  FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame),
257  myVTypeAtributesParent(VTypeAtributesParent) {
258  // create two auxiliar frames
259  FXVerticalFrame* verticalFrameLabelAndComboBox = new FXVerticalFrame(this, GUIDesignAuxiliarVerticalFrame);
260  // create combo for for vehicle shapes
261  new FXLabel(verticalFrameLabelAndComboBox, toString(SUMO_ATTR_GUISHAPE).c_str(), nullptr, GUIDesignLabelAttribute150);
262  myComboBoxShape = new FXComboBox(verticalFrameLabelAndComboBox, GUIDesignComboBoxNCol,
263  VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox);
264  myComboBoxShapeLabelImage = new FXLabel(this, "", nullptr, GUIDesignLabelTickedIcon180x46);
265  myComboBoxShapeLabelImage->setBackColor(FXRGBA(255, 255, 255, 255));
266  // fill combo Box with all vehicle shapes
267  std::vector<std::string> VShapeStrings = SumoVehicleShapeStrings.getStrings();
268  for (auto i : VShapeStrings) {
269  if (i != SumoVehicleShapeStrings.getString(SVS_UNKNOWN)) {
270  myComboBoxShape->appendItem(i.c_str());
271  }
272  }
273  // only show 10 Shapes
274  myComboBoxShape->setNumVisible(10);
275 }
276 
277 
278 void
280  // set color of myComboBoxShape, depending if current value is valid or not
282  myComboBoxShape->setTextColor(FXRGB(0, 0, 0));
286  } else {
287  myComboBoxShape->setTextColor(FXRGB(255, 0, 0));
290  }
291 }
292 
293 
294 void
298 }
299 
300 
301 void
303  // set Icon in label depending of current VClass
305  case SVS_UNKNOWN:
307  break;
308  case SVS_PEDESTRIAN:
310  break;
311  case SVS_BICYCLE:
313  break;
314  case SVS_MOPED:
316  break;
317  case SVS_MOTORCYCLE:
319  break;
320  case SVS_PASSENGER:
322  break;
323  case SVS_PASSENGER_SEDAN:
325  break;
328  break;
329  case SVS_PASSENGER_WAGON:
331  break;
332  case SVS_PASSENGER_VAN:
334  break;
335  case SVS_DELIVERY:
337  break;
338  case SVS_TRUCK:
340  break;
343  break;
344  case SVS_TRUCK_1TRAILER:
346  break;
347  case SVS_BUS:
349  break;
350  case SVS_BUS_COACH:
352  break;
353  case SVS_BUS_FLEXIBLE:
355  break;
356  case SVS_BUS_TROLLEY:
358  break;
359  case SVS_RAIL:
361  break;
362  case SVS_RAIL_CAR:
364  break;
365  case SVS_RAIL_CARGO:
367  break;
368  case SVS_E_VEHICLE:
370  break;
371  case SVS_ANT:
373  break;
374  case SVS_SHIP:
376  break;
377  case SVS_EMERGENCY:
378  case SVS_FIREBRIGADE:
380  break;
381  case SVS_POLICE:
383  break;
384  case SVS_RICKSHAW:
386  break;
387  default:
389  break;
390  }
391 }
392 
393 // ---------------------------------------------------------------------------
394 // GNEVehicleTypeDialog::VTypeAtributes - methods
395 // ---------------------------------------------------------------------------
396 
397 GNEVehicleTypeDialog::VTypeAtributes::VTypeAttributeRow::VTypeAttributeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector<std::string>& values) :
398  FXHorizontalFrame(verticalFrame, GUIDesignAuxiliarHorizontalFrame),
399  myVTypeAtributesParent(VTypeAtributesParent),
400  myAttr(attr),
401  myRowAttrType(rowAttrType),
402  myButton(nullptr),
403  myTextField(nullptr),
404  myComboBox(nullptr) {
405  // first check if we have to create a button or a label
406  if ((rowAttrType == ROWTYPE_COLOR) || (rowAttrType == ROWTYPE_FILENAME)) {
407  myButton = new FXButton(this, filterAttributeName(attr), nullptr, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonRectangular150x23);
408  } else {
409  new FXLabel(this, filterAttributeName(attr), nullptr, GUIDesignLabelAttribute150);
410  }
411  // now check if we have to create a textfield or a ComboBox
412  if (rowAttrType == ROWTYPE_INT) {
413  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Int);
414  } else if (rowAttrType == ROWTYPE_REAL) {
415  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real);
416  } else if ((rowAttrType == ROWTYPE_STRING) || (rowAttrType == ROWTYPE_COLOR)) {
417  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180);
418  } else if (rowAttrType == ROWTYPE_FILENAME) {
419  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180);
420  } else if (rowAttrType == ROWTYPE_COMBOBOX) {
421  myComboBox = new FXComboBox(this, GUIDesignComboBoxNCol, VTypeAtributesParent, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBoxWidth180);
422  // fill combo Box with values
423  for (auto i : values) {
424  myComboBox->appendItem(i.c_str());
425  }
426  // set 10 visible elements as maximum
427  if (myComboBox->getNumItems() < 10) {
428  myComboBox->setNumVisible(myComboBox->getNumItems());
429  } else {
430  myComboBox->setNumVisible(10);
431  }
432  } else {
433  throw ProcessError("Invalid row type");
434  }
435 }
436 
437 
438 void
441  // set color of myComboBox, depending if current value is valid or not
445  // update value after setting it
446  updateValue();
447  } else {
448  myComboBox->setTextColor(FXRGB(255, 0, 0));
449  // mark VType as invalid
452  }
453  } else if (myRowAttrType == ROWTYPE_COLOR) {
454  // set color of myTextFieldColor, depending if current value is valid or not
456  // set color depending if is a default value
458  myTextField->setTextColor(FXRGB(0, 0, 0));
459  } else {
460  myTextField->setTextColor(FXRGB(195, 195, 195));
461  }
463  } else {
464  myTextField->setTextColor(FXRGB(255, 0, 0));
467  }
468  } else {
469  // set color of textField, depending if current value is valid or not
473  // update value after setting it
474  updateValue();
475  } else {
476  myTextField->setTextColor(FXRGB(255, 0, 0));
477  // mark VType as invalid
480  }
481  }
482 }
483 
484 
485 void
487  if (myComboBox) {
488  // set color of myComboBox, depending if current value is valid or not
492  // update value after setting it
493  updateValue(defaultValue);
494  } else {
495  myComboBox->setTextColor(FXRGB(255, 0, 0));
496  // mark VType as invalid
499  }
500  } else {
501  // set color of textField, depending if current value is valid or not
505  // update value after setting it
506  updateValue(defaultValue);
507  } else {
508  myTextField->setTextColor(FXRGB(255, 0, 0));
509  // mark VType as invalid
512  }
513  }
514 }
515 
516 
517 void
520  // set text of myComboBox using current value of VType
522  // set color depending if is a default value
524  myComboBox->setTextColor(FXRGB(0, 0, 0));
525  } else {
526  myComboBox->setTextColor(FXRGB(195, 195, 195));
527  }
528  } else if (myRowAttrType == ROWTYPE_COLOR) {
529  // set field color
531  // set color depending if is a default value
533  myTextField->setTextColor(FXRGB(0, 0, 0));
534  } else {
535  myTextField->setTextColor(FXRGB(195, 195, 195));
536  }
537  } else {
538  // set text of myTextField using current value of VType
540  // set color depending if is a default value
542  myTextField->setTextColor(FXRGB(0, 0, 0));
543  } else {
544  myTextField->setTextColor(FXRGB(195, 195, 195));
545  }
546  }
547 }
548 
549 
550 void
552  if (myComboBox) {
553  // set text of myComboBox using current value of VType
555  // set color depending if is a default value
556  if (defaultValue != myComboBox->getText().text()) {
557  myComboBox->setTextColor(FXRGB(0, 0, 0));
558  } else {
559  myComboBox->setTextColor(FXRGB(195, 195, 195));
560  }
561  } else {
562  // set text of myTextField using current value of VType
564  // set color depending if is a default value
565  if (defaultValue != myTextField->getText().text()) {
566  myTextField->setTextColor(FXRGB(0, 0, 0));
567  } else {
568  myTextField->setTextColor(FXRGB(195, 195, 195));
569  }
570  }
571 }
572 
573 
574 const FXButton*
576  return myButton;
577 }
578 
579 
580 void
582  // create FXColorDialog
583  FXColorDialog colordialog(this, tr("Color Dialog"));
584  colordialog.setTarget(this);
585  // If previous attribute wasn't correct, set black as default color
586  if (GNEAttributeCarrier::canParse<RGBColor>(myTextField->getText().text())) {
587  colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myTextField->getText().text())));
588  } else {
589  colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::BLACK));
590  }
591  // execute dialog to get a new color
592  if (colordialog.execute()) {
593  std::string newValue = toString(MFXUtils::getRGBColor(colordialog.getRGBA()));
594  myTextField->setText(newValue.c_str());
597  // If previously value was incorrect, change font color to black
598  myTextField->setTextColor(FXRGB(0, 0, 0));
599  myTextField->killFocus();
600  }
601  }
602 }
603 
604 
605 void
607  // get the new image file
608  FXFileDialog opendialog(this, "Open Image");
609  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_VTYPE));
610  opendialog.setSelectMode(SELECTFILE_EXISTING);
611  opendialog.setPatternList("All files (*)");
612  if (gCurrentFolder.length() != 0) {
613  opendialog.setDirectory(gCurrentFolder);
614  }
615  if (opendialog.execute()) {
616  // update global current folder
617  gCurrentFolder = opendialog.getDirectory();
618  // get image path
619  std::string imagePath = opendialog.getFilename().text();
620  // check if image is valid
623  myTextField->setText(imagePath.c_str());
624  // If previously value was incorrect, change font color to black
625  myTextField->setTextColor(FXRGB(0, 0, 0));
626  myTextField->killFocus();
627  }
628  }
629 }
630 
631 
632 void
634  // get the new file name
635  FXFileDialog opendialog(this, "Open OSG File");
636  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_VTYPE));
637  opendialog.setSelectMode(SELECTFILE_EXISTING);
638  opendialog.setPatternList("OSG file (*.obj)");
639  if (gCurrentFolder.length() != 0) {
640  opendialog.setDirectory(gCurrentFolder);
641  }
642  if (opendialog.execute()) {
643  // update global current folder
644  gCurrentFolder = opendialog.getDirectory();
645  // get image path
646  std::string imagePath = opendialog.getFilename().text();
647  // check if image is valid
650  myTextField->setText(imagePath.c_str());
651  // If previously value was incorrect, change font color to black
652  myTextField->setTextColor(FXRGB(0, 0, 0));
653  myTextField->killFocus();
654  }
655  }
656 }
657 
658 
659 FXString
661  switch (attr) {
662  // JM
664  return "crossingGap";
666  return "driveAfterYellowTime";
668  return "driveAfterRedTime";
670  return "driveRedSpeed";
672  return "ignoreKeepClearTime";
674  return "ignoreFoeSpeed";
676  return "ignoreFoeProb";
678  return "sigmaMinor";
680  return "timegapMinor";
681  // LCM
683  return "strategic";
685  return "cooperative";
687  return "speedGain";
689  return "keepRight";
691  return "sublane";
693  return "opposite";
694  case SUMO_ATTR_LCA_PUSHY:
695  return "pushy";
697  return "pushyGap";
699  return "assertive";
701  return "impatience";
703  return "timeToImpatience";
705  return "accelLat";
707  return "lookaheadLeft";
709  return "speedGainRight";
711  return "maxSpeedLatStanding";
713  return "maxSpeedLatFactor";
715  return "turnAlignDistance";
717  return "overtakeRight";
718  /* case SUMO_ATTR_LCA_EXPERIMENTAL1:
719  return "experimental1";
720  */
721  default:
722  return toString(attr).c_str();
723  }
724 }
725 
726 // ---------------------------------------------------------------------------
727 // GNEVehicleTypeDialog::VTypeAtributes - methods
728 // ---------------------------------------------------------------------------
729 
730 GNEVehicleTypeDialog::VTypeAtributes::VTypeAtributes(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column) :
731  FXVerticalFrame(column, GUIDesignAuxiliarVerticalFrame),
732  myVehicleTypeDialog(vehicleTypeDialog) {
733  // declare two auxiliar horizontal frames
734  FXHorizontalFrame* firstAuxiliarHorizontalFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
735  FXVerticalFrame* firstAuxiliarVerticalFrame = new FXVerticalFrame(firstAuxiliarHorizontalFrame, GUIDesignAuxiliarVerticalFrame);
736  // create attributes for common attributes
737  FXGroupBox* commonAttributes = new FXGroupBox(firstAuxiliarVerticalFrame, "Vehicle Type attributes", GUIDesignGroupBoxFrame);
738  // create horizontal frame for columns of attributes
739  FXHorizontalFrame* columnsBasicVTypeAttributes = new FXHorizontalFrame(commonAttributes, GUIDesignAuxiliarHorizontalFrame);
740  // build left attributes
741  buildAttributesA(new FXVerticalFrame(columnsBasicVTypeAttributes, GUIDesignAuxiliarFrame));
742  // build right attributes
743  buildAttributesB(new FXVerticalFrame(columnsBasicVTypeAttributes, GUIDesignAuxiliarFrame));
744  // create GroupBox for Junction Model Attributes
745  FXGroupBox* JMAttributes = new FXGroupBox(firstAuxiliarVerticalFrame, "Junction Model attributes", GUIDesignGroupBoxFrame);
746  // create horizontal frame for columns of Junction Model attributes
747  FXHorizontalFrame* columnsJMVTypeAttributes = new FXHorizontalFrame(JMAttributes, GUIDesignAuxiliarHorizontalFrame);
748  // build left attributes
749  buildJunctionModelAttributesA(new FXVerticalFrame(columnsJMVTypeAttributes, GUIDesignAuxiliarFrame));
750  // build right attributes
751  buildJunctionModelAttributesB(new FXVerticalFrame(columnsJMVTypeAttributes, GUIDesignAuxiliarFrame));
752  // create GroupBox for Junction Model Attributes
753  FXGroupBox* LCMAttributes = new FXGroupBox(firstAuxiliarHorizontalFrame, "Lane Change Model attributes", GUIDesignGroupBoxFrame);
754  // create Lane Change Model Attributes
755  buildLaneChangeModelAttributes(new FXVerticalFrame(LCMAttributes, GUIDesignAuxiliarFrame));
756 }
757 
758 
759 void
761  // 01 Create VClassRow
762  myVClassRow = new VClassRow(this, column);
763 
764  // 02 create FXTextField and Label for vehicleTypeID
765  FXHorizontalFrame* row = new FXHorizontalFrame(column, GUIDesignAuxiliarHorizontalFrame);
766  new FXLabel(row, toString(SUMO_ATTR_ID).c_str(), nullptr, GUIDesignLabelAttribute150);
768 
769  // 03 create FXTextField and Button for Color
770  myColor = new VTypeAttributeRow(this, column, SUMO_ATTR_COLOR, VTypeAttributeRow::RowAttrType::ROWTYPE_COLOR);
771 
772  // 04 create FXTextField and Label for Length
773  myLength = new VTypeAttributeRow(this, column, SUMO_ATTR_LENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
774 
775  // 05 create FXTextField and Label for MinGap
776  myMinGap = new VTypeAttributeRow(this, column, SUMO_ATTR_MINGAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
777 
778  // 06 create FXTextField and Label for MaxSpeed
779  myMaxSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_MAXSPEED, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
780 
781  // 07 create FXTextField and Label for SpeedFactor
782  mySpeedFactor = new VTypeAttributeRow(this, column, SUMO_ATTR_SPEEDFACTOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
783 
784  // 08 create FXTextField and Label for SpeedDev
785  mySpeedDev = new VTypeAttributeRow(this, column, SUMO_ATTR_SPEEDDEV, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
786 
787  // 09 create FXTextField and Label for EmissionClass
788  myEmissionClass = new VTypeAttributeRow(this, column, SUMO_ATTR_EMISSIONCLASS, VTypeAttributeRow::RowAttrType::ROWTYPE_COMBOBOX, PollutantsInterface::getAllClassesStr());
789 
790  // 10 create FXTextField and Label for Width
791  myWidth = new VTypeAttributeRow(this, column, SUMO_ATTR_WIDTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
792 
793  // 11 create FXTextField and Label for Height
794  myHeight = new VTypeAttributeRow(this, column, SUMO_ATTR_HEIGHT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
795 
796  // 12 create FXTextField and Label for Filename
797  myFilename = new VTypeAttributeRow(this, column, SUMO_ATTR_IMGFILE, VTypeAttributeRow::RowAttrType::ROWTYPE_FILENAME);
798 
799  // 13 create FXTextField and Label for Filename
800  myOSGFile = new VTypeAttributeRow(this, column, SUMO_ATTR_OSGFILE, VTypeAttributeRow::RowAttrType::ROWTYPE_FILENAME);
801 
802  // 14 create VTypeAttributeRow and Label for Probability
803  myProbability = new VTypeAttributeRow(this, column, SUMO_ATTR_PROB, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
804 }
805 
806 
807 void
809  // 01 Create VShapeRow
810  myVShapeRow = new VShapeRow(this, column);
811 
812  // 02 create VTypeAttributeRow and Label for LaneChangeModel
813  myLaneChangeModel = new VTypeAttributeRow(this, column, SUMO_ATTR_LANE_CHANGE_MODEL, VTypeAttributeRow::RowAttrType::ROWTYPE_COMBOBOX, SUMOXMLDefinitions::LaneChangeModels.getStrings());
814 
815  // 03 create VTypeAttributeRow and Label for PersonCapacity
816  myPersonCapacity = new VTypeAttributeRow(this, column, SUMO_ATTR_PERSON_CAPACITY, VTypeAttributeRow::RowAttrType::ROWTYPE_INT);
817 
818  // 04 create VTypeAttributeRow and Label for ContainerCapacity
819  myContainerCapacity = new VTypeAttributeRow(this, column, SUMO_ATTR_CONTAINER_CAPACITY, VTypeAttributeRow::RowAttrType::ROWTYPE_INT);
820 
821  // 05 create VTypeAttributeRow and Label for BoardingDuration
822  myBoardingDuration = new VTypeAttributeRow(this, column, SUMO_ATTR_BOARDING_DURATION, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
823 
824  // 06 create VTypeAttributeRow and Label for LoadingDuration
825  myLoadingDuration = new VTypeAttributeRow(this, column, SUMO_ATTR_LOADING_DURATION, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
826 
827  // 07 create ComboBox and Label for LatAlignment
828  myLatAlignment = new VTypeAttributeRow(this, column, SUMO_ATTR_LATALIGNMENT, VTypeAttributeRow::RowAttrType::ROWTYPE_COMBOBOX, SUMOXMLDefinitions::LateralAlignments.getStrings());
829 
830  // 08 create VTypeAttributeRow and Label for MinGapLat
831  myMinGapLat = new VTypeAttributeRow(this, column, SUMO_ATTR_MINGAP_LAT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
832 
833  // 09 create VTypeAttributeRow and Label for MaxSpeedLat
834  myMaxSpeedLat = new VTypeAttributeRow(this, column, SUMO_ATTR_MAXSPEED_LAT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
835 
836  // 10 create VTypeAttributeRow and Label for ActionStepLenght
837  myActionStepLenght = new VTypeAttributeRow(this, column, SUMO_ATTR_ACTIONSTEPLENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
838 
839  // 11 create VTypeAttributeRow and Label for HasDriveStateu
840  myHasDriveState = new VTypeAttributeRow(this, column, SUMO_ATTR_HASDRIVERSTATE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
841 
842  // 12 create FXTextField and Label for Carriage length
843  myCarriageLength = new VTypeAttributeRow(this, column, SUMO_ATTR_CARRIAGE_LENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
844 
845  // 13 create FXTextField and Label for Locomotive length
846  myLocomotiveLength = new VTypeAttributeRow(this, column, SUMO_ATTR_LOCOMOTIVE_LENGTH, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
847 
848  // 14 create FXTextField and Label for carriage GAP
849  myCarriageGap = new VTypeAttributeRow(this, column, SUMO_ATTR_CARRIAGE_GAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
850 }
851 
852 
853 void
855  // 01 create VTypeAttributeRow and Label for JMCrossingGap
856  myJMCrossingGap = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_CROSSING_GAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
857 
858  // 02 create VTypeAttributeRow and Label for JMIgnoreKeepclearTime
859  myJMIgnoreKeepclearTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
860 
861  // 03 create VTypeAttributeRow and Label for JMDriveAfterYellowTime
862  myJMDriveAfterYellowTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_AFTER_YELLOW_TIME, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
863 
864  // 04 create VTypeAttributeRow and Label for JMDriveAfterRedTime
865  myJMDriveAfterRedTime = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
866 
867  // 05 create VTypeAttributeRow and Label for JMDriveRedSpeed
868  myJMDriveRedSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_DRIVE_RED_SPEED, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
869 }
870 
871 
872 void
874  // 01 create VTypeAttributeRow and Label for JMIgnoreFoeProb
875  myJMIgnoreFoeProb = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_FOE_PROB, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
876 
877  // 02 create VTypeAttributeRow and Label for JMIgnoreFoeSpeed
878  myJMIgnoreFoeSpeed = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_IGNORE_FOE_SPEED, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
879 
880  // 03 create VTypeAttributeRow and Label for JMSigmaMinor
881  myJMSigmaMinor = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_SIGMA_MINOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
882 
883  // 04 create VTypeAttributeRow and Label for JMTimeGapMinor
884  myJMTimeGapMinor = new VTypeAttributeRow(this, column, SUMO_ATTR_JM_TIMEGAP_MINOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
885 
886  // 05 create VTypeAttributeRow and Label for Impatience
887  myJMImpatience = new VTypeAttributeRow(this, column, SUMO_ATTR_IMPATIENCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
888 }
889 
890 
891 void
893  // 01 create VTypeAttributeRow and Label for strategic param
894  myLCAStrategicParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_STRATEGIC_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
895 
896  // 02 create VTypeAttributeRow and Label for cooperative param
897  myLCACooperativeParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_COOPERATIVE_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
898 
899  // 03 create VTypeAttributeRow and Label for speed gain param
900  myLCASpeedgainParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_SPEEDGAIN_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
901 
902  // 04 create VTypeAttributeRow and Label for keepright param
903  myLCAKeeprightParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_KEEPRIGHT_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
904 
905  // 05 create VTypeAttributeRow and Label for sublane param
906  myLCASublaneParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_SUBLANE_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
907 
908  // 06 create VTypeAttributeRow and Label for opposite param
909  myLCAOppositeParam = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_OPPOSITE_PARAM, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
910 
911  // 07 create VTypeAttributeRow and Label for pushy
912  myLCAPushy = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_PUSHY, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
913 
914  // 08 create VTypeAttributeRow and Label for pushy gap
915  myLCAPushygap = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_PUSHYGAP, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
916 
917  // 09 create VTypeAttributeRow and Label for assertive
918  myLCAAssertive = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_ASSERTIVE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
919 
920  // 10 create VTypeAttributeRow and Label for impatience
921  myLCAImpatience = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_IMPATIENCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
922 
923  // 11 create VTypeAttributeRow and Label for time to impatience
924  myLCATimeToImpatience = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_TIME_TO_IMPATIENCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
925 
926  // 12 create VTypeAttributeRow and Label for accel lat
927  myLCAAccelLat = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_ACCEL_LAT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
928 
929  // 13 create VTypeAttributeRow and Label for look ahead lefth
930  myLCALookAheadLeft = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_LOOKAHEADLEFT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
931 
932  // 14 create VTypeAttributeRow and Label for speed gain right
933  myLCASpeedGainRight = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_SPEEDGAINRIGHT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
934 
935  // 15 create VTypeAttributeRow and Label for max speed lat standing
936  myLCAMaxSpeedLatStanding = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_MAXSPEEDLATSTANDING, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
937 
938  // 16 create VTypeAttributeRow and Label for max speed lat factor
939  myLCAMaxSpeedLatFactor = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_MAXSPEEDLATFACTOR, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
940 
941  // 17 create VTypeAttributeRow and Label for turn alignment distance
942  myLCATurnAlignmentDistance = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
943 
944  // 18 create VTypeAttributeRow and Label for overtake right
945  myLCAOvertakeRight = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_OVERTAKE_RIGHT, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL);
946 
947  // 19 create VTypeAttributeRow and Label for experimental
948  /* myLCAExperimental = new VTypeAttributeRow(this, column, SUMO_ATTR_LCA_EXPERIMENTAL1, VTypeAttributeRow::RowAttrType::ROWTYPE_REAL); */
949 }
950 
951 
952 void
954  //set values of myEditedDemandElement into fields
956  // set variables of special rows VClass and VShape
959  // update rows
962  myColor->updateValue();
963  myLength->updateValue(toString(defaultVTypeParameters.length));
964  myMinGap->updateValue(toString(defaultVTypeParameters.minGap));
965  myMaxSpeed->updateValue(toString(defaultVTypeParameters.maxSpeed));
966  mySpeedFactor->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
967  mySpeedDev->updateValue(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
968  myEmissionClass->updateValue(toString(defaultVTypeParameters.emissionClass));
969  myWidth->updateValue(toString(defaultVTypeParameters.width));
970  myHeight->updateValue(toString(defaultVTypeParameters.height));
972  myOSGFile->updateValue(toString(defaultVTypeParameters.osgFile));
973  myPersonCapacity->updateValue(toString(defaultVTypeParameters.personCapacity));
974  myContainerCapacity->updateValue(toString(defaultVTypeParameters.containerCapacity));
975  myCarriageLength->updateValue(toString(defaultVTypeParameters.carriageLength));
976  myLocomotiveLength->updateValue(toString(defaultVTypeParameters.locomotiveLength));
985  // JM Parameters
996  // LCM Attributes
1015  /* myLCAExperimental->updateValue(); */
1016 }
1017 
1018 
1019 long
1021  // At start we assumed, that all values are valid
1024  // set color of myTextFieldVehicleTypeID, depending if current value is valid or not
1026  myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1029  myTextFieldVehicleTypeID->setTextColor(FXRGB(0, 0, 0));
1031  } else {
1032  myTextFieldVehicleTypeID->setTextColor(FXRGB(255, 0, 0));
1035  }
1036  // set variables of special rows VClass and VShape
1038  // set variables of special rows VShape
1040  // set attributes in rest rows
1041  myColor->setVariable();
1042  myLength->setVariable(toString(defaultVTypeParameters.length));
1043  myMinGap->setVariable(toString(defaultVTypeParameters.minGap));
1044  myMaxSpeed->setVariable(toString(defaultVTypeParameters.maxSpeed));
1045  mySpeedFactor->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
1046  mySpeedDev->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
1047  myEmissionClass->setVariable(toString(defaultVTypeParameters.emissionClass));
1048  myWidth->setVariable(toString(defaultVTypeParameters.width));
1049  myHeight->setVariable(toString(defaultVTypeParameters.height));
1050  myOSGFile->setVariable(toString(defaultVTypeParameters.osgFile));
1051  // set attributes in rows
1054  myLength->setVariable(toString(defaultVTypeParameters.length));
1055  myMinGap->setVariable(toString(defaultVTypeParameters.minGap));
1056  myMaxSpeed->setVariable(toString(defaultVTypeParameters.maxSpeed));
1057  mySpeedFactor->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[0]));
1058  mySpeedDev->setVariable(toString(defaultVTypeParameters.speedFactor.getParameter()[1]));
1059  myEmissionClass->setVariable(toString(defaultVTypeParameters.emissionClass));
1060  myWidth->setVariable(toString(defaultVTypeParameters.width));
1061  myHeight->setVariable(toString(defaultVTypeParameters.height));
1063  myOSGFile->setVariable(toString(defaultVTypeParameters.osgFile));
1064  myPersonCapacity->setVariable(toString(defaultVTypeParameters.personCapacity));
1065  myContainerCapacity->setVariable(toString(defaultVTypeParameters.containerCapacity));
1066  myCarriageLength->setVariable(toString(defaultVTypeParameters.carriageLength));
1067  myLocomotiveLength->setVariable(toString(defaultVTypeParameters.locomotiveLength));
1076  // JM Variables
1087  // LCM Attributes
1106  /* myLCAExperimental->setVariable(); */
1107  return true;
1108 }
1109 
1110 
1111 long
1113  // check what dialog has to be opened
1114  if (obj == myColor->getButton()) {
1116  } else if (obj == myFilename->getButton()) {
1118  } else if (obj == myOSGFile->getButton()) {
1120  }
1121  return 1;
1122 }
1123 
1124 // ---------------------------------------------------------------------------
1125 // GNEVehicleTypeDialog::VShapeRow - methods
1126 // ---------------------------------------------------------------------------
1127 
1129  FXGroupBox(column, "Car Following Model attributes", GUIDesignGroupBoxFrame),
1130  myVehicleTypeDialog(vehicleTypeDialog) {
1131 
1132  // create vertical frame for rows
1133  myVerticalFrameRows = new FXVerticalFrame(this, GUIDesignAuxiliarFrame);
1134 
1135  // declare combo box
1136  FXHorizontalFrame* row = new FXHorizontalFrame(myVerticalFrameRows, GUIDesignAuxiliarHorizontalFrame);
1137  new FXLabel(row, "Algorithm", nullptr, GUIDesignLabelAttribute150);
1139 
1140  // fill combo Box with all Car following models
1141  std::vector<std::string> CFModels = SUMOXMLDefinitions::CarFollowModels.getStrings();
1142  for (auto i : CFModels) {
1143  myComboBoxCarFollowModel->appendItem(i.c_str());
1144  }
1145  myComboBoxCarFollowModel->setNumVisible(10);
1146 
1147  // 01 create FX and Label for Accel
1149  myRows.push_back(myAccelRow);
1150 
1151  // 02 create FX and Label for Decel
1153  myRows.push_back(myDecelRow);
1154 
1155  // 03 create FX and Label for Apparent decel
1157  myRows.push_back(myApparentDecelRow);
1158 
1159  // 04 create FX and Label for emergency decel
1161  myRows.push_back(myEmergencyDecelRow);
1162 
1163  // 05 create FX and Label for Sigma
1165  myRows.push_back(mySigmaRow);
1166 
1167  // 06 create FX and Label for Tau
1169  myRows.push_back(myTauRow);
1170 
1171  // 07 myMinGapFactor FX and Label for MinGapFactor
1173  myRows.push_back(myMinGapFactorRow);
1174 
1175  // 08 create FX and Label for K
1177  myRows.push_back(myKRow);
1178 
1179  // 09 create FX and Label for PHI
1181  myRows.push_back(myPhiRow);
1182 
1183  // 10 create FX and Label for Deleta
1185  myRows.push_back(myDeltaRow);
1186 
1187  // 11 create FX and Label for Stepping
1189  myRows.push_back(mySteppingRow);
1190 
1191  // 12 create FX and Label for Security
1193  myRows.push_back(mySecurityRow);
1194 
1195  // 13 create FX and Label for Estimation
1197  myRows.push_back(myEstimationRow);
1198 
1199  // 14 create FX and Label for TMP1
1201  myRows.push_back(myTmp1Row);
1202 
1203  // 15 create FX and Label for TMP2
1205  myRows.push_back(myTmp2Row);
1206 
1207  // 16 create FX and Label for TMP3
1209  myRows.push_back(myTmp3Row);
1210 
1211  // 17 create FX and Label for TMP4
1213  myRows.push_back(myTmp4Row);
1214 
1215  // 18 create FX and Label for TMP5
1217  myRows.push_back(myTmp5Row);
1218 
1219  // 19 create FX and Label for trainType (allow strings)
1221  myRows.push_back(myTrainTypeRow);
1222 
1223  // 20 create FX and Label for Tau Last
1225  myRows.push_back(myTrauLastRow);
1226 
1227  // 21 create FX and Label for Aprob
1229  myRows.push_back(myAprobRow);
1230 
1231  // 22 create FX and Label for Adapt Factor
1233  myRows.push_back(myAdaptFactorRow);
1234 
1235  // 23 create FX and Label for Adapt Time
1237  myRows.push_back(myAdaptTimeRow);
1238 
1239  // create myLabelIncompleteAttribute
1240  myLabelIncompleteAttribute = new FXLabel(myVerticalFrameRows, "Some attributes wasn't\nimplemented yet", nullptr, GUIDesignLabelAboutInfoCenter);
1242 
1243  // show or hidde ComboBox depending of current selected CFM
1244  refreshCFMFields();
1245 }
1246 
1247 
1248 void
1250  // start hidding all rows
1251  for (const auto& i : myRows) {
1252  i->hide();
1253  }
1254  // hide myLabelIncompleteAttribute
1256  // show textfield depending of current CFM
1257  if (SUMOXMLDefinitions::CarFollowModels.hasString(myComboBoxCarFollowModel->getText().text())) {
1258  // show textfield depending of selected CFM
1259  switch (SUMOXMLDefinitions::CarFollowModels.get(myComboBoxCarFollowModel->getText().text())) {
1260  case SUMO_TAG_CF_KRAUSS:
1263  myTauRow->show();
1264  myAccelRow->show();
1265  myDecelRow->show();
1266  myApparentDecelRow->show();
1267  myEmergencyDecelRow->show();
1268  mySigmaRow->show();
1269  break;
1270  case SUMO_TAG_CF_KRAUSSX:
1271  myTauRow->show();
1272  myTmp1Row->show();
1273  myTmp2Row->show();
1274  myTmp3Row->show();
1275  myTmp4Row->show();
1276  myTmp5Row->show();
1277  break;
1278  case SUMO_TAG_CF_SMART_SK:
1279  case SUMO_TAG_CF_DANIEL1:
1280  myTauRow->show();
1281  myAccelRow->show();
1282  myDecelRow->show();
1283  myEmergencyDecelRow->show();
1284  mySigmaRow->show();
1285  myMinGapFactorRow->show();
1286  myTmp1Row->show();
1287  myTmp2Row->show();
1288  myTmp3Row->show();
1289  myTmp4Row->show();
1290  myTmp5Row->show();
1291  break;
1293  myTauRow->show();
1294  myAccelRow->show();
1295  myDecelRow->show();
1296  myEmergencyDecelRow->show();
1297  mySigmaRow->show();
1298  myMinGapFactorRow->show();
1299  myTrauLastRow->show();
1300  myAprobRow->show();
1301  break;
1302  case SUMO_TAG_CF_IDM:
1303  myTauRow->show();
1304  myAccelRow->show();
1305  myDecelRow->show();
1306  myEmergencyDecelRow->show();
1307  mySteppingRow->show();
1308  myMinGapFactorRow->show();
1309  break;
1310  case SUMO_TAG_CF_IDMM:
1311  myTauRow->show();
1312  myAccelRow->show();
1313  myDecelRow->show();
1314  myEmergencyDecelRow->show();
1315  mySteppingRow->show();
1316  myMinGapFactorRow->show();
1317  myAdaptFactorRow->show();
1318  myAdaptTimeRow->show();
1319  break;
1320  case SUMO_TAG_CF_BKERNER:
1321  myTauRow->show();
1322  myAccelRow->show();
1323  myDecelRow->show();
1324  myEmergencyDecelRow->show();
1325  myKRow->show();
1326  myPhiRow->show();
1327  myMinGapFactorRow->show();
1328  break;
1329  case SUMO_TAG_CF_WIEDEMANN:
1330  myTauRow->show();
1331  myAccelRow->show();
1332  myDecelRow->show();
1333  myEmergencyDecelRow->show();
1334  myMinGapFactorRow->show();
1335  mySecurityRow->show();
1336  myEstimationRow->show();
1337  break;
1338  case SUMO_TAG_CF_RAIL:
1339  myTauRow->show();
1340  myTrainTypeRow->show();
1341  break;
1342  case SUMO_TAG_CF_ACC:
1343  myTauRow->show();
1344  myAccelRow->show();
1345  myDecelRow->show();
1346  myEmergencyDecelRow->show();
1347  myMinGapFactorRow->show();
1348  // show myLabelIncompleteAttribute
1360  break;
1361  case SUMO_TAG_CF_CACC:
1362  myTauRow->show();
1363  myAccelRow->show();
1364  myDecelRow->show();
1365  myEmergencyDecelRow->show();
1366  myMinGapFactorRow->show();
1367  // show myLabelIncompleteAttribute
1385  break;
1386  case SUMO_TAG_CF_CC:
1387  myTauRow->show();
1388  myAccelRow->show();
1389  myDecelRow->show();
1390  // show myLabelIncompleteAttribute
1413  break;
1414  default:
1415  break;
1416  }
1417  }
1418  myVerticalFrameRows->recalc();
1419  update();
1420 }
1421 
1422 
1423 void
1425  //set values of myEditedDemandElement into fields
1427  myComboBoxCarFollowModel->setCurrentItem(0);
1428  } else {
1430  }
1431  // refresh fields
1432  refreshCFMFields();
1433  // update value in all Rows
1434  for (const auto& i : myRows) {
1435  i->updateValue();
1436  }
1437 }
1438 
1439 
1440 long
1442  // At start we assumed, that all values are valid
1445  // set color of myTextFieldCarFollowModel, depending if current value is valid or not
1447  myComboBoxCarFollowModel->setTextColor(FXRGB(0, 0, 0));
1449  } else {
1450  myComboBoxCarFollowModel->setTextColor(FXRGB(255, 0, 0));
1453  }
1454  // set variable in all Rows
1455  for (const auto& i : myRows) {
1456  i->setVariable();
1457  }
1458  // refresh fields
1459  refreshCFMFields();
1460  return true;
1461 }
1462 
1463 // ---------------------------------------------------------------------------
1464 // GNEVehicleTypeDialog - public methods
1465 // ---------------------------------------------------------------------------
1466 
1467 GNEVehicleTypeDialog::GNEVehicleTypeDialog(GNEDemandElement* editedVehicleType, bool updatingElement) :
1468  GNEDemandElementDialog(editedVehicleType, updatingElement, /*1022*/ /*1322*/ 1372, 575),
1469  myVehicleTypeValid(true),
1471 
1472  // change default header
1473  changeDemandElementDialogHeader(updatingElement ? "Edit " + myEditedDemandElement->getTagStr() : "Create " + myEditedDemandElement->getTagStr());
1474 
1475  // Create auxiliar frames for values
1476  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignAuxiliarHorizontalFrame);
1477 
1478  // create vehicle type attributes
1479  myVTypeAtributes = new VTypeAtributes(this, columns);
1480 
1481  // create car following model parameters
1483 
1484  // start a undo list for editing local to this additional
1485  initChanges();
1486 
1487  // add element if we aren't updating an existent element
1488  if (myUpdatingElement == false) {
1490  }
1491 
1492  // update values of Vehicle Type common attributes
1494 
1495  // update values of Car Following Model Parameters
1497 
1498  // open as modal dialog
1500 }
1501 
1502 
1504 
1505 
1506 long
1507 GNEVehicleTypeDialog::onCmdAccept(FXObject*, FXSelector, void*) {
1508  if (myVehicleTypeValid == false) {
1509  // write warning if netedit is running in testing mode
1510  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
1511  std::string operation1 = myUpdatingElement ? ("updating") : ("creating");
1512  std::string operation2 = myUpdatingElement ? ("updated") : ("created");
1513  std::string tagString = myEditedDemandElement->getTagStr();
1514  // open warning dialogBox
1515  FXMessageBox::warning(getApp(), MBOX_OK,
1516  ("Error " + operation1 + " " + tagString).c_str(), "%s",
1517  (tagString + " cannot be " + operation2 +
1518  " because parameter " + toString(myInvalidAttr) +
1519  " is invalid.").c_str());
1520  // write warning if netedit is running in testing mode
1521  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
1522  return 0;
1523  } else {
1524  // accept changes before closing dialog
1525  acceptChanges();
1526  // stop dialgo sucesfully
1527  getApp()->stopModal(this, TRUE);
1528  return 1;
1529  }
1530 }
1531 
1532 
1533 long
1534 GNEVehicleTypeDialog::onCmdCancel(FXObject*, FXSelector, void*) {
1535  // cancel changes
1536  cancelChanges();
1537  // Stop Modal
1538  getApp()->stopModal(this, FALSE);
1539  return 1;
1540 }
1541 
1542 
1543 long
1544 GNEVehicleTypeDialog::onCmdReset(FXObject*, FXSelector, void*) {
1545  // reset changes
1546  resetChanges();
1547  // update values of Vehicle Type common attributes
1549  // update values of Car Following Model Parameters
1551  return 1;
1552 }
1553 
1554 // ---------------------------------------------------------------------------
1555 // GNEVehicleTypeDialog - private methods
1556 // ---------------------------------------------------------------------------
1557 
1558 GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelRow::CarFollowingModelRow(CarFollowingModelParameters* carFollowingModelParametersParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr, bool allowString) :
1559  FXHorizontalFrame(verticalFrame, GUIDesignAuxiliarHorizontalFrame),
1560  myCarFollowingModelParametersParent(carFollowingModelParametersParent),
1561  myAttr(attr),
1562  myTextField(nullptr) {
1563  new FXLabel(this, toString(attr).c_str(), nullptr, GUIDesignLabelAttribute150);
1564  if (allowString) {
1565  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, carFollowingModelParametersParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180);
1566  } else {
1567  myTextField = new FXTextField(this, GUIDesignTextFieldNCol, carFollowingModelParametersParent, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFielWidth180Real);
1568  }
1569 }
1570 
1571 
1572 void
1574  // set color of textField, depending if current value is valid or not
1576  // set color depending if is a default value
1578  myTextField->setTextColor(FXRGB(0, 0, 0));
1579  } else {
1580  myTextField->setTextColor(FXRGB(195, 195, 195));
1581  }
1584  // update value after setting it
1585  updateValue();
1586  } else {
1587  myTextField->setTextColor(FXRGB(255, 0, 0));
1588  // mark VType as invalid
1591  }
1592 }
1593 
1594 
1595 void
1597  // set text of myTextField using current value of VType
1599  // set color depending if is a default value
1601  myTextField->setTextColor(FXRGB(0, 0, 0));
1602  } else {
1603  myTextField->setTextColor(FXRGB(195, 195, 195));
1604  }
1605 }
1606 
1607 /****************************************************************************/
CarFollowingModelRow * myDeltaRow
Row for MinGap (only for IDM)
void buildAttributesA(FXVerticalFrame *column)
build commmon attributes (A)
CarFollowingModelRow * mySteppingRow
Row for MinGap(only for IDM)
VTypeAttributeRow * myMaxSpeedLat
VTypeAttributeRow for MaxSpeedLat.
FXComboBox * myComboBox
ComboBox for attributes with limited values.
vehicle is a motorcycle
VTypeAttributeRow * myWidth
VTypeAttributeRow for Width.
VTypeAttributeRow * myOSGFile
VTypeAttributeRow for OSG.
vehicle is a coach
static StringBijection< SumoXMLTag > CarFollowModels
car following models
render as a rail
long onCmdSetAttribute(FXObject *, FXSelector, void *)
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:233
VTypeAttributeRow * myBoardingDuration
VTypeAttributeRow for BoardingDuration.
static RGBColor parseColor(std::string coldef)
Parses a color information.
Definition: RGBColor.cpp:177
VTypeAttributeRow * myLCAPushygap
VTypeAttributeRow for pushy gap.
FXVerticalFrame * myVerticalFrameRows
Vertical Frame for CarFollowingModelRow.
void acceptChanges()
Accept changes did in this dialog.
CarFollowingModelRow * myTmp4Row
Row for TMP4.
VTypeAttributeRow * myLCASublaneParam
VTypeAttributeRow for sublane param.
VTypeAttributeRow * myJMCrossingGap
VTypeAttributeRow for Crossing Gap.
CarFollowingModelRow * myEmergencyDecelRow
Row for emergency Decel.
void buildJunctionModelAttributesB(FXVerticalFrame *column)
build JunctionModel attributes (B)
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN, false)
Dialog for edit rerouter intervals.
CarFollowingModelRow * myTmp5Row
Row for TMP5.
VTypeAttributeRow * myEmissionClass
VTypeAttributeRow for EmissionClass.
#define GUIDesignTextFielWidth180
text field with thick frame, size of 180x23 /doubles (Used in GNEVehicleType)
Definition: GUIDesigns.h:55
CarFollowingModelRow * myKRow
Row for MinGap (only for Kerner)
FXVerticalFrame * myContentFrame
frame for contents
render as a motorcycle
vehicle is a not electrified rail
GNEVehicleTypeDialog(GNEDemandElement *editedVehicleType, bool updatingElement)
constructor
FXDEFMAP(GNEVehicleTypeDialog::VTypeAtributes) VTypeAtributesMap[]
CarFollowingModelRow * myMinGapFactorRow
Row for MinGapFactor.
render as a transport vehicle
VTypeAttributeRow * myJMDriveAfterRedTime
VTypeAttributeRow for Drive After Red Time.
vehicle is a bicycle
VTypeAttributeRow * myHeight
VTypeAttributeRow for Height.
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:108
render as a flexible city bus
VTypeAttributeRow * myMaxSpeed
VTypeAttributeRow for MaxSpeed.
void cancelChanges()
Cancel changes did in this dialog.
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAttributeParameters parent
vehicle is a small delivery vehicle
VTypeAttributeRow * myHasDriveState
VTypeAttributeRow for HasDriveState.
class used for represent rows with Car Following Model parameters
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAtributes parent
FXComboBox * myComboBoxShape
FXComboBox for Shape.
CarFollowingModelRow * myAdaptTimeRow
Row for Adapt Time.
VTypeAttributeRow * myMinGapLat
VTypeAttributeRow for MinGapLat.
vehicle is a light rail
CarFollowingModelRow * mySecurityRow
Row for Security (only for Wiedemann)
GNEDemandElement * myEditedDemandElement
pointer to edited aditional
FXString filterAttributeName(const SumoXMLAttr attr) const
filter attribute name
automated car (with cruise controllers)
void initChanges()
init a new group of changes that will be do it in dialog
FXString gCurrentFolder
The folder used as last.
CarFollowingModelRow * myTmp1Row
Row for TMP1.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
render as a sedan passenger vehicle ("Stufenheck")
VTypeAtributes * myVTypeAtributes
Vehicle Type Common Attributes.
void changeDemandElementDialogHeader(const std::string &newHeader)
change additional dialog header
static const RGBColor BLACK
Definition: RGBColor.h:198
CarFollowingModelRow * myDecelRow
Row for Decel.
vehicle is a HOV
VTypeAttributeRow * myLCASpeedGainRight
VTypeAttributeRow for speed gain right.
VTypeAttributeRow * mySpeedDev
VTypeAttributeRow for SpeedDev.
VTypeAttributeRow * myLCAKeeprightParam
VTypeAttributeRow for keep right param.
std::vector< std::string > getStrings() const
rail vehicle that requires electrified tracks
long onCmdSetVariable(FXObject *, FXSelector, void *)
#define GUIDesignTextFielWidth180Int
text field with thick frame, size of 180x23 and limited to integers (Used in GNEVehicleType) ...
Definition: GUIDesigns.h:49
authorities vehicles
#define GUIDesignTextFielWidth180Real
text field with thick frame, size of 180x23 and limited to doubles/floats (Used in GNEVehicleType) ...
Definition: GUIDesigns.h:52
vehicle is a city rail
virtual bool isAttributeEnabled(SumoXMLAttr key) const =0
vehicle is a large transport vehicle
is a user-defined type
#define GUIDesignComboBox
Definition: GUIDesigns.h:221
CarFollowingModelRow * myAdaptFactorRow
Row for Adapt Factor.
void updateValue()
update value of Vehicle Type (using default value obtained from GNEAttributeCarrier) ...
CarFollowingModelRow * mySigmaRow
Row for Sigma.
VTypeAttributeRow * myLCALookAheadLeft
VTypeAttributeRow for loock ahead left.
VTypeAttributeRow * myLaneChangeModel
VTypeAttributeRow for LaneChangeModel.
VTypeAttributeRow * myLatAlignment
VTypeAttributeRow for LatAlignment.
void resetChanges()
reset changes did in this dialog.
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:933
VTypeAttributeRow * myLCAMaxSpeedLatStanding
VTypeAttributeRow for max speed lat standing.
bool myVehicleTypeValid
flag to check if current vehicleType is valid
VTypeAttributeRow * myCarriageLength
VTypeAttributeRow for carriage length.
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
Definition: GUIDesigns.h:286
VTypeAttributeRow * myContainerCapacity
VTypeAttributeRow for ContainerCapacity.
void refreshCFMFields()
refresh Car Following Model Fields
virtual SUMOVehicleClass getVClass() const =0
obtain VClass related with this demand element
SUMOVehicleClass setVariable()
set vehicle class
CarFollowingModelParameters * myCarFollowingModelParameters
Car Following model parameters.
CarFollowingModelRow * myPhiRow
Row for MinGap (only for Kerner)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
VTypeAttributeRow * myMinGap
VTypeAttributeRow for MinGap.
FXLabel * myComboBoxVClassLabelImage
label with image of VClass
render as a hatchback passenger vehicle ("Fliessheck")
VTypeAttributeRow * myProbability
VTypeAttributeRow for Probability.
render as a bus
GNEVehicleTypeDialog * myVehicleTypeDialog
pointer to Vehicle Type dialog parent
army vehicles
long onCmdAccept(FXObject *, FXSelector, void *)
private vehicles
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Definition: GUIDesigns.h:289
VClassRow * myVClassRow
vehicle class row
long onCmdSetAttributeDialog(FXObject *obj, FXSelector, void *)
called after press a button dialog
not defined
CarFollowingModelRow * myApparentDecelRow
Row for aparent Decel.
render as a bicycle
CarFollowingModelRow * myEstimationRow
Row for Estimation (only for Wiedemann)
VTypeAttributeRow * myLCACooperativeParam
VTypeAttributeRow for cooperative param.
VTypeAttributeRow * myActionStepLenght
VTypeAttributeRow for ActionStepLenght.
struct for default values that depend of VClass
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
VTypeAttributeRow * myLCATurnAlignmentDistance
VTypeAttributeRow for turn alignment distance.
void buildAttributesB(FXVerticalFrame *column)
build commmon attributes (B)
FXComboBox * myComboBoxCarFollowModel
Row for CarFollowModel.
VTypeAttributeRow * myLocomotiveLength
VTypeAttributeRow for locomotive length.
invalid attribute
VTypeAttributeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector< std::string > &values={})
constructor
render as a (city) rail without locomotive
attribute edited trought dialog
Definition: GUIAppEnum.h:645
VTypeAttributeRow * myLCAOppositeParam
VTypeAttributeRow for opposite param.
VTypeAttributeRow * myLoadingDuration
VTypeAttributeRow for LoadingDuration.
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog) ...
#define GUIDesignLabelAttribute150
label extended over the matrix column with thick frame and height of 23
Definition: GUIDesigns.h:189
render as a van
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:246
render as a passenger vehicle
render as a police car
VTypeAttributeRow * myJMDriveAfterYellowTime
VTypeAttributeRow for Drive After Yellow Time.
VTypeAttributeRow * mySpeedFactor
VTypeAttributeRow for SpeedFactor.
#define GUIDesignAuxiliarVerticalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Definition: GUIDesigns.h:292
vehicle is a passenger car (a "normal" car)
VTypeAttributeRow * myJMSigmaMinor
VTypeAttributeRow for Sigma Minor.
VTypeAttributeRow * myJMIgnoreKeepclearTime
VTypeAttributeRow for Ignore Keep Clear Time.
#define GUIDesignLabelAboutInfoCenter
label extended over frame with thick and with text justify to center
Definition: GUIDesigns.h:195
VShapeRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *column)
constructor
VTypeAttributeRow * myJMTimeGapMinor
VTypeAttributeRow for Time GAP Minor.
is an arbitrary ship
vehicle is a moped
VTypeAttributeRow * myLCAImpatience
VTypeAttributeRow for impatience.
std::vector< CarFollowingModelRow * > myRows
vector with the Car Following Model Row
render as a cargo train
render as a fire brigade
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:58
vehicle is a taxi
class used for represent rows with Vehicle Type parameters
vehicle is a bus
render as a giant ant
VTypeAttributeRow * myPersonCapacity
VTypeAttributeRow for PersonCapacity.
void buildLaneChangeModelAttributes(FXVerticalFrame *column)
build LaneChangeModel attributes
GNEVehicleTypeDialog * myVehicleTypeDialog
VTypeAttributeRow for experimental.
static StringBijection< LateralAlignment > LateralAlignments
lateral alignments
render as a pedestrian
render as a moped
VTypeAttributeRow * myJMImpatience
VTypeAttributeRow for Impatience.
CarFollowingModelRow * myTmp2Row
Row for TMP2.
FXTextField * myTextFieldVehicleTypeID
FXTextfield for vehicleTypeID.
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAtributes parent
void setVariable()
set Variablen in VehicleType (using default value obtained from GNEAttributeCarrier) ...
render as a arbitrary ship
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:255
Dialog to edit sequences, parameters, etc.. of DemandElements.
void buildJunctionModelAttributesA(FXVerticalFrame *column)
build JunctionModel attributes (A)
#define GUIDesignButtonRectangular150x23
button rectangular with thick and raise frame with a size of 150x23
Definition: GUIDesigns.h:84
vip vehicles
const std::string & getTagStr() const
get tag assigned to this object in string format
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform demand element changes ...
VTypeAttributeRow * myLCAMaxSpeedLatFactor
VTypeAttributeRow for max speed lat factor.
VTypeAttributeRow * myJMIgnoreFoeSpeed
VTypeAttributeRow for Ignore FOE Speed.
vehicle is a large transport vehicle
CarFollowingModelRow * myTrauLastRow
Row for TauLast.
VTypeAttributeRow * myLCAAssertive
VTypeAttributeRow for assertive.
VTypeAttributeRow * myLCAOvertakeRight
VTypeAttributeRow for overtake right.
VTypeAttributeRow * myJMDriveRedSpeed
VTypeAttributeRow for Drive Red Speed.
VTypeAttributeRow * myJMIgnoreFoeProb
VTypeAttributeRow for Ignore FOE Probability.
VTypeAttributeRow * myLCASpeedgainParam
VTypeAttributeRow for speed gain param.
VTypeAttributeRow * myColor
VTypeAttributeRow for color.
FXLabel * myComboBoxShapeLabelImage
label with image of Shape
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:114
CarFollowingModelParameters * myCarFollowingModelParametersParent
pointer to CarFollowingModelParameters parent
render as an emergency vehicle
attribute edited
Definition: GUIAppEnum.h:619
VTypeAttributeRow * myLength
VTypeAttributeRow for Length.
VTypeAttributeRow * myLCATimeToImpatience
VTypeAttributeRow for time to impatience.
render as a (futuristic) e-vehicle
CarFollowingModelRow * myTmp3Row
Row for TMP3.
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
render as a rickshaw
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
FXComboBox * myComboBoxVClass
FXComboBox for VClass.
VShapeRow * myVShapeRow
vehicle shape row
FXLabel * myLabelIncompleteAttribute
temporal label for incomplete attributes
VTypeAttributeRow * myFilename
VTypeAttributeRow for Filename.
VTypeAttributeRow * myLCAStrategicParam
VTypeAttributeRow for strategic param.
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
VTypeAttributeRow * myLCAAccelLat
VTypeAttributeRow for accel lat.
#define GUIDesignLabelTickedIcon180x46
label ticked filled extended over frame used for VClasses/VShapes. (can be used by icons of 64x32 pix...
Definition: GUIDesigns.h:207
public emergency vehicles
render as a transport vehicle with one trailer
render as a wagon passenger vehicle ("Combi")
CarFollowingModelRow * myAccelRow
Row for Accel.
VTypeAttributeRow * myLCAPushy
VTypeAttributeRow for pushy.
CarFollowingModelRow * myAprobRow
Row for Aprob.
CarFollowingModelRow(CarFollowingModelParameters *carFollowingModelParametersParent, FXVerticalFrame *verticalFrame, SumoXMLAttr attr, bool allowString=false)
constructor
render as a coach
A color information.
#define GUIDesignComboBoxWidth180
comboBox with thick frame, size of 180x23 /doubles (Used in GNEVehicleType)
Definition: GUIDesigns.h:230
render as a semi-trailer transport vehicle ("Sattelschlepper")
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
VTypeAttributeRow * myCarriageGap
VTypeAttributeRow for carriage GAP.
virtual std::string getAttribute(SumoXMLAttr key) const =0
static StringBijection< LaneChangeModel > LaneChangeModels
lane change models
vehicle that is allowed to drive on high-speed rail tracks
vehicles ignoring classes
CarFollowingModelRow * myTrainTypeRow
Row for TrainType.
static const std::vector< std::string > & getAllClassesStr()
Get all SUMOEmissionClass in string format.
render as a trolley bus
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
is a user-defined type
is an electric vehicle