SUMO - Simulation of Urban MObility
MSTransportable.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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // The common superclass for modelling transportable objects like persons and containers
20 /****************************************************************************/
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <utils/geom/GeomHelper.h>
34 #include "MSEdge.h"
35 #include "MSLane.h"
36 #include "MSNet.h"
38 #include "MSVehicleControl.h"
39 #include "MSTransportableControl.h"
40 #include "MSTransportable.h"
41 
42 /* -------------------------------------------------------------------------
43 * static member definitions
44 * ----------------------------------------------------------------------- */
45 const double MSTransportable::ROADSIDE_OFFSET(3);
46 
47 
48 // ===========================================================================
49 // method definitions
50 // ===========================================================================
51 /* -------------------------------------------------------------------------
52  * MSTransportable::Stage - methods
53  * ----------------------------------------------------------------------- */
54 MSTransportable::Stage::Stage(const MSEdge& destination, MSStoppingPlace* toStop, const double arrivalPos, StageType type)
55  : myDestination(destination), myDestinationStop(toStop), myArrivalPos(arrivalPos), myDeparted(-1), myArrived(-1), myType(type) {}
56 
58 
59 const MSEdge&
61  return myDestination;
62 }
63 
64 
65 void
67  if (myDeparted < 0) {
68  myDeparted = now;
69  }
70 }
71 
72 void
74  myArrived = now;
75 }
76 
77 bool
78 MSTransportable::Stage::isWaitingFor(const std::string& /*line*/) const {
79  return false;
80 }
81 
83 MSTransportable::Stage::getEdgePosition(const MSEdge* e, double at, double offset) const {
84  return getLanePosition(e->getLanes()[0], at, offset);
85 }
86 
88 MSTransportable::Stage::getLanePosition(const MSLane* lane, double at, double offset) const {
89  return lane->getShape().positionAtOffset(lane->interpolateLanePosToGeometryPos(at), offset);
90 }
91 
92 double
93 MSTransportable::Stage::getEdgeAngle(const MSEdge* e, double at) const {
94  return e->getLanes()[0]->getShape().rotationAtOffset(at);
95 }
96 
97 
98 /* -------------------------------------------------------------------------
99 * MSTransportable::Stage_Waiting - methods
100 * ----------------------------------------------------------------------- */
102  SUMOTime duration, SUMOTime until, double pos, const std::string& actType,
103  const bool initial) :
104  MSTransportable::Stage(destination, 0, SUMOVehicleParameter::interpretEdgePos(
105  pos, destination.getLength(), SUMO_ATTR_DEPARTPOS, "stopping at " + destination.getID()),
106  initial ? WAITING_FOR_DEPART : WAITING),
107  myWaitingDuration(duration),
108  myWaitingUntil(until),
109  myActType(actType) {
110 }
111 
112 
114 
115 
116 const MSEdge*
118  return &myDestination;
119 }
120 
121 
122 const MSEdge*
124  return &myDestination;
125 }
126 
127 
128 double
130  return myArrivalPos;
131 }
132 
133 
134 SUMOTime
136  return myWaitingUntil;
137 }
138 
139 
140 Position
143  ROADSIDE_OFFSET * (MSNet::getInstance()->lefthand() ? -1 : 1));
144 }
145 
146 
147 double
149  return getEdgeAngle(&myDestination, myArrivalPos) + M_PI / 2 * (MSNet::getInstance()->lefthand() ? -1 : 1);
150 }
151 
152 
153 void
155  myDeparted = now;
156  const SUMOTime until = MAX3(now, now + myWaitingDuration, myWaitingUntil);
157  if (dynamic_cast<MSPerson*>(transportable) != 0) {
158  previous->getEdge()->addPerson(transportable);
159  net->getPersonControl().setWaitEnd(until, transportable);
160  } else {
161  previous->getEdge()->addContainer(transportable);
162  net->getContainerControl().setWaitEnd(until, transportable);
163  }
164 }
165 
166 
167 void
169  if (myType != WAITING_FOR_DEPART) {
170  os.openTag("stop");
171  os.writeAttr("duration", time2string(myArrived - myDeparted));
172  os.writeAttr("arrival", time2string(myArrived));
173  os.writeAttr("arrivalPos", toString(myArrivalPos));
174  os.writeAttr("actType", toString(myActType));
175  os.closeTag();
176  }
177 }
178 
179 
180 void
182  if (myType != WAITING_FOR_DEPART) {
184  if (myWaitingDuration >= 0) {
186  }
187  if (myWaitingUntil >= 0) {
189  }
190  os.closeTag();
191  }
192 }
193 
194 
195 void
197  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actstart " + myActType)
198  .writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag();
199 }
200 
201 
202 void
204  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actend " + myActType).writeAttr("agent", p.getID())
205  .writeAttr("link", getEdge()->getID()).closeTag();
206 }
207 
208 
209 SUMOTime
211  return now - myDeparted;
212 }
213 
214 
215 double
217  return 0;
218 }
219 
220 
223  ConstMSEdgeVector result;
224  result.push_back(&getDestination());
225  return result;
226 }
227 
228 void
230  MSTransportableControl& tc = (dynamic_cast<MSPerson*>(t) != 0 ?
233  tc.abortWaiting(t);
234 }
235 
236 
237 /* -------------------------------------------------------------------------
238 * MSTransportable::Stage_Driving - methods
239 * ----------------------------------------------------------------------- */
241  MSStoppingPlace* toStop, const double arrivalPos, const std::vector<std::string>& lines) :
242  MSTransportable::Stage(destination, toStop, arrivalPos, DRIVING),
243  myLines(lines.begin(), lines.end()),
244  myVehicle(0),
245  myVehicleID("NULL"),
246  myStopWaitPos(Position::INVALID) {}
247 
248 
250 
251 const MSEdge*
253  if (myVehicle != 0) {
254  return &myVehicle->getLane()->getEdge();
255  }
256  return myWaitingEdge;
257 }
258 
259 
260 const MSEdge*
262  return myWaitingEdge;
263 }
264 
265 
266 double
268  if (isWaiting4Vehicle()) {
269  return myWaitingPos;
270  }
271  // vehicle may already have passed the lane (check whether this is correct)
273 }
274 
275 
276 Position
278  if (isWaiting4Vehicle()) {
280  return myStopWaitPos;
281  }
283  ROADSIDE_OFFSET * (MSNet::getInstance()->lefthand() ? -1 : 1));
284  }
285  return myVehicle->getPosition();
286 }
287 
288 
289 double
291  if (!isWaiting4Vehicle()) {
292  MSVehicle* veh = dynamic_cast<MSVehicle*>(myVehicle);
293  if (veh != 0) {
294  return veh->getAngle();
295  } else {
296  return 0;
297  }
298  }
299  return getEdgeAngle(myWaitingEdge, myWaitingPos) + M_PI / 2. * (MSNet::getInstance()->lefthand() ? -1 : 1);
300 }
301 
302 
303 bool
304 MSTransportable::Stage_Driving::isWaitingFor(const std::string& line) const {
305  return myLines.count(line) > 0;
306 }
307 
308 
309 bool
311  return myVehicle == 0;
312 }
313 
314 
315 SUMOTime
317  return isWaiting4Vehicle() ? now - myDeparted : 0;
318 }
319 
320 
321 double
323  return isWaiting4Vehicle() ? 0 : myVehicle->getSpeed();
324 }
325 
326 
329  ConstMSEdgeVector result;
330  result.push_back(getFromEdge());
331  result.push_back(&getDestination());
332  return result;
333 }
334 
335 void
338  if (myVehicle != 0) {
339  // distance was previously set to driven distance upon embarking
343  } else {
344  myVehicleDistance = -1;
345  }
346 }
347 
348 void
350  myVehicle = v;
351  myVehicleID = v->getID();
353  myVehicleVClass = v->getVClass();
357 }
358 
359 
360 void
362  if (myVehicle != 0) {
363  // jumping out of a moving vehicle!
364  dynamic_cast<MSVehicle*>(myVehicle)->removeTransportable(t);
365  }
366 }
367 
368 
369 std::string
371  return isWaiting4Vehicle() ? ("waiting for " + joinToString(myLines, ",")
372  + " at " + (myDestinationStop == 0
373  ? ("edge '" + myWaitingEdge->getID() + "'")
374  : ("busStop '" + myDestinationStop->getID() + "'"))
375  ) : "";
376 }
377 
378 
379 void
381  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag();
382 }
383 
384 
385 void
387  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag();
388 }
389 
390 
391 
392 /* -------------------------------------------------------------------------
393  * MSTransportable - methods
394  * ----------------------------------------------------------------------- */
396  : myParameter(pars), myVType(vtype), myPlan(plan) {
397  myStep = myPlan->begin();
398 }
399 
401  if (myPlan != 0) {
402  for (MSTransportablePlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) {
403  delete *i;
404  }
405  delete myPlan;
406  myPlan = 0;
407  }
408  delete myParameter;
409  if (myVType->isVehicleSpecific()) {
411  }
412 }
413 
414 const std::string&
416  return myParameter->id;
417 }
418 
419 SUMOTime
421  return myParameter->depart;
422 }
423 
424 void
426  (*myStep)->setDeparted(now);
427 }
428 
429 double
431  return (*myStep)->getEdgePos(MSNet::getInstance()->getCurrentTimeStep());
432 }
433 
434 Position
436  return (*myStep)->getPosition(MSNet::getInstance()->getCurrentTimeStep());
437 }
438 
439 double
441  return (*myStep)->getAngle(MSNet::getInstance()->getCurrentTimeStep());
442 }
443 
444 double
446  return STEPS2TIME((*myStep)->getWaitingTime(MSNet::getInstance()->getCurrentTimeStep()));
447 }
448 
449 double
451  return (*myStep)->getSpeed();
452 }
453 
454 
455 int
457  return (int)(myPlan->end() - myStep);
458 }
459 
460 int
462  return (int)myPlan->size();
463 }
464 
465 void
467  // myStep is invalidated upon modifying myPlan
468  const int stepIndex = (int)(myStep - myPlan->begin());
469  if (next < 0) {
470  myPlan->push_back(stage);
471  } else {
472  if (stepIndex + next > (int)myPlan->size()) {
473  throw ProcessError("invalid index '" + toString(next) + "' for inserting new stage into plan of '" + getID() + "'");
474  }
475  myPlan->insert(myPlan->begin() + stepIndex + next, stage);
476  }
477  myStep = myPlan->begin() + stepIndex;
478 }
479 
480 
481 void
483  assert(myStep + next < myPlan->end());
484  assert(next >= 0);
485  if (next > 0) {
486  // myStep is invalidated upon modifying myPlan
487  int stepIndex = (int)(myStep - myPlan->begin());
488  delete *(myStep + next);
489  myPlan->erase(myStep + next);
490  myStep = myPlan->begin() + stepIndex;
491  } else {
492  if (myStep + 1 == myPlan->end()) {
493  // stay in the simulation until the start of simStep to allow appending new stages (at the correct position)
494  appendStage(new Stage_Waiting(*getEdge(), 0, 0, getEdgePos(), "last stage removed", false));
495  }
496  (*myStep)->abort(this);
497  proceed(MSNet::getInstance(), MSNet::getInstance()->getCurrentTimeStep());
498  }
499 }
500 
501 
502 void
504  for (MSTransportablePlan::const_iterator i = myPlan->begin(); i != myPlan->end(); ++i) {
505  (*i)->setSpeed(speed);
506  }
507 }
508 
509 
510 void
512  if (myVType->isVehicleSpecific()) {
514  }
515  myVType = type;
516 }
517 
518 
521  if (myVType->isVehicleSpecific()) {
522  return *myVType;
523  }
524  MSVehicleType* type = myVType->buildSingularType(myVType->getID() + "@" + getID());
525  replaceVehicleType(type);
526  return *type;
527 }
528 
529 
532  PositionVector centerLine;
533  const Position p = getPosition();
534  const double angle = getAngle();
535  const double length = getVehicleType().getLength();
536  const Position back = p + Position(-cos(angle) * length, -sin(angle) * length);
537  centerLine.push_back(p);
538  centerLine.push_back(back);
539  centerLine.move2side(0.5 * getVehicleType().getWidth());
540  PositionVector result = centerLine;
541  centerLine.move2side(-getVehicleType().getWidth());
542  result.append(centerLine.reverse(), POSITION_EPS);
543  //std::cout << " transp=" << getID() << " p=" << p << " angle=" << GeomHelper::naviDegree(angle) << " back=" << back << " result=" << result << "\n";
544  return result;
545 }
546 
547 /****************************************************************************/
void setArrived(SUMOTime now)
marks arrival time and records driven distance
void abortWaiting(MSTransportable *t)
aborts waiting stage of transportable
virtual void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)
proceeds to the next step
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:260
virtual void setArrived(SUMOTime now)
logs end of the step
void abort(MSTransportable *)
abort this stage (TraCI)
MSEdge & getEdge() const
Returns the lane&#39;s edge.
Definition: MSLane.h:607
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
std::string getWaitingDescription() const
Return where the person waits and for what.
std::string myActType
The type of activity.
double getAngle(SUMOTime now) const
returns the angle of the transportable
double getAngle() const
Returns the vehicle&#39;s direction in radians.
Definition: MSVehicle.h:684
void append(const PositionVector &v, double sameThreshold=2.0)
const MSEdge * getEdge() const
Returns the current edge.
virtual const MSRoute & getRoute() const =0
Returns the current route.
A lane area vehicles can halt at.
void setSpeed(double speed)
sets the walking speed (ignored in other stages)
virtual double getEdgePos() const
Return the position on the edge.
PositionVector getBoundingBox() const
return the bounding box of the person
virtual bool isWaitingFor(const std::string &line) const
Whether the transportable waits for a vehicle of the line specified.
virtual const MSEdge * getEdge() const =0
Returns the current edge.
void abort(MSTransportable *)
abort this stage (TraCI)
const MSEdge * getEdge() const
Returns the current edge.
#define INVALID
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
double getDistanceBetween(double fromPos, double toPos, const MSEdge *fromEdge, const MSEdge *toEdge, bool includeInternal=true) const
Compute the distance between 2 given edges on this route, including the length of internal lanes...
Definition: MSRoute.cpp:280
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:59
void setWaitEnd(SUMOTime time, MSTransportable *transportable)
sets the arrival time for a waiting transportable
const MSEdge * getFromEdge() const
ConstMSEdgeVector getEdges() const
the edges of the current stage
virtual MSLane * getLane() const =0
Returns the lane the vehicle is on.
Stage_Waiting(const MSEdge &destination, SUMOTime duration, SUMOTime until, double pos, const std::string &actType, const bool initial)
constructor
const std::vector< MSLane * > & getLanes() const
Returns this edge&#39;s lanes.
Definition: MSEdge.h:167
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:167
const PositionVector & getShape() const
Returns this lane&#39;s shape.
Definition: MSLane.h:439
const std::set< std::string > myLines
the lines to choose from
double getSpeed() const
the speed of the transportable
PositionVector reverse() const
reverse position vector
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
virtual bool proceed(MSNet *net, SUMOTime time)=0
const std::string & getID() const
Returns the id.
Definition: Named.h:65
Position getLanePosition(const MSLane *lane, double at, double offset) const
get position on lane at length at with orthogonal offset
virtual double getSpeed() const
the current speed of the transportable
MSTransportablePlan::iterator myStep
the iterator over the route
double getEdgePos(SUMOTime now) const
double getLength() const
return the length of the edge
Definition: MSEdge.h:569
const MSEdge * getFromEdge() const
int getNumRemainingStages() const
Return the number of remaining stages (including the current)
T MAX3(T a, T b, T c)
Definition: StdDefs.h:87
double getEdgePos(SUMOTime now) const
const MSEdge * getEdge() const
Returns the current edge.
The simulated network and simulation perfomer.
Definition: MSNet.h:90
The car-following model and parameter.
Definition: MSVehicleType.h:72
bool isVehicleSpecific() const
Returns whether this type belongs to a single vehicle only (was modified)
virtual MSTransportableControl & getContainerControl()
Returns the container control.
Definition: MSNet.cpp:776
const SUMOVehicleParameter * myParameter
the plan of the transportable
void removeStage(int next)
removes the nth next stage
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
MSVehicleType & getSingularType()
Replaces the current vehicle type with a new one used by this vehicle only.
A road/street connecting two junctions.
Definition: MSEdge.h:80
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
virtual SUMOVehicleClass getVClass() const =0
Returns the vehicle&#39;s access class.
MSVehicleType * myVType
This transportable&#39;s type. (mainly used for drawing related information Note sure if it is really nec...
SUMOTime myArrived
the time at which this stage ended
double getSpeed() const
the speed of the transportable
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:55
SUMOTime myDeparted
the time at which this stage started
void setDeparted(SUMOTime now)
logs depart time of the current stage
Representation of a vehicle.
Definition: SUMOVehicle.h:66
MSStoppingPlace *const myDestinationStop
the stop to reach by getting transported (if any)
MSVehicleType * buildSingularType(const std::string &id) const
Duplicates the microsim vehicle type giving the newly created type the given id, marking it as vehicl...
virtual MSTransportableControl & getPersonControl()
Returns the person control.
Definition: MSNet.cpp:768
ConstMSEdgeVector getEdges() const
the edges of the current stage
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:45
SUMOTime getDesiredDepart() const
Returns the desired departure time.
A list of positions.
Position getPosition(SUMOTime now) const
returns the position of the transportable
virtual double getAngle() const
return the current angle of the transportable
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.h:595
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:306
void removeVType(const MSVehicleType *vehType)
virtual ~MSTransportable()
destructor
SUMOTime getWaitingTime(SUMOTime now) const
time spent waiting for a ride
SUMOTime depart
The vehicle&#39;s departure time.
#define STEPS2TIME(x)
Definition: SUMOTime.h:64
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:253
T MIN2(T a, T b)
Definition: StdDefs.h:67
std::string myVehicleID
cached vehicle data for output after the vehicle has been removed
#define POSITION_EPS
Definition: config.h:175
const std::string & getID() const
returns the id of the transportable
virtual ~Stage_Driving()
destructor
SUMOTime myWaitingUntil
the time until the person is waiting
SUMOVehicle * myVehicle
The taken vehicle.
Position getPosition(SUMOTime now) const
returns the position of the transportable
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Stage_Driving(const MSEdge &destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines)
constructor
bool lefthand() const
return whether the network was built for lefthand traffic
Definition: MSNet.h:597
void move2side(double amount)
move position vector to side using certain ammount
std::string line
The vehicle&#39;s line (mainly for public transport)
Position getEdgePosition(const MSEdge *e, double at, double offset) const
get position on edge e at length at with orthogonal offset
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
virtual void tripInfoOutput(OutputDevice &os, MSTransportable *transportable) const
Called on writing tripinfo output.
void appendStage(Stage *stage, int next=-1)
Appends the given stage to the current plan.
virtual double getDepartPos() const =0
Returns this vehicle&#39;s real departure position.
double getAngle(SUMOTime now) const
returns the angle of the transportable
StageType myType
The type of this stage.
Structure representing possible vehicle parameter.
MSTransportable(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportablePlan *plan)
constructor
virtual void addContainer(MSTransportable *container) const
Add a container to myContainers.
Definition: MSEdge.h:607
#define M_PI
Definition: odrSpiral.cpp:40
virtual Position getPosition() const
Return the Network coordinate of the transportable.
virtual double getPositionOnLane() const =0
Get the vehicle&#39;s position along the lane.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle&#39;s parameter (including departure definition)
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
double interpolateLanePosToGeometryPos(double lanePos) const
Definition: MSLane.h:455
const std::string & getID() const
Returns the name of the vehicle type.
static const double ROADSIDE_OFFSET
the offset for computing positions when standing at an edge
void replaceVehicleType(MSVehicleType *type)
Replaces the current vehicle type by the one given.
virtual Position getPosition(const double offset=0) const =0
Return current position (x/y, cartesian)
double getLength() const
Get vehicle&#39;s length [m].
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
const MSEdge & getDestination() const
returns the destination edge
double getEdgeAngle(const MSEdge *e, double at) const
get angle of the edge at a certain position
const MSVehicleType & getVehicleType() const
virtual double getWaitingSeconds() const
the time this transportable spent waiting in seconds
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
void setDeparted(SUMOTime now)
logs end of the step
bool closeTag()
Closes the most recently opened tag.
MSTransportablePlan * myPlan
the plan of the transportable
long long int SUMOTime
Definition: TraCIDefs.h:51
virtual ~Stage_Waiting()
destructor
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
Definition: MSRoute.cpp:73
virtual ~Stage()
destructor
Stage(const MSEdge &destination, MSStoppingPlace *toStop, const double arrivalPos, StageType type)
constructor
virtual const ConstMSEdgeVector::const_iterator & getCurrentRouteEdge() const =0
Returns an iterator pointing to the current edge in this vehicles route.
bool isWaitingFor(const std::string &line) const
Whether the person waits for a vehicle of the line specified.
const MSEdge & myDestination
the next edge to reach by getting transported
virtual double getSpeed() const =0
Returns the vehicle&#39;s current speed.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
virtual const std::string & getID() const =0
Get the vehicle&#39;s ID.
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:236
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
SUMOTime myWaitingDuration
the time the person is waiting
int getNumStages() const
Return the total number stages in this persons plan.
std::string id
The vehicle&#39;s id.
static const Position INVALID
used to indicate that a position is valid
Definition: Position.h:277
double myArrivalPos
the position at which we want to arrive