Eclipse SUMO - Simulation of Urban MObility
GUICalibrator.cpp
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 /****************************************************************************/
16 // Changes flow and speed on a set of lanes (gui version)
17 /****************************************************************************/
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
23 #include <string>
26 #include <utils/geom/Boundary.h>
27 #include <utils/gui/div/GLHelper.h>
28 #include <utils/common/ToString.h>
29 #include <utils/common/Command.h>
30 #include <microsim/MSNet.h>
31 #include <microsim/MSLane.h>
32 #include <microsim/MSEdge.h>
33 #include <guisim/GUINet.h>
34 #include <guisim/GUIEdge.h>
37 #include <gui/GUIGlobals.h>
43 #include <guisim/GUICalibrator.h>
45 
46 #include "GUICalibrator.h"
47 
48 
49 // ===========================================================================
50 // FOX callback mapping
51 // ===========================================================================
52 /* -------------------------------------------------------------------------
53  * GUICalibrator::GUICalibratorPopupMenu - mapping
54  * ----------------------------------------------------------------------- */
58 
59 };
60 
61 // Object implementation
63 
64 
65 /* -------------------------------------------------------------------------
66  * GUICalibrator::GUIManip_Calibrator - mapping
67  * ----------------------------------------------------------------------- */
68 FXDEFMAP(GUICalibrator::GUIManip_Calibrator) GUIManip_CalibratorMap[] = {
75 };
76 
77 FXIMPLEMENT(GUICalibrator::GUIManip_Calibrator, GUIManipulator, GUIManip_CalibratorMap, ARRAYNUMBER(GUIManip_CalibratorMap))
78 
79 
80 // ===========================================================================
81 // method definitions
82 // ===========================================================================
83 /* -------------------------------------------------------------------------
84  * GUICalibrator::GUIManip_Calibrator - methods
85  * ----------------------------------------------------------------------- */
87  GUIMainWindow& app,
88  const std::string& name, GUICalibrator& o,
89  int /*xpos*/, int /*ypos*/) :
90  GUIManipulator(app, name, 0, 0),
91  myParent(&app),
92  myChosenValue(0),
93  myChosenTarget(myChosenValue, nullptr, MID_OPTION),
94  //mySpeed(o.getDefaultSpeed()),
95  mySpeed(0),
96  mySpeedTarget(mySpeed),
97  myObject(&o) {
98  myChosenTarget.setTarget(this);
99  FXVerticalFrame* f1 =
100  new FXVerticalFrame(this, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0);
101 
102  FXGroupBox* gp = new FXGroupBox(f1, "Change Speed",
103  GROUPBOX_TITLE_LEFT | FRAME_RIDGE,
104  0, 0, 0, 0, 4, 4, 1, 1, 2, 0);
105  {
106  // default
107  FXHorizontalFrame* gf1 =
108  new FXHorizontalFrame(gp, LAYOUT_TOP | LAYOUT_LEFT, 0, 0, 0, 0, 10, 10, 5, 5);
109  new FXRadioButton(gf1, "Default", &myChosenTarget, FXDataTarget::ID_OPTION + 0,
110  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP,
111  0, 0, 0, 0, 2, 2, 0, 0);
112  }
113  {
114  // loaded
115  FXHorizontalFrame* gf0 =
116  new FXHorizontalFrame(gp, LAYOUT_TOP | LAYOUT_LEFT, 0, 0, 0, 0, 10, 10, 5, 5);
117  new FXRadioButton(gf0, "Loaded", &myChosenTarget, FXDataTarget::ID_OPTION + 1,
118  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP,
119  0, 0, 0, 0, 2, 2, 0, 0);
120  }
121  {
122  // predefined
123  FXHorizontalFrame* gf2 =
124  new FXHorizontalFrame(gp, LAYOUT_TOP | LAYOUT_LEFT, 0, 0, 0, 0, 10, 10, 5, 5);
125  new FXRadioButton(gf2, "Predefined: ", &myChosenTarget, FXDataTarget::ID_OPTION + 2,
126  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP | LAYOUT_CENTER_Y,
127  0, 0, 0, 0, 2, 2, 0, 0);
128  myPredefinedValues =
129  new FXComboBox(gf2, 10, this, MID_PRE_DEF,
130  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP | LAYOUT_CENTER_Y | COMBOBOX_STATIC);
131  myPredefinedValues->appendItem("20 km/h");
132  myPredefinedValues->appendItem("40 km/h");
133  myPredefinedValues->appendItem("60 km/h");
134  myPredefinedValues->appendItem("80 km/h");
135  myPredefinedValues->appendItem("100 km/h");
136  myPredefinedValues->appendItem("120 km/h");
137  myPredefinedValues->appendItem("140 km/h");
138  myPredefinedValues->appendItem("160 km/h");
139  myPredefinedValues->appendItem("180 km/h");
140  myPredefinedValues->appendItem("200 km/h");
141  myPredefinedValues->setNumVisible(5);
142  }
143  {
144  // free
145  FXHorizontalFrame* gf12 =
146  new FXHorizontalFrame(gp, LAYOUT_TOP | LAYOUT_LEFT, 0, 0, 0, 0, 10, 10, 5, 5);
147  new FXRadioButton(gf12, "Free Entry: ", &myChosenTarget, FXDataTarget::ID_OPTION + 3,
148  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP | LAYOUT_CENTER_Y,
149  0, 0, 0, 0, 2, 2, 0, 0);
150  myUserDefinedSpeed =
151  new FXRealSpinner(gf12, 10, this, MID_USER_DEF,
152  LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
153  //myUserDefinedSpeed->setFormatString("%.0f km/h");
154  //myUserDefinedSpeed->setIncrements(1, 10, 10);
155  myUserDefinedSpeed->setIncrement(10);
156  myUserDefinedSpeed->setRange(0, 300);
157  myUserDefinedSpeed->setValue(0);
158  //static_cast<GUICalibrator*>(myObject)->getDefaultSpeed() * 3.6);
159  }
160  new FXButton(f1, "Close", nullptr, this, MID_CLOSE,
161  BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4);
162  //static_cast<GUICalibrator*>(myObject)->setOverriding(true);
163 }
164 
165 
167 
168 
169 long
170 GUICalibrator::GUIManip_Calibrator::onCmdClose(FXObject*, FXSelector, void*) {
171  destroy();
172  return 1;
173 }
174 
175 
176 long
178  //mySpeed = (double)(myUserDefinedSpeed->getValue() / 3.6);
179  //static_cast<GUICalibrator*>(myObject)->setOverridingValue(mySpeed);
180  //myParent->updateChildren();
181  return 1;
182 }
183 
184 
185 long
186 GUICalibrator::GUIManip_Calibrator::onUpdUserDef(FXObject* sender, FXSelector, void* ptr) {
187  sender->handle(this,
188  myChosenValue != 3 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
189  ptr);
190  myParent->updateChildren();
191  return 1;
192 }
193 
194 
195 long
196 GUICalibrator::GUIManip_Calibrator::onCmdPreDef(FXObject*, FXSelector, void*) {
197  //mySpeed = (double)(double)((myPredefinedValues->getCurrentItem() * 20 + 20) / 3.6);
198  //static_cast<GUICalibrator*>(myObject)->setOverridingValue(mySpeed);
199  //myParent->updateChildren();
200  return 1;
201 }
202 
203 
204 long
205 GUICalibrator::GUIManip_Calibrator::onUpdPreDef(FXObject* sender, FXSelector, void* ptr) {
206  sender->handle(this,
207  myChosenValue != 2 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
208  ptr);
209  myParent->updateChildren();
210  return 1;
211 }
212 
213 
214 long
216  //static_cast<GUICalibrator*>(myObject)->setOverriding(true);
217  //switch (myChosenValue) {
218  // case 0:
219  // mySpeed = (double) static_cast<GUICalibrator*>(myObject)->getDefaultSpeed();
220  // break;
221  // case 1:
222  // mySpeed = (double) static_cast<GUICalibrator*>(myObject)->getLoadedSpeed();
223  // break;
224  // case 2:
225  // mySpeed = (double)((myPredefinedValues->getCurrentItem() * 20 + 20) / 3.6);
226  // break;
227  // case 3:
228  // mySpeed = (double)(myUserDefinedSpeed->getValue() / 3.6);
229  // break;
230  // default:
231  // // hmmm, should not happen
232  // break;
233  //}
234  //static_cast<GUICalibrator*>(myObject)->setOverridingValue(mySpeed);
235  //myParent->updateChildren();
236  //if (myChosenValue == 1) {
237  // // !!! lock in between
238  // static_cast<GUICalibrator*>(myObject)->setOverriding(false);
239  //}
240  return 1;
241 }
242 
243 
244 
245 /* -------------------------------------------------------------------------
246  * GUICalibrator::GUICalibratorPopupMenu - methods
247  * ----------------------------------------------------------------------- */
249  GUIMainWindow& app, GUISUMOAbstractView& parent,
250  GUIGlObject& o)
251  : GUIGLObjectPopupMenu(app, parent, o) {}
252 
253 
255 
256 
257 long
259  FXSelector,
260  void*) {
261  static_cast<GUICalibrator*>(myObject)->openManipulator(
262  *myApplication, *myParent);
263  return 1;
264 }
265 
266 
267 /* -------------------------------------------------------------------------
268  * GUICalibrator - methods
269  * ----------------------------------------------------------------------- */
270 GUICalibrator::GUICalibrator(const std::string& id,
271  MSEdge* edge,
272  MSLane* lane,
273  double pos,
274  const std::string& aXMLFilename,
275  const std::string& outputFilename,
276  const SUMOTime freq,
277  const MSRouteProbe* probe,
278  const std::string& vTypes,
279  bool addLaneMeanData) :
280  MSCalibrator(id, edge, lane, pos, aXMLFilename, outputFilename, freq, edge->getLength(), probe, vTypes, addLaneMeanData),
282  myShowAsKMH(true) {
283  const std::vector<MSLane*>& destLanes = edge->getLanes();
284  for (std::vector<MSLane*>::const_iterator i = destLanes.begin(); i != destLanes.end(); ++i) {
285  if (lane == nullptr || (*i) == lane) {
286  const PositionVector& v = (*i)->getShape();
287  myFGPositions.push_back(v.positionAtOffset(pos));
289  myFGRotations.push_back(-v.rotationDegreeAtOffset(pos));
290  }
291  }
292 }
293 
294 
296 
297 
300  GUISUMOAbstractView& parent) {
301  GUIGLObjectPopupMenu* ret = new GUICalibratorPopupMenu(app, parent, *this);
302  buildPopupHeader(ret, app);
304  //buildShowManipulatorPopupEntry(ret);
308  buildPositionCopyEntry(ret, false);
309  return ret;
310 }
311 
312 
317  if (isActive()) {
318  ret = new GUIParameterTableWindow(app, *this, 12);
319  // add items
320  ret->mkItem("interval start", false, STEPS2TIME(myCurrentStateInterval->begin));
321  ret->mkItem("interval end", false, STEPS2TIME(myCurrentStateInterval->end));
322  ret->mkItem("aspired flow [veh/h]", false, myCurrentStateInterval->q);
323  ret->mkItem("aspired speed", false, myCurrentStateInterval->v);
324  ret->mkItem("current flow [veh/h]", true, new FunctionBinding<GUICalibrator, double>(this, &GUICalibrator::currentFlow));
325  ret->mkItem("current speed", true, new FunctionBinding<GUICalibrator, double>(this, &GUICalibrator::currentSpeed));
326  ret->mkItem("default speed", false, myDefaultSpeed);
327  ret->mkItem("required vehicles", true, new FunctionBinding<GUICalibrator, int>(this, &GUICalibrator::totalWished));
328  ret->mkItem("passed vehicles", true, new FunctionBinding<GUICalibrator, int>(this, &GUICalibrator::passed));
329  ret->mkItem("inserted vehicles", true, new FunctionBinding<GUICalibrator, int>(this, &GUICalibrator::inserted));
330  ret->mkItem("removed vehicles", true, new FunctionBinding<GUICalibrator, int>(this, &GUICalibrator::removed));
331  ret->mkItem("cleared in jam", true, new FunctionBinding<GUICalibrator, int>(this, &GUICalibrator::clearedInJam));
332  } else {
333  ret = new GUIParameterTableWindow(app, *this, 1);
334  const std::string nextStart =
337  "simulation end");
338  ret->mkItem("inactive until", false, nextStart);
339  }
340  // close building
341  ret->closeBuilding();
342  return ret;
343 }
344 
345 
346 void
348  glPushName(getGlID());
349  std::string flow = "-";
350  std::string speed = "-";
351  if (isActive()) {
352  if (myCurrentStateInterval->v >= 0) {
353  speed = toString(myCurrentStateInterval->v) + "m/s";
354  }
355  if (myCurrentStateInterval->q >= 0) {
356  flow = toString((int)myCurrentStateInterval->q) + "v/h";
357  }
358  }
359  const double exaggeration = s.addSize.getExaggeration(s, this);
360  for (int i = 0; i < (int)myFGPositions.size(); ++i) {
361  const Position& pos = myFGPositions[i];
362  double rot = myFGRotations[i];
363  glPushMatrix();
364  glTranslated(pos.x(), pos.y(), getType());
365  glRotated(rot, 0, 0, 1);
366  glTranslated(0, 0, getType());
367  glScaled(exaggeration, exaggeration, 1);
368  glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
369 
370  glBegin(GL_TRIANGLES);
371  glColor3d(1, .8f, 0);
372  // base
373  glVertex2d(0 - 1.4, 0);
374  glVertex2d(0 - 1.4, 6);
375  glVertex2d(0 + 1.4, 6);
376  glVertex2d(0 + 1.4, 0);
377  glVertex2d(0 - 1.4, 0);
378  glVertex2d(0 + 1.4, 6);
379  glEnd();
380 
381  // draw text
382  if (s.scale * exaggeration >= 1.) {
383  glTranslated(0, 0, .1);
384  GLHelper::drawText("C", Position(0, 2), 0.1, 3, RGBColor::BLACK, 180);
385  GLHelper::drawText(flow, Position(0, 4), 0.1, 0.7, RGBColor::BLACK, 180);
386  GLHelper::drawText(speed, Position(0, 5), 0.1, 0.7, RGBColor::BLACK, 180);
387  }
388  glPopMatrix();
389  }
390  drawName(getCenteringBoundary().getCenter(), s.scale, s.addName);
391  glPopName();
392 }
393 
394 
395 Boundary
397  Boundary b(myBoundary);
398  b.grow(20);
399  return b;
400 }
401 
402 
406  GUIManip_Calibrator* gui =
407  new GUIManip_Calibrator(app, getFullName(), *this, 0, 0);
408  gui->create();
409  gui->show();
410  return gui;
411 }
412 
413 
414 
415 /****************************************************************************/
416 
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:180
Boundary.h
GUICalibrator::GUIManip_Calibrator::onCmdClose
long onCmdClose(FXObject *, FXSelector, void *)
Definition: GUICalibrator.cpp:170
MSCalibrator::passed
virtual int passed() const
Definition: MSCalibrator.h:193
ToString.h
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:62
GUICalibrator::GUIManip_Calibrator::~GUIManip_Calibrator
virtual ~GUIManip_Calibrator()
Destructor.
Definition: GUICalibrator.cpp:166
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
MSNet.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
GUIParameterTableWindow.h
MSCalibrator::clearedInJam
int clearedInJam() const
Definition: MSCalibrator.h:222
MSCalibrator::currentFlow
double currentFlow() const
flow in the current interval in veh/h
Definition: MSCalibrator.cpp:248
GUIGlObject::drawName
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
Definition: GUIGlObject.cpp:354
RGBColor::BLACK
static const RGBColor BLACK
Definition: RGBColor.h:197
GUIGlObject::buildSelectionPopupEntry
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
Definition: GUIGlObject.cpp:235
MSRouteProbe
Writes routes of vehicles passing a certain edge.
Definition: MSRouteProbe.h:60
GUICalibrator
Changes the speed allowed on a set of lanes (gui version)
Definition: GUICalibrator.h:44
MSCalibrator::currentSpeed
double currentSpeed() const
measured speed in the current interval
Definition: MSCalibrator.cpp:254
MSCalibrator::myCurrentStateInterval
std::vector< AspiredState >::const_iterator myCurrentStateInterval
Iterator pointing to the current interval.
Definition: MSCalibrator.h:271
MsgHandler.h
GUIGLObjectPopupMenu.h
GUIGlobalSelection.h
MSCalibrator::removed
int removed() const
Definition: MSCalibrator.h:219
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
GUICalibrator::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUICalibrator.cpp:314
GUICalibrator::getPopUpMenu
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUICalibrator.cpp:299
GUIGlObject::getFullName
const std::string & getFullName() const
Definition: GUIGlObject.cpp:137
MSEdge.h
GLHelper.h
GUIGlObject_AbstractAdd
Definition: GUIGlObject_AbstractAdd.h:39
GUINet.h
PositionVector
A list of positions.
Definition: PositionVector.h:45
GUIGLObjectPopupMenu
The popup menu of a globject.
Definition: GUIGLObjectPopupMenu.h:47
GUICalibrator::openManipulator
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Definition: GUICalibrator.cpp:404
MSCalibrator::myDefaultSpeed
double myDefaultSpeed
The default (maximum) speed on the segment.
Definition: MSCalibrator.h:299
GUICalibrator::myBoundary
Boundary myBoundary
The boundary of this rerouter.
Definition: GUICalibrator.h:195
GUIParameterTableWindow::closeBuilding
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
Definition: GUIParameterTableWindow.cpp:219
GUIAppEnum.h
GUICalibratorPopupMenuMap
GUICalibratorPopupMenuMap[]
Definition: GUICalibrator.cpp:56
GLHelper::drawText
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
Definition: GLHelper.cpp:673
GUIVisualizationSettings::addName
GUIVisualizationTextSettings addName
Definition: GUIVisualizationSettings.h:591
MSCalibrator::isActive
bool isActive() const
Definition: MSCalibrator.h:170
FXDEFMAP
FXDEFMAP(GUICalibrator::GUIManip_Calibrator) GUIManip_CalibratorMap[]
GUIGlObject::buildNameCopyPopupEntry
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
Definition: GUIGlObject.cpp:225
GUIParameterTableWindow::mkItem
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
Definition: GUIParameterTableWindow.h:108
GUIGlobals.h
GUICalibrator::GUIManip_Calibrator::onUpdUserDef
long onUpdUserDef(FXObject *, FXSelector, void *)
Definition: GUICalibrator.cpp:186
STEPS2TIME
#define STEPS2TIME(x)
Definition: SUMOTime.h:56
PositionVector::positionAtOffset
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Definition: PositionVector.cpp:248
PositionVector::rotationDegreeAtOffset
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
Definition: PositionVector.cpp:319
GUIGlObject::getGlID
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.cpp:149
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:41
GUICalibrator::myFGPositions
PosCont myFGPositions
The positions in full-geometry mode.
Definition: GUICalibrator.h:189
GUICalibrator::GUICalibratorPopupMenu::GUICalibratorPopupMenu
GUICalibratorPopupMenu()
Definition: GUICalibrator.h:128
GUICalibrator::GUIManip_Calibrator::onCmdUserDef
long onCmdUserDef(FXObject *, FXSelector, void *)
Definition: GUICalibrator.cpp:177
GUIVisualizationSettings::scale
double scale
information about a lane's width (temporary, used for a single view)
Definition: GUIVisualizationSettings.h:632
GUIApplicationWindow.h
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GUICalibrator::GUICalibratorPopupMenu
Definition: GUICalibrator.h:115
GUICalibrator::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUICalibrator.cpp:347
Position::x
double x() const
Returns the x-position.
Definition: Position.h:56
Boundary::add
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:78
MSCalibrator::totalWished
int totalWished() const
number of vehicles expected to pass this interval
Definition: MSCalibrator.cpp:237
time2string
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:67
GUICalibrator::GUIManip_Calibrator::onCmdChangeOption
long onCmdChangeOption(FXObject *, FXSelector, void *)
Definition: GUICalibrator.cpp:215
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:78
GUICalibrator::GUIManip_Calibrator
Definition: GUICalibrator.h:132
GUICalibrator::~GUICalibrator
~GUICalibrator()
Definition: GUICalibrator.cpp:295
GUIGlObject
Definition: GUIGlObject.h:65
GUICalibrator::GUICalibratorPopupMenu::onCmdOpenManip
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object's manipulator shall be shown.
Definition: GUICalibrator.cpp:258
GUICalibrator::myShowAsKMH
bool myShowAsKMH
The information whether the speed shall be shown in m/s or km/h.
Definition: GUICalibrator.h:198
GUICalibrator.h
GUIGlObject::buildPopupHeader
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
Definition: GUIGlObject.cpp:207
GUIIconSubSys.h
GUICalibrator::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUICalibrator.cpp:396
GLIncludes.h
GUICalibrator::GUIManip_Calibrator::onUpdPreDef
long onUpdPreDef(FXObject *, FXSelector, void *)
Definition: GUICalibrator.cpp:205
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
FunctionBinding.h
GUICalibrator::GUICalibratorPopupMenu::~GUICalibratorPopupMenu
~GUICalibratorPopupMenu()
Definition: GUICalibrator.cpp:254
GUIMainWindow
Definition: GUIMainWindow.h:46
Position::y
double y() const
Returns the y-position.
Definition: Position.h:61
GUIManipulator
Definition: GUIManipulator.h:42
GUICalibrator::GUIManip_Calibrator::MID_PRE_DEF
Definition: GUICalibrator.h:137
MID_MANIP
Open the object's manipulator.
Definition: GUIAppEnum.h:412
GUIEdge.h
GUIGlObject::buildShowParamsPopupEntry
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
Definition: GUIGlObject.cpp:248
GUICalibrator::GUIManip_Calibrator::MID_OPTION
Definition: GUICalibrator.h:138
GUIGlObject::buildCenterPopupEntry
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
Definition: GUIGlObject.cpp:216
GUIGlObject::buildPositionCopyEntry
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
Definition: GUIGlObject.cpp:266
MSEdge::getLanes
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Definition: MSEdge.h:167
GLO_CALIBRATOR
a Calibrator
Definition: GUIGlObjectTypes.h:91
config.h
GUICalibrator::GUICalibrator
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.
Definition: GUICalibrator.cpp:270
GUIVisualizationSettings::addSize
GUIVisualizationSizeSettings addSize
Definition: GUIVisualizationSettings.h:589
GUICalibrator::myFGRotations
RotCont myFGRotations
The rotations in full-geometry mode.
Definition: GUICalibrator.h:192
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:300
MSCalibrator::inserted
int inserted() const
Definition: MSCalibrator.h:216
Command.h
MSLane.h
GUICalibrator::GUIManip_Calibrator::onCmdPreDef
long onCmdPreDef(FXObject *, FXSelector, void *)
Definition: GUICalibrator.cpp:196
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
FunctionBinding
Definition: FunctionBinding.h:40
MSCalibrator
Calibrates the flow on a segment to a specified one.
Definition: MSCalibrator.h:50
MSCalibrator::myIntervals
std::vector< AspiredState > myIntervals
List of adaptation intervals.
Definition: MSCalibrator.h:269
GUICalibrator::GUIManip_Calibrator::MID_USER_DEF
Definition: GUICalibrator.h:136
PositionVector.h
GUIVisualizationSizeSettings::getExaggeration
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
Definition: GUIVisualizationSettings.cpp:212
GUICalibrator::GUIManip_Calibrator::MID_CLOSE
Definition: GUICalibrator.h:139