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-2018 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 
62 
65 
66 
67 
69 
70 
79  GUISUMOAbstractView& parent);
80 
81 
90  GUISUMOAbstractView& parent);
91 
92 
99 
100 
105  void drawGL(const GUIVisualizationSettings& s) const;
107 
108 
109 
111  GUISUMOAbstractView& parent);
112 
113 public:
115  FXDECLARE(GUICalibratorPopupMenu)
116  public:
117 
119  GUISUMOAbstractView& parent, GUIGlObject& o);
120 
122 
124  long onCmdOpenManip(FXObject*, FXSelector, void*);
125 
126  protected:
128 
129  };
130 
132  FXDECLARE(GUIManip_Calibrator)
133  public:
134  enum {
135  MID_USER_DEF = FXDialogBox::ID_LAST,
139  ID_LAST
140  };
143  const std::string& name, GUICalibrator& o,
144  int xpos, int ypos);
145 
147  virtual ~GUIManip_Calibrator();
148 
149  long onCmdOverride(FXObject*, FXSelector, void*);
150  long onCmdClose(FXObject*, FXSelector, void*);
151  long onCmdUserDef(FXObject*, FXSelector, void*);
152  long onUpdUserDef(FXObject*, FXSelector, void*);
153  long onCmdPreDef(FXObject*, FXSelector, void*);
154  long onUpdPreDef(FXObject*, FXSelector, void*);
155  long onCmdChangeOption(FXObject*, FXSelector, void*);
156 
157  private:
159 
161 
162  FXDataTarget myChosenTarget;
163 
164  double mySpeed;
165 
166  FXDataTarget mySpeedTarget;
167 
168  FXRealSpinner* myUserDefinedSpeed;
169 
170  FXComboBox* myPredefinedValues;
171 
173 
174  protected:
176 
177  };
178 
179 private:
181  typedef std::vector<Position> PosCont;
182 
184  typedef std::vector<double> RotCont;
185 
186 private:
188  PosCont myFGPositions;
189 
191  RotCont myFGRotations;
192 
195 
198 
199 };
200 
201 
202 #endif
203 
204 /****************************************************************************/
205 
long long int SUMOTime
Definition: SUMOTime.h:36
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:75
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:50
Representation of a lane in the micro simulation.
Definition: MSLane.h:78
A window containing a gl-object&#39;s parameter.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.