SUMO - Simulation of Urban MObility
GUICalibrator.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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // Changes flow and speed on a set of lanes (gui version)
20 /****************************************************************************/
21 #ifndef GUICalibrator_h
22 #define GUICalibrator_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <vector>
35 #include <string>
40 #include <gui/GUIManipulator.h>
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
53 public:
60  GUICalibrator(const std::string& id,
61  MSEdge* edge,
62  MSLane* lane,
63  double pos,
64  const std::string& aXMLFilename,
65  const std::string& outputFilename,
66  const SUMOTime freq,
67  const MSRouteProbe* probe);
68 
69 
72 
73 
74 
76 
77 
86  GUISUMOAbstractView& parent);
87 
88 
97  GUISUMOAbstractView& parent);
98 
99 
106 
107 
112  void drawGL(const GUIVisualizationSettings& s) const;
114 
115 
116 
118  GUISUMOAbstractView& parent);
119 
120 public:
122  FXDECLARE(GUICalibratorPopupMenu)
123  public:
124 
126  GUISUMOAbstractView& parent, GUIGlObject& o);
127 
129 
131  long onCmdOpenManip(FXObject*, FXSelector, void*);
132 
133  protected:
135 
136  };
137 
139  FXDECLARE(GUIManip_Calibrator)
140  public:
141  enum {
142  MID_USER_DEF = FXDialogBox::ID_LAST,
146  ID_LAST
147  };
150  const std::string& name, GUICalibrator& o,
151  int xpos, int ypos);
152 
154  virtual ~GUIManip_Calibrator();
155 
156  long onCmdOverride(FXObject*, FXSelector, void*);
157  long onCmdClose(FXObject*, FXSelector, void*);
158  long onCmdUserDef(FXObject*, FXSelector, void*);
159  long onUpdUserDef(FXObject*, FXSelector, void*);
160  long onCmdPreDef(FXObject*, FXSelector, void*);
161  long onUpdPreDef(FXObject*, FXSelector, void*);
162  long onCmdChangeOption(FXObject*, FXSelector, void*);
163 
164  private:
166 
168 
169  FXDataTarget myChosenTarget;
170 
171  double mySpeed;
172 
173  FXDataTarget mySpeedTarget;
174 
175  FXRealSpinDial* myUserDefinedSpeed;
176 
177  FXComboBox* myPredefinedValues;
178 
180 
181  protected:
183 
184  };
185 
186 private:
188  typedef std::vector<Position> PosCont;
189 
191  typedef std::vector<double> RotCont;
192 
193 private:
195  PosCont myFGPositions;
196 
198  RotCont myFGRotations;
199 
202 
205 
206 };
207 
208 
209 #endif
210 
211 /****************************************************************************/
212 
Changes the speed allowed on a set of lanes (gui version)
Definition: GUICalibrator.h:52
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Writes routes of vehicles passing a certain edge.
Definition: MSRouteProbe.h:67
Stores the information about how to visualize structures.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:47
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object&#39;s manipulator shall be shown.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
A road/street connecting two junctions.
Definition: MSEdge.h:80
Boundary myBoundary
The boundary of this rerouter.
std::vector< double > RotCont
Definition of a rotation container.
RotCont myFGRotations
The rotations in full-geometry mode.
std::vector< Position > PosCont
Definition of a positions container.
bool myShowAsKMH
The information whether the speed shall be shown in m/s or km/h.
PosCont myFGPositions
The positions in full-geometry mode.
GUICalibrator(const std::string &id, MSEdge *edge, MSLane *lane, double pos, const std::string &aXMLFilename, const std::string &outputFilename, const SUMOTime freq, const MSRouteProbe *probe)
Constructor.
The popup menu of a globject.
Calibrates the flow on a segment to a specified one.
Definition: MSCalibrator.h:56
long long int SUMOTime
Definition: TraCIDefs.h:51
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
A window containing a gl-object&#39;s parameter.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.