Eclipse SUMO - Simulation of Urban MObility
GUITriggeredRerouter.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 // Reroutes vehicles passing an edge (gui version)
18 /****************************************************************************/
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <string>
29 #include <utils/geom/Boundary.h>
30 #include <utils/gui/div/GLHelper.h>
31 #include <utils/common/ToString.h>
32 #include <utils/common/Command.h>
33 #include <microsim/MSNet.h>
34 #include <microsim/MSLane.h>
35 #include <microsim/MSEdge.h>
36 #include <guisim/GUINet.h>
37 #include <guisim/GUIEdge.h>
38 #include "GUITriggeredRerouter.h"
41 #include <gui/GUIGlobals.h>
47 
48 
49 // ===========================================================================
50 // FOX callback mapping
51 // ===========================================================================
52 /* -------------------------------------------------------------------------
53  * GUITriggeredRerouter::GUITriggeredRerouterPopupMenu - mapping
54  * ----------------------------------------------------------------------- */
58 
59 };
60 
61 // Object implementation
63 
64 
65 /* -------------------------------------------------------------------------
66  * GUITriggeredRerouter::GUIManip_TriggeredRerouter - mapping
67  * ----------------------------------------------------------------------- */
68 FXDEFMAP(GUITriggeredRerouter::GUIManip_TriggeredRerouter) GUIManip_TriggeredRerouterMap[] = {
73 };
74 
75 FXIMPLEMENT(GUITriggeredRerouter::GUIManip_TriggeredRerouter, GUIManipulator, GUIManip_TriggeredRerouterMap, ARRAYNUMBER(GUIManip_TriggeredRerouterMap))
76 
77 
78 // ===========================================================================
79 // method definitions
80 // ===========================================================================
81 /* -------------------------------------------------------------------------
82  * GUITriggeredRerouter::GUIManip_TriggeredRerouter - methods
83  * ----------------------------------------------------------------------- */
85  GUIMainWindow& app,
86  const std::string& name, GUITriggeredRerouter& o,
87  int /*xpos*/, int /*ypos*/)
88  : GUIManipulator(app, name, 0, 0), myParent(&app),
89  myChosenValue(0), myChosenTarget(myChosenValue, nullptr, MID_OPTION),
90  myUsageProbability(o.getProbability()), myUsageProbabilityTarget(myUsageProbability),
91  myObject(&o) {
92  myChosenTarget.setTarget(this);
93  FXVerticalFrame* f1 =
94  new FXVerticalFrame(this, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0);
95 
96  FXGroupBox* gp = new FXGroupBox(f1, "Change Probability",
97  GROUPBOX_TITLE_LEFT | FRAME_SUNKEN | FRAME_RIDGE,
98  0, 0, 0, 0, 4, 4, 1, 1, 2, 0);
99  {
100  // default
101  FXHorizontalFrame* gf1 =
102  new FXHorizontalFrame(gp, LAYOUT_TOP | LAYOUT_LEFT, 0, 0, 0, 0, 10, 10, 5, 5);
103  new FXRadioButton(gf1, "Default", &myChosenTarget, FXDataTarget::ID_OPTION + 0,
104  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP,
105  0, 0, 0, 0, 2, 2, 0, 0);
106  }
107  {
108  // free
109  FXHorizontalFrame* gf12 =
110  new FXHorizontalFrame(gp, LAYOUT_TOP | LAYOUT_LEFT, 0, 0, 0, 0, 10, 10, 5, 5);
111  new FXRadioButton(gf12, "User Given: ", &myChosenTarget, FXDataTarget::ID_OPTION + 1,
112  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP | LAYOUT_CENTER_Y,
113  0, 0, 0, 0, 2, 2, 0, 0);
114  myUsageProbabilityDial =
115  new FXRealSpinner(gf12, 10, this, MID_USER_DEF,
116  LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
117  //myUsageProbabilityDial->setFormatString("%.2f");
118  //myUsageProbabilityDial->setIncrements(.1, .1, .1);
119  myUsageProbabilityDial->setIncrement(.1);
120  myUsageProbabilityDial->setRange(0, 1);
121  myUsageProbabilityDial->setValue(myObject->getUserProbability());
122  }
123  {
124  // off
125  FXHorizontalFrame* gf13 =
126  new FXHorizontalFrame(gp, LAYOUT_TOP | LAYOUT_LEFT, 0, 0, 0, 0, 10, 10, 5, 5);
127  new FXRadioButton(gf13, "Off", &myChosenTarget, FXDataTarget::ID_OPTION + 2,
128  ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP,
129  0, 0, 0, 0, 2, 2, 0, 0);
130  }
131  myChosenValue = myObject->inUserMode()
132  ? myObject->getUserProbability() > 0
133  ? 1 : 2
134  : 0;
135  new FXButton(f1, "Close", nullptr, this, MID_CLOSE,
136  BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4);
137 }
138 
139 
141 
142 
143 long
145  destroy();
146  return 1;
147 }
148 
149 
150 long
152  myUsageProbability = (double)(myUsageProbabilityDial->getValue());
153  static_cast<GUITriggeredRerouter*>(myObject)->setUserUsageProbability(myUsageProbability);
154  static_cast<GUITriggeredRerouter*>(myObject)->setUserMode(true);
155  myParent->updateChildren();
156  return 1;
157 }
158 
159 
160 long
161 GUITriggeredRerouter::GUIManip_TriggeredRerouter::onUpdUserDef(FXObject* sender, FXSelector, void* ptr) {
162  sender->handle(this,
163  myChosenValue != 1 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
164  ptr);
165  myParent->updateChildren();
166  return 1;
167 }
168 
169 
170 long
172  static_cast<GUITriggeredRerouter*>(myObject)->setUserUsageProbability(myUsageProbability);
173  switch (myChosenValue) {
174  case 0:
175  static_cast<GUITriggeredRerouter*>(myObject)->setUserMode(false);
176  break;
177  case 1:
178  static_cast<GUITriggeredRerouter*>(myObject)->setUserMode(true);
179  break;
180  case 2:
181  static_cast<GUITriggeredRerouter*>(myObject)->setUserUsageProbability(0);
182  static_cast<GUITriggeredRerouter*>(myObject)->setUserMode(true);
183  break;
184  default:
185  throw 1;
186  }
187  myParent->updateChildren();
188  return 1;
189 }
190 
191 
192 /* -------------------------------------------------------------------------
193  * GUITriggeredRerouter::GUITriggeredRerouterPopupMenu - methods
194  * ----------------------------------------------------------------------- */
196  GUIMainWindow& app, GUISUMOAbstractView& parent,
197  GUIGlObject& o)
198  : GUIGLObjectPopupMenu(app, parent, o) {}
199 
200 
202 
203 
204 long
206  FXSelector,
207  void*) {
208  static_cast<GUITriggeredRerouter*>(myObject)->openManipulator(
209  *myApplication, *myParent);
210  return 1;
211 }
212 
213 // -------------------------------------------------------------------------
214 // GUITriggeredRerouter - methods
215 // -------------------------------------------------------------------------
216 
217 GUITriggeredRerouter::GUITriggeredRerouter(const std::string& id, const MSEdgeVector& edges, double prob,
218  const std::string& aXMLFilename, bool off, SUMOTime timeThreshold, const std::string& vTypes, SUMORTree& rtree) :
219  MSTriggeredRerouter(id, edges, prob, aXMLFilename, off, timeThreshold, vTypes),
221  // add visualisation objects for edges which trigger the rerouter
222  for (MSEdgeVector::const_iterator it = edges.begin(); it != edges.end(); ++it) {
223  myEdgeVisualizations.push_back(new GUITriggeredRerouterEdge(dynamic_cast<GUIEdge*>(*it), this, false));
225  myBoundary.add(myEdgeVisualizations.back()->getCenteringBoundary());
226  }
227 }
228 
229 
231  for (std::vector<GUITriggeredRerouterEdge*>::iterator it = myEdgeVisualizations.begin(); it != myEdgeVisualizations.end(); ++it) {
232  delete *it;
233  }
234  myEdgeVisualizations.clear();
235 }
236 
237 
238 void
241  if (element == SUMO_TAG_INTERVAL) {
242  // add visualisation objects for closed edges
243  const RerouteInterval& ri = myIntervals.back();
244  for (MSEdgeVector::const_iterator it = ri.closed.begin(); it != ri.closed.end(); ++it) {
245  myEdgeVisualizations.push_back(new GUITriggeredRerouterEdge(dynamic_cast<GUIEdge*>(*it), this, true));
246  dynamic_cast<GUINet*>(GUINet::getInstance())->getVisualisationSpeedUp().addAdditionalGLObject(myEdgeVisualizations.back());
247  myBoundary.add(myEdgeVisualizations.back()->getCenteringBoundary());
248  }
249  }
250 }
251 
252 
255  GUISUMOAbstractView& parent) {
256  GUIGLObjectPopupMenu* ret = new GUITriggeredRerouterPopupMenu(app, parent, *this);
257  buildPopupHeader(ret, app);
259  buildShowManipulatorPopupEntry(ret, false);
262  buildPositionCopyEntry(ret, false);
263  return ret;
264 }
265 
266 
270  return nullptr;
271 }
272 
273 
274 void
276  UNUSED_PARAMETER(s);
277 }
278 
279 
280 Boundary
282  Boundary b(myBoundary);
283  b.grow(20);
284  return b;
285 }
286 
287 
288 
293  new GUIManip_TriggeredRerouter(app, getFullName(), *this, 0, 0);
294  gui->create();
295  gui->show();
296  return gui;
297 }
298 
299 
300 /* -------------------------------------------------------------------------
301  * GUITriggeredRerouterEdge - methods
302  * ----------------------------------------------------------------------- */
304  GUIGlObject(GLO_REROUTER_EDGE, parent->getID() + ":" + edge->getID()),
305  myParent(parent),
306  myEdge(edge),
307  myAmClosedEdge(closed) {
308  const std::vector<MSLane*>& lanes = edge->getLanes();
309  myFGPositions.reserve(lanes.size());
310  myFGRotations.reserve(lanes.size());
311  for (std::vector<MSLane*>::const_iterator i = lanes.begin(); i != lanes.end(); ++i) {
312  const PositionVector& v = (*i)->getShape();
313  const double pos = closed ? 3 : v.length() - (double) 6.;
314  myFGPositions.push_back((*i)->geometryPositionAtOffset(pos));
315  myFGRotations.push_back(-v.rotationDegreeAtOffset(pos));
316  myBoundary.add(myFGPositions.back());
317  }
318 }
319 
320 
322 
323 
326  GUISUMOAbstractView& parent) {
327  return myParent->getPopUpMenu(app, parent);
328 }
329 
330 
334  return nullptr;
335 }
336 
337 
338 void
340  const double exaggeration = s.addSize.getExaggeration(s, this);
341  if (s.scale * exaggeration >= 3) {
342  glPushName(getGlID());
343  const double prob = myParent->getProbability();
344  if (myAmClosedEdge) {
345  // draw closing symbol onto all lanes
346  const RerouteInterval* const ri =
347  myParent->getCurrentReroute(MSNet::getInstance()->getCurrentTimeStep());
348  if (ri != nullptr && prob > 0) {
349  // draw only if the edge is closed at this time
350  if (std::find(ri->closed.begin(), ri->closed.end(), myEdge) != ri->closed.end()) {
351  const int noLanes = (int)myFGPositions.size();
352  for (int j = 0; j < noLanes; ++j) {
353  Position pos = myFGPositions[j];
354  double rot = myFGRotations[j];
355  glPushMatrix();
356  glTranslated(pos.x(), pos.y(), 0);
357  glRotated(rot, 0, 0, 1);
358  glTranslated(0, -1.5, 0);
359  int noPoints = 9;
360  if (s.scale > 25) {
361  noPoints = (int)(9.0 + s.scale / 10.0);
362  if (noPoints > 36) {
363  noPoints = 36;
364  }
365  }
366  glTranslated(0, 0, getType());
367  //glScaled(exaggeration, exaggeration, 1);
368  glColor3d(0.7, 0, 0);
369  GLHelper::drawFilledCircle((double) 1.3, noPoints);
370  glTranslated(0, 0, .1);
371  glColor3d(1, 0, 0);
372  GLHelper::drawFilledCircle((double) 1.3, noPoints, 0, prob * 360);
373  glTranslated(0, 0, .1);
374  glColor3d(1, 1, 1);
375  glRotated(-90, 0, 0, 1);
376  glBegin(GL_TRIANGLES);
377  glVertex2d(0 - .3, -1.);
378  glVertex2d(0 - .3, 1.);
379  glVertex2d(0 + .3, 1.);
380  glVertex2d(0 + .3, -1.);
381  glVertex2d(0 - .3, -1.);
382  glVertex2d(0 + .3, 1.);
383  glEnd();
384  glPopMatrix();
385  }
386  }
387  }
388 
389  } else {
390  // draw rerouter symbol onto all lanes
391  for (int i = 0; i < (int)myFGPositions.size(); ++i) {
392  const Position& pos = myFGPositions[i];
393  double rot = myFGRotations[i];
394  glPushMatrix();
395  glTranslated(pos.x(), pos.y(), 0);
396  glRotated(rot, 0, 0, 1);
397  glTranslated(0, 0, getType());
398  glScaled(exaggeration, exaggeration, 1);
399  glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
400 
401  glBegin(GL_TRIANGLES);
402  glColor3d(1, .8f, 0);
403  // base
404  glVertex2d(0 - 1.4, 0);
405  glVertex2d(0 - 1.4, 6);
406  glVertex2d(0 + 1.4, 6);
407  glVertex2d(0 + 1.4, 0);
408  glVertex2d(0 - 1.4, 0);
409  glVertex2d(0 + 1.4, 6);
410  glEnd();
411 
412  // draw "U"
413  GLHelper::drawText("U", Position(0, 2), .1, 3, RGBColor::BLACK, 180);
414 
415  // draw Probability
416  GLHelper::drawText((toString((int)(prob * 100)) + "%").c_str(), Position(0, 4), .1, 0.7, RGBColor::BLACK, 180);
417 
418  glPopMatrix();
419  }
420  }
421  glPopName();
422  }
423 }
424 
425 
426 Boundary
428  Boundary b(myBoundary);
429  b.grow(20);
430  return b;
431 }
432 
433 
434 /****************************************************************************/
435 
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:181
Boundary.h
GUITriggeredRerouter::GUIManip_TriggeredRerouter::MID_OPTION
Definition: GUITriggeredRerouter.h:227
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:32
MSTriggeredRerouter::RerouteInterval
Definition: MSTriggeredRerouter.h:92
ToString.h
GUITriggeredRerouter::myEdgeVisualizations
std::vector< GUITriggeredRerouterEdge * > myEdgeVisualizations
Definition: GUITriggeredRerouter.h:270
GUIParameterTableWindow
A window containing a gl-object's parameter.
Definition: GUIParameterTableWindow.h:63
GUITriggeredRerouter::GUITriggeredRerouterPopupMenu
Definition: GUITriggeredRerouter.h:203
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:73
MSNet.h
GUIParameterTableWindow.h
GUITriggeredRerouter::GUITriggeredRerouterEdge::GUITriggeredRerouterEdge
GUITriggeredRerouterEdge(GUIEdge *edge, GUITriggeredRerouter *parent, bool closed)
Definition: GUITriggeredRerouter.cpp:303
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
GUITriggeredRerouter::GUITriggeredRerouterEdge::myFGPositions
PosCont myFGPositions
The positions in full-geometry mode.
Definition: GUITriggeredRerouter.h:193
MsgHandler.h
GUIGLObjectPopupMenu.h
GUIGlobalSelection.h
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
GUITriggeredRerouter::myBoundary
Boundary myBoundary
The boundary of this rerouter.
Definition: GUITriggeredRerouter.h:268
GUIGlObject::buildShowManipulatorPopupEntry
void buildShowManipulatorPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the manipulator window.
Definition: GUIGlObject.cpp:279
GUITriggeredRerouter::GUIManip_TriggeredRerouter::onCmdChangeOption
long onCmdChangeOption(FXObject *, FXSelector, void *)
Definition: GUITriggeredRerouter.cpp:171
GUIGlObject::getFullName
const std::string & getFullName() const
Definition: GUIGlObject.cpp:138
PositionVector::length
double length() const
Returns the length.
Definition: PositionVector.cpp:476
MSTriggeredRerouter
Reroutes vehicles passing an edge.
Definition: MSTriggeredRerouter.h:62
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
GUITriggeredRerouter
Reroutes vehicles passing an edge One rerouter can be active on multiple edges. To reduce drawing loa...
Definition: GUITriggeredRerouter.h:51
GUIAppEnum.h
GUITriggeredRerouter::GUIManip_TriggeredRerouter::onCmdClose
long onCmdClose(FXObject *, FXSelector, void *)
Definition: GUITriggeredRerouter.cpp:144
SUMORTree
A RT-tree for efficient storing of SUMO's GL-objects.
Definition: SUMORTree.h:69
GLHelper::drawFilledCircle
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
Definition: GLHelper.cpp:348
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
GUITriggeredRerouter::GUITriggeredRerouterEdge::getPopUpMenu
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUITriggeredRerouter.cpp:325
GUITriggeredRerouter::GUITriggeredRerouterEdge
Definition: GUITriggeredRerouter.h:128
GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUITriggeredRerouter.cpp:339
GUITriggeredRerouter::getPopUpMenu
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GUITriggeredRerouter.cpp:254
FXDEFMAP
FXDEFMAP(GUITriggeredRerouter::GUIManip_TriggeredRerouter) GUIManip_TriggeredRerouterMap[]
GUITriggeredRerouter::GUIManip_TriggeredRerouter::MID_CLOSE
Definition: GUITriggeredRerouter.h:228
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
GUITriggeredRerouter::GUITriggeredRerouterPopupMenu::~GUITriggeredRerouterPopupMenu
~GUITriggeredRerouterPopupMenu()
Definition: GUITriggeredRerouter.cpp:201
MSTriggeredRerouter::myEndElement
virtual void myEndElement(int element)
Called when a closing tag occurs.
Definition: MSTriggeredRerouter.cpp:237
GUIGlobals.h
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
GUITriggeredRerouter::GUIManip_TriggeredRerouter::onCmdUserDef
long onCmdUserDef(FXObject *, FXSelector, void *)
Definition: GUITriggeredRerouter.cpp:151
Boundary
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
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
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
GUITriggeredRerouter::GUIManip_TriggeredRerouter::~GUIManip_TriggeredRerouter
virtual ~GUIManip_TriggeredRerouter()
Destructor.
Definition: GUITriggeredRerouter.cpp:140
GUITriggeredRerouter::GUITriggeredRerouterEdge::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUITriggeredRerouter.cpp:332
GUITriggeredRerouter::~GUITriggeredRerouter
~GUITriggeredRerouter()
Destructor.
Definition: GUITriggeredRerouter.cpp:230
GUITriggeredRerouter::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUITriggeredRerouter.cpp:281
GUITriggeredRerouter::GUIManip_TriggeredRerouter::MID_USER_DEF
Definition: GUITriggeredRerouter.h:225
GUITriggeredRerouter::GUITriggeredRerouterEdge::myFGRotations
RotCont myFGRotations
The rotations in full-geometry mode.
Definition: GUITriggeredRerouter.h:196
GUIGlObject
Definition: GUIGlObject.h:66
GUITriggeredRerouter::openManipulator
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Definition: GUITriggeredRerouter.cpp:290
GUITriggeredRerouter::GUITriggeredRerouterEdge::getCenteringBoundary
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GUITriggeredRerouter.cpp:427
GUIGlObject::buildPopupHeader
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
Definition: GUIGlObject.cpp:208
GUITriggeredRerouter::GUIManip_TriggeredRerouter::onUpdUserDef
long onUpdUserDef(FXObject *, FXSelector, void *)
Definition: GUITriggeredRerouter.cpp:161
GLIncludes.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
FunctionBinding.h
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:168
GUIMainWindow
Definition: GUIMainWindow.h:47
Position::y
double y() const
Returns the y-position.
Definition: Position.h:62
GUIEdge
A road/street connecting two junctions (gui-version)
Definition: GUIEdge.h:53
GUIManipulator
Definition: GUIManipulator.h:43
GUITriggeredRerouter::GUITriggeredRerouter
GUITriggeredRerouter(const std::string &id, const MSEdgeVector &edges, double prob, const std::string &aXMLFilename, bool off, SUMOTime timeThreshold, const std::string &vTypes, SUMORTree &rtree)
Constructor.
Definition: GUITriggeredRerouter.cpp:217
GUITriggeredRerouter::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GUITriggeredRerouter.cpp:275
GLO_REROUTER
a Rerouter
Definition: GUIGlObjectTypes.h:86
GUITriggeredRerouter::myEndElement
void myEndElement(int element)
Called when a closing tag occurs.
Definition: GUITriggeredRerouter.cpp:239
MID_MANIP
Open the object's manipulator.
Definition: GUIAppEnum.h:399
GUIEdge.h
MSEdgeVector
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:72
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
GUITriggeredRerouter::getParameterWindow
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GUITriggeredRerouter.cpp:268
MSEdge::getLanes
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Definition: MSEdge.h:165
GUITriggeredRerouter::GUITriggeredRerouterPopupMenu::onCmdOpenManip
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object's manipulator shall be shown.
Definition: GUITriggeredRerouter.cpp:205
SUMORTree::addAdditionalGLObject
void addAdditionalGLObject(GUIGlObject *o)
Adds an additional object (detector/shape/trigger) for visualisation.
Definition: SUMORTree.h:127
GUITriggeredRerouterPopupMenuMap
GUITriggeredRerouterPopupMenuMap[]
Definition: GUITriggeredRerouter.cpp:56
GUITriggeredRerouter::GUITriggeredRerouterEdge::myBoundary
Boundary myBoundary
The boundary of this rerouter.
Definition: GUITriggeredRerouter.h:199
MSTriggeredRerouter::myIntervals
std::vector< RerouteInterval > myIntervals
List of rerouting definition intervals.
Definition: MSTriggeredRerouter.h:218
config.h
GUIVisualizationSettings::addSize
GUIVisualizationSizeSettings addSize
Definition: GUIVisualizationSettings.h:580
GUITriggeredRerouter.h
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:301
Command.h
SUMO_TAG_INTERVAL
an aggreagated-output interval
Definition: SUMOXMLDefinitions.h:160
MSLane.h
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:346
GUITriggeredRerouter::GUIManip_TriggeredRerouter
Definition: GUITriggeredRerouter.h:221
MSTriggeredRerouter::RerouteInterval::closed
MSEdgeVector closed
The list of closed edges.
Definition: MSTriggeredRerouter.h:100
GUITriggeredRerouter::GUITriggeredRerouterPopupMenu::GUITriggeredRerouterPopupMenu
GUITriggeredRerouterPopupMenu()
Definition: GUITriggeredRerouter.h:216
GLO_REROUTER_EDGE
a Rerouter
Definition: GUIGlObjectTypes.h:88
GUITriggeredRerouter::GUITriggeredRerouterEdge::~GUITriggeredRerouterEdge
virtual ~GUITriggeredRerouterEdge()
Definition: GUITriggeredRerouter.cpp:321
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