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