Eclipse SUMO - Simulation of Urban MObility
GNEVehicleTypeDialog.h
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 #ifndef GNEVehicleTypeDialog_h
18 #define GNEVehicleTypeDialog_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include <config.h>
25 
27 
28 #include "GNEDemandElementDialog.h"
29 
30 // ===========================================================================
31 // class declarations
32 // ===========================================================================
33 
34 class GNEVehicleType;
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
39 
46 
47 public:
49  class VTypeAtributes : protected FXVerticalFrame {
52 
53  public:
55  class VClassRow : protected FXHorizontalFrame {
56 
57  public:
59  VClassRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column);
60 
63 
66 
67  private:
70 
72  FXComboBox* myComboBoxVClass;
73 
76 
78  void setVClassLabelImage();
79  };
80 
82  class VShapeRow : protected FXHorizontalFrame {
83 
84  public:
86  VShapeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* column);
87 
89  void setVariable();
90 
92  void updateValues();
93 
94  private:
97 
99  FXComboBox* myComboBoxShape;
100 
103 
105  void setVShapeLabelImage();
106 
107  };
108 
110  class VTypeAttributeRow : private FXHorizontalFrame {
111  public:
112 
114  enum RowAttrType {
120  ROWTYPE_COMBOBOX
121  };
122 
124  VTypeAttributeRow(VTypeAtributes* VTypeAtributesParent, FXVerticalFrame* verticalFrame, const SumoXMLAttr attr, const RowAttrType rowAttrType, const std::vector<std::string>& values = {});
125 
127  void setVariable();
128 
130  void setVariable(const std::string& defaultValue);
131 
133  void updateValue();
134 
136  void updateValue(const std::string& defaultValue);
137 
139  const FXButton* getButton() const;
140 
142  void openColorDialog();
143 
145  void openImageFileDialog();
146 
148  void openOSGFileDialog();
149 
150  private:
153 
156 
159 
161  FXButton* myButton;
162 
164  FXTextField* myTextField;
165 
167  FXComboBox* myComboBox;
168 
170  FXString filterAttributeName(const SumoXMLAttr attr) const;
171  };
172 
174  VTypeAtributes(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column);
175 
177  void buildAttributesA(FXVerticalFrame* column);
178 
180  void buildAttributesB(FXVerticalFrame* column);
181 
183  void buildJunctionModelAttributesA(FXVerticalFrame* column);
184 
186  void buildJunctionModelAttributesB(FXVerticalFrame* column);
187 
189  void buildLaneChangeModelAttributes(FXVerticalFrame* column);
190 
192  void updateValues();
193 
197  long onCmdSetAttribute(FXObject*, FXSelector, void*);
198 
200  long onCmdSetAttributeDialog(FXObject* obj, FXSelector, void*);
201 
203 
204  protected:
207 
210 
213 
216 
219 
222 
225 
228 
231 
234 
237 
240 
243 
246 
249 
252 
255 
258 
261 
264 
267 
270 
273 
276 
279 
282 
285 
288 
291 
294 
296 
299 
302 
305 
308 
311 
314 
317 
320 
323 
326 
329 
331 
332 
335 
338 
341 
344 
347 
350 
353 
356 
359 
362 
365 
368 
371 
374 
377 
380 
383 
386 
389 
391  /* VTypeAttributeRow* myLCAExperimental; */
392 
394 
395  private:
398  };
399 
401  class CarFollowingModelParameters : public FXGroupBox {
404 
405  public:
407  CarFollowingModelParameters(GNEVehicleTypeDialog* vehicleTypeDialog, FXHorizontalFrame* column);
408 
410  void refreshCFMFields();
411 
413  void updateValues();
414 
418  long onCmdSetVariable(FXObject*, FXSelector, void*);
420 
421  protected:
424 
426  class CarFollowingModelRow : public FXHorizontalFrame {
427  public:
429  CarFollowingModelRow(CarFollowingModelParameters* carFollowingModelParametersParent, FXVerticalFrame* verticalFrame, SumoXMLAttr attr, bool allowString = false);
430 
432  void setVariable();
433 
435  void updateValue();
436 
437  private:
440 
443 
445  FXTextField* myTextField;
446  };
447 
448  private:
451 
453  std::vector<CarFollowingModelRow*> myRows;
454 
457 
459  FXVerticalFrame* myVerticalFrameRows;
460 
463 
466 
469 
472 
475 
478 
481 
484 
487 
490 
493 
496 
499 
502 
505 
508 
511 
514 
517 
520 
523 
526 
529 
532  };
533 
535  GNEVehicleTypeDialog(GNEDemandElement* editedVehicleType, bool updatingElement);
536 
539 
543  long onCmdAccept(FXObject*, FXSelector, void*);
544 
546  long onCmdCancel(FXObject*, FXSelector, void*);
547 
549  long onCmdReset(FXObject*, FXSelector, void*);
550 
552  long onCmdSetVariable(FXObject*, FXSelector, void*);
554 
555 private:
558 
561 
564 
567 
570 
573 };
574 
575 #endif
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.
VTypeAttributeRow * myWidth
VTypeAttributeRow for Width.
VTypeAttributeRow * myOSGFile
VTypeAttributeRow for OSG.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
VTypeAttributeRow * myBoardingDuration
VTypeAttributeRow for BoardingDuration.
VTypeAttributeRow * myLCAPushygap
VTypeAttributeRow for pushy gap.
FXVerticalFrame * myVerticalFrameRows
Vertical Frame for CarFollowingModelRow.
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)
VClassRow(VTypeAtributes *VTypeAtributesParent, FXVerticalFrame *column)
constructor
long onCmdSetVariable(FXObject *, FXSelector, void *)
after change a variable of vehicle type
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
Dialog for edit rerouter intervals.
CarFollowingModelRow * myTmp5Row
Row for TMP5.
VTypeAttributeRow * myEmissionClass
VTypeAttributeRow for EmissionClass.
CarFollowingModelRow * myKRow
Row for MinGap (only for Kerner)
GNEVehicleTypeDialog(GNEDemandElement *editedVehicleType, bool updatingElement)
constructor
CarFollowingModelRow * myMinGapFactorRow
Row for MinGapFactor.
VTypeAttributeRow * myJMDriveAfterRedTime
VTypeAttributeRow for Drive After Red Time.
VTypeAttributeRow * myHeight
VTypeAttributeRow for Height.
VTypeAttributeRow * myMaxSpeed
VTypeAttributeRow for MaxSpeed.
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAttributeParameters parent
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.
CarFollowingModelRow * mySecurityRow
Row for Security (only for Wiedemann)
CarFollowingModelRow * myTmp1Row
Row for TMP1.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
VTypeAtributes * myVTypeAtributes
Vehicle Type Common Attributes.
CarFollowingModelRow * myDecelRow
Row for Decel.
VTypeAttributeRow * myLCASpeedGainRight
VTypeAttributeRow for speed gain right.
VTypeAttributeRow * mySpeedDev
VTypeAttributeRow for SpeedDev.
VTypeAttributeRow * myLCAKeeprightParam
VTypeAttributeRow for keep right param.
CarFollowingModelRow * myAdaptFactorRow
Row for Adapt Factor.
CarFollowingModelRow * mySigmaRow
Row for Sigma.
VTypeAttributeRow * myLCALookAheadLeft
VTypeAttributeRow for loock ahead left.
VTypeAttributeRow * myLaneChangeModel
VTypeAttributeRow for LaneChangeModel.
VTypeAttributeRow * myLatAlignment
VTypeAttributeRow for LatAlignment.
VTypeAttributeRow * myLCAMaxSpeedLatStanding
VTypeAttributeRow for max speed lat standing.
bool myVehicleTypeValid
flag to check if current vehicleType is valid
VTypeAttributeRow * myCarriageLength
VTypeAttributeRow for carriage length.
VTypeAttributeRow * myContainerCapacity
VTypeAttributeRow for ContainerCapacity.
SUMOVehicleClass setVariable()
set vehicle class
CarFollowingModelParameters * myCarFollowingModelParameters
Car Following model parameters.
CarFollowingModelRow * myPhiRow
Row for MinGap (only for Kerner)
VTypeAttributeRow * myMinGap
VTypeAttributeRow for MinGap.
FXLabel * myComboBoxVClassLabelImage
label with image of VClass
VTypeAttributeRow * myProbability
VTypeAttributeRow for Probability.
GNEVehicleTypeDialog * myVehicleTypeDialog
pointer to Vehicle Type dialog parent
long onCmdAccept(FXObject *, FXSelector, void *)
VClassRow * myVClassRow
vehicle class row
long onCmdSetAttributeDialog(FXObject *obj, FXSelector, void *)
called after press a button dialog
CarFollowingModelRow * myApparentDecelRow
Row for aparent Decel.
CarFollowingModelRow * myEstimationRow
Row for Estimation (only for Wiedemann)
VTypeAttributeRow * myLCACooperativeParam
VTypeAttributeRow for cooperative param.
VTypeAttributeRow * myActionStepLenght
VTypeAttributeRow for ActionStepLenght.
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.
VTypeAttributeRow * myLCAOppositeParam
VTypeAttributeRow for opposite param.
VTypeAttributeRow * myLoadingDuration
VTypeAttributeRow for LoadingDuration.
VTypeAttributeRow * myJMDriveAfterYellowTime
VTypeAttributeRow for Drive After Yellow Time.
GNEVehicleTypeDialog & operator=(const GNEVehicleTypeDialog &)=delete
Invalidated assignment operator.
VTypeAttributeRow * mySpeedFactor
VTypeAttributeRow for SpeedFactor.
VTypeAttributeRow * myJMSigmaMinor
VTypeAttributeRow for Sigma Minor.
VTypeAttributeRow * myJMIgnoreKeepclearTime
VTypeAttributeRow for Ignore Keep Clear Time.
VTypeAttributeRow * myJMTimeGapMinor
VTypeAttributeRow for Time GAP Minor.
VTypeAttributeRow * myLCAImpatience
VTypeAttributeRow for impatience.
std::vector< CarFollowingModelRow * > myRows
vector with the Car Following Model Row
class used for represent rows with Vehicle Type parameters
VTypeAttributeRow * myPersonCapacity
VTypeAttributeRow for PersonCapacity.
void buildLaneChangeModelAttributes(FXVerticalFrame *column)
build LaneChangeModel attributes
GNEVehicleTypeDialog * myVehicleTypeDialog
VTypeAttributeRow for experimental.
VTypeAttributeRow * myJMImpatience
VTypeAttributeRow for Impatience.
CarFollowingModelRow * myTmp2Row
Row for TMP2.
FXTextField * myTextFieldVehicleTypeID
FXTextfield for vehicleTypeID.
VTypeAtributes * myVTypeAtributesParent
pointer to VTypeAtributes parent
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
Dialog to edit sequences, parameters, etc.. of DemandElements.
void buildJunctionModelAttributesA(FXVerticalFrame *column)
build JunctionModel attributes (A)
VTypeAttributeRow * myLCAMaxSpeedLatFactor
VTypeAttributeRow for max speed lat factor.
VTypeAttributeRow * myJMIgnoreFoeSpeed
VTypeAttributeRow for Ignore FOE Speed.
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
CarFollowingModelParameters * myCarFollowingModelParametersParent
pointer to CarFollowingModelParameters parent
VTypeAttributeRow * myLength
VTypeAttributeRow for Length.
VTypeAttributeRow * myLCATimeToImpatience
VTypeAttributeRow for time to impatience.
CarFollowingModelRow * myTmp3Row
Row for TMP3.
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.
VTypeAttributeRow * myLCAAccelLat
VTypeAttributeRow for accel lat.
CarFollowingModelRow * myAccelRow
Row for Accel.
VTypeAttributeRow * myLCAPushy
VTypeAttributeRow for pushy.
CarFollowingModelRow * myAprobRow
Row for Aprob.
VTypeAttributeRow * myCarriageGap
VTypeAttributeRow for carriage GAP.
CarFollowingModelRow * myTrainTypeRow
Row for TrainType.
An Element which don&#39;t belongs to GNENet but has influency in the simulation.