Eclipse 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-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 /****************************************************************************/
17 // Changes flow and speed on a set of lanes (gui version)
18 /****************************************************************************/
19 #ifndef GUICalibrator_h
20 #define GUICalibrator_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <vector>
29 #include <string>
33 #include <gui/GUIManipulator.h>
34 
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
46 public:
53  GUICalibrator(const std::string& id,
54  MSEdge* edge,
55  MSLane* lane,
56  double pos,
57  const std::string& aXMLFilename,
58  const std::string& outputFilename,
59  const SUMOTime freq,
60  const MSRouteProbe* probe,
61  const std::string& vTypes,
62  bool addLaneMeanData = true);
63 
64 
67 
68 
69 
71 
72 
81  GUISUMOAbstractView& parent);
82 
83 
92  GUISUMOAbstractView& parent);
93 
94 
101 
102 
107  void drawGL(const GUIVisualizationSettings& s) const;
109 
110 
111 
113  GUISUMOAbstractView& parent);
114 
115 public:
117  FXDECLARE(GUICalibratorPopupMenu)
118  public:
119 
121  GUISUMOAbstractView& parent, GUIGlObject& o);
122 
124 
126  long onCmdOpenManip(FXObject*, FXSelector, void*);
127 
128  protected:
130 
131  };
132 
134  FXDECLARE(GUIManip_Calibrator)
135  public:
136  enum {
137  MID_USER_DEF = FXDialogBox::ID_LAST,
141  ID_LAST
142  };
145  const std::string& name, GUICalibrator& o,
146  int xpos, int ypos);
147 
149  virtual ~GUIManip_Calibrator();
150 
151  long onCmdOverride(FXObject*, FXSelector, void*);
152  long onCmdClose(FXObject*, FXSelector, void*);
153  long onCmdUserDef(FXObject*, FXSelector, void*);
154  long onUpdUserDef(FXObject*, FXSelector, void*);
155  long onCmdPreDef(FXObject*, FXSelector, void*);
156  long onUpdPreDef(FXObject*, FXSelector, void*);
157  long onCmdChangeOption(FXObject*, FXSelector, void*);
158 
159  private:
161 
163 
164  FXDataTarget myChosenTarget;
165 
166  double mySpeed;
167 
168  FXDataTarget mySpeedTarget;
169 
170  FXRealSpinner* myUserDefinedSpeed;
171 
172  FXComboBox* myPredefinedValues;
173 
175 
176  protected:
178 
179  };
180 
181 private:
183  typedef std::vector<Position> PosCont;
184 
186  typedef std::vector<double> RotCont;
187 
188 private:
190  PosCont myFGPositions;
191 
193  RotCont myFGRotations;
194 
197 
200 
201 };
202 
203 
204 #endif
205 
206 /****************************************************************************/
207 
long long int SUMOTime
Definition: SUMOTime.h:35
Changes the speed allowed on a set of lanes (gui version)
Definition: GUICalibrator.h:45
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Writes routes of vehicles passing a certain edge.
Definition: MSRouteProbe.h:61
Stores the information about how to visualize structures.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
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:76
Boundary myBoundary
The boundary of this rerouter.
std::vector< double > RotCont
Definition of a rotation container.
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, const std::string &vTypes, bool addLaneMeanData=true)
Constructor.
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.
The popup menu of a globject.
Calibrates the flow on a segment to a specified one.
Definition: MSCalibrator.h:51
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
A window containing a gl-object&#39;s parameter.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.