SUMO - Simulation of Urban MObility
GUICalibrator.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Changes flow and speed on a set of lanes (gui version)
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef GUICalibrator_h
23 #define GUICalibrator_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <vector>
36 #include <string>
41 #include <gui/GUIManipulator.h>
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
54 public:
61  GUICalibrator(const std::string& id,
62  MSEdge* edge,
63  MSLane* lane,
64  double pos,
65  const std::string& aXMLFilename,
66  const std::string& outputFilename,
67  const SUMOTime freq,
68  const MSRouteProbe* probe);
69 
70 
73 
74 
75 
77 
78 
87  GUISUMOAbstractView& parent);
88 
89 
98  GUISUMOAbstractView& parent);
99 
100 
107 
108 
113  void drawGL(const GUIVisualizationSettings& s) const;
115 
116 
117 
119  GUISUMOAbstractView& parent);
120 
121 public:
123  FXDECLARE(GUICalibratorPopupMenu)
124  public:
125 
127  GUISUMOAbstractView& parent, GUIGlObject& o);
128 
130 
132  long onCmdOpenManip(FXObject*, FXSelector, void*);
133 
134  protected:
136 
137  };
138 
140  FXDECLARE(GUIManip_Calibrator)
141  public:
142  enum {
143  MID_USER_DEF = FXDialogBox::ID_LAST,
147  ID_LAST
148  };
151  const std::string& name, GUICalibrator& o,
152  int xpos, int ypos);
153 
155  virtual ~GUIManip_Calibrator();
156 
157  long onCmdOverride(FXObject*, FXSelector, void*);
158  long onCmdClose(FXObject*, FXSelector, void*);
159  long onCmdUserDef(FXObject*, FXSelector, void*);
160  long onUpdUserDef(FXObject*, FXSelector, void*);
161  long onCmdPreDef(FXObject*, FXSelector, void*);
162  long onUpdPreDef(FXObject*, FXSelector, void*);
163  long onCmdChangeOption(FXObject*, FXSelector, void*);
164 
165  private:
167 
169 
170  FXDataTarget myChosenTarget;
171 
172  double mySpeed;
173 
174  FXDataTarget mySpeedTarget;
175 
176  FXRealSpinDial* myUserDefinedSpeed;
177 
178  FXComboBox* myPredefinedValues;
179 
181 
182  protected:
184 
185  };
186 
187 private:
189  typedef std::vector<Position> PosCont;
190 
192  typedef std::vector<double> RotCont;
193 
194 private:
196  PosCont myFGPositions;
197 
199  RotCont myFGRotations;
200 
203 
206 
207 };
208 
209 
210 #endif
211 
212 /****************************************************************************/
213 
Changes the speed allowed on a set of lanes (gui version)
Definition: GUICalibrator.h:53
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Writes routes of vehicles passing a certain edge.
Definition: MSRouteProbe.h:68
Stores the information about how to visualize structures.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
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.
A road/street connecting two junctions.
Definition: MSEdge.h:81
Boundary myBoundary
The boundary of this rerouter.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::vector< double > RotCont
Definition of a rotation container.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
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:57
long long int SUMOTime
Definition: TraCIDefs.h:52
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
A window containing a gl-object&#39;s parameter.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.