SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSPerson.cpp
Go to the documentation of this file.
1 /****************************************************************************/
10 // The class for modelling person-movements
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <string>
35 #include <vector>
38 #include <utils/common/ToString.h>
40 #include <microsim/MSNet.h>
41 #include <microsim/MSEdge.h>
42 #include <microsim/MSLane.h>
43 #include "MSPerson.h"
46 #include <microsim/MSVehicle.h>
47 #include "MSPModel.h"
48 
49 #ifdef CHECK_MEMORY_LEAKS
50 #include <foreign/nvwa/debug_new.h>
51 #endif // CHECK_MEMORY_LEAKS
52 
53 // ===========================================================================
54 // method definitions
55 // ===========================================================================
56 /* -------------------------------------------------------------------------
57  * MSPerson::MSPersonStage_Walking - methods
58  * ----------------------------------------------------------------------- */
60  MSStoppingPlace* toBS,
61  SUMOTime walkingTime, SUMOReal speed,
62  SUMOReal departPos, SUMOReal arrivalPos) :
63  MSTransportable::Stage(*route.back(), MOVING_WITHOUT_VEHICLE), myWalkingTime(walkingTime), myRoute(route),
64  myCurrentInternalEdge(0),
65  myDepartPos(departPos), myArrivalPos(arrivalPos), myDestinationBusStop(toBS),
66  mySpeed(speed),
67  myPedestrianState(0) {
69  myDepartPos, myRoute.front()->getLength(), SUMO_ATTR_DEPARTPOS, "person walking from " + myRoute.front()->getID());
71  myArrivalPos, myRoute.back()->getLength(), SUMO_ATTR_ARRIVALPOS, "person walking to " + myRoute.back()->getID());
72  if (walkingTime > 0) {
74  }
75 }
76 
77 
79 }
80 
81 
82 const MSEdge*
84  if (myCurrentInternalEdge != 0) {
85  return myCurrentInternalEdge;
86  } else {
87  return *myRouteStep;
88  }
89 }
90 
91 
92 const MSEdge*
94  return myRoute.front();
95 }
96 
97 
100  return myPedestrianState->getEdgePos(*this, now);
101 }
102 
103 
104 Position
106  return myPedestrianState->getPosition(*this, now);
107 }
108 
109 
110 SUMOReal
112  return myPedestrianState->getAngle(*this, now);
113 }
114 
115 
116 SUMOTime
118  return myPedestrianState->getWaitingTime(*this, now);
119 }
120 
121 
122 SUMOReal
124  return myPedestrianState->getSpeed(*this);
125 }
126 
127 
128 void
130  MSEdge* previousEdge, const SUMOReal at) {
131  previousEdge->removePerson(person);
132  myRouteStep = myRoute.begin();
133  if (myWalkingTime == 0) {
134  if (!person->proceed(net, now)) {
136  };
137  return;
138  }
140  if (at >= 0) {
141  myDepartPos = at;
142  if (myWalkingTime > 0) {
143  mySpeed = computeAverageSpeed();
144  }
145  }
146  myPedestrianState = MSPModel::getModel()->add(dynamic_cast<MSPerson*>(person), this, now);
147  (*myRouteStep)->addPerson(person);
148 }
149 
150 
151 SUMOReal
153  SUMOReal length = 0;
154  for (ConstMSEdgeVector::const_iterator i = myRoute.begin(); i != myRoute.end(); ++i) {
155  length += (*i)->getLength();
156  }
157  length -= myDepartPos;
158  length -= myRoute.back()->getLength() - myArrivalPos;
159  return length / STEPS2TIME(myWalkingTime + 1); // avoid systematic rounding errors
160 }
161 
162 
163 void
165  os.openTag("walk").writeAttr("arrival", time2string(myArrived)).closeTag();
166 }
167 
168 
169 void
171  os.openTag("walk").writeAttr(SUMO_ATTR_EDGES, myRoute);
172  if (myWalkingTime > 0) {
173  os.writeAttr(SUMO_ATTR_DURATION, time2string(myWalkingTime));
174  } else if (mySpeed > 0) {
175  os.writeAttr(SUMO_ATTR_SPEED, mySpeed);
176  }
177  os.closeTag();
178 }
179 
180 
181 void
183  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "departure")
184  .writeAttr("agent", p.getID()).writeAttr("link", myRoute.front()->getID()).closeTag();
185 }
186 
187 
188 void
190  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival")
191  .writeAttr("agent", p.getID()).writeAttr("link", myRoute.back()->getID()).closeTag();
192 }
193 
194 
195 bool
197  ((MSEdge*)getEdge())->removePerson(person);
198  //std::cout << SIMTIME << " moveToNextEdge person=" << person->getID() << "\n";
199  if (myRouteStep == myRoute.end() - 1) {
201  if (myDestinationBusStop != 0) {
202  myDestinationBusStop->addTransportable(person);
203  }
204  if (!person->proceed(MSNet::getInstance(), currentTime)) {
206  }
207  //std::cout << " end walk. myRouteStep=" << (*myRouteStep)->getID() << "\n";
208  return true;
209  } else {
210  if (nextInternal == 0) {
211  ++myRouteStep;
212  myCurrentInternalEdge = 0;
213  } else {
214  myCurrentInternalEdge = nextInternal;
215  }
216  ((MSEdge*) getEdge())->addPerson(person);
217  return false;
218  }
219 }
220 
221 
222 
223 /* -------------------------------------------------------------------------
224  * MSPerson::MSPersonStage_Driving - methods
225  * ----------------------------------------------------------------------- */
227  MSStoppingPlace* toBS, const std::vector<std::string>& lines)
228  : MSTransportable::Stage(destination, DRIVING), myLines(lines.begin(), lines.end()),
229  myVehicle(0), myDestinationBusStop(toBS) {}
230 
231 
233 
234 
235 const MSEdge*
237  if (myVehicle != 0) {
238  return myVehicle->getEdge();
239  }
240  return myWaitingEdge;
241 }
242 
243 
244 const MSEdge*
246  return myWaitingEdge;
247 }
248 
249 
250 SUMOReal
252  if (myVehicle != 0) {
253  // vehicle may already have passed the lane (check whether this is correct)
254  return MIN2(myVehicle->getPositionOnLane(), getEdge()->getLength());
255  }
256  return myWaitingPos;
257 }
258 
259 
260 Position
262  if (myVehicle != 0) {
264  return myVehicle->getEdge()->getLanes()[0]->getShape().positionAtOffset(myVehicle->getPositionOnLane());
265  }
266  return getEdgePosition(myWaitingEdge, myWaitingPos, MSPModel::SIDEWALK_OFFSET);
267 }
268 
269 
270 SUMOReal
272  if (myVehicle != 0) {
273  MSVehicle* veh = dynamic_cast<MSVehicle*>(myVehicle);
274  if (veh != 0) {
275  return veh->getAngle();
276  } else {
277  return 0;
278  }
279  }
280  return getEdgeAngle(myWaitingEdge, myWaitingPos) + 90;
281 }
282 
283 
284 
285 void
287  MSEdge* previousEdge, const SUMOReal at) {
288  myWaitingEdge = previousEdge;
289  myWaitingPos = at;
290  myWaitingSince = now;
291  SUMOVehicle* availableVehicle = net->getVehicleControl().getWaitingVehicle(previousEdge, myLines, myWaitingPos, person->getID());
292  if (availableVehicle != 0 && availableVehicle->getParameter().departProcedure == DEPART_TRIGGERED) {
293  myVehicle = availableVehicle;
294  previousEdge->removePerson(person);
295  myVehicle->addPerson(person);
296  net->getInsertionControl().add(myVehicle);
297  net->getVehicleControl().removeWaiting(previousEdge, myVehicle);
299  } else {
300  net->getPersonControl().addWaiting(previousEdge, person);
301  previousEdge->addPerson(person);
302  }
303 }
304 
305 
306 bool
307 MSPerson::MSPersonStage_Driving::isWaitingFor(const std::string& line) const {
308  return myLines.count(line) > 0;
309 }
310 
311 
312 bool
314  return myVehicle == 0;
315 }
316 
317 
318 SUMOTime
320  return isWaiting4Vehicle() ? now - myWaitingSince : 0;
321 }
322 
323 
324 SUMOReal
326  return myVehicle == 0 ? 0 : myVehicle->getSpeed();
327 }
328 
329 
330 std::string
332  return isWaiting4Vehicle() ? "waiting for " + joinToString(myLines, ",") : "driving";
333 }
334 
335 
336 void
338  os.openTag("ride").writeAttr("depart", time2string(myDeparted)).writeAttr("arrival", time2string(myArrived)).closeTag();
339 }
340 
341 
342 void
345  os.writeAttr(SUMO_ATTR_LINES, myLines).closeTag();
346 }
347 
348 
349 void
351  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag();
352 }
353 
354 
355 void
357  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "arrival").writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag();
358 }
359 
360 
361 
362 /* -------------------------------------------------------------------------
363  * MSPerson::MSPersonStage_Waiting - methods
364  * ----------------------------------------------------------------------- */
366  SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType) :
367  MSTransportable::Stage(destination, WAITING),
368  myWaitingDuration(duration),
369  myWaitingUntil(until),
370  myActType(actType),
371  myStartPos(pos) {
374 }
375 
376 
378 
379 
380 const MSEdge*
382  return &myDestination;
383 }
384 
385 
386 const MSEdge*
388  return &myDestination;
389 }
390 
391 
392 SUMOReal
394  return myStartPos;
395 }
396 
397 
398 SUMOTime
400  return myWaitingUntil;
401 }
402 
403 
404 Position
406  return getEdgePosition(&myDestination, myStartPos, MSPModel::SIDEWALK_OFFSET);
407 }
408 
409 
410 SUMOReal
412  return getEdgeAngle(&myDestination, myStartPos) - 90;
413 }
414 
415 
416 void
418  MSEdge* previousEdge, const SUMOReal /* at */) {
419  previousEdge->addPerson(person);
420  myWaitingStart = now;
421  const SUMOTime until = MAX3(now, now + myWaitingDuration, myWaitingUntil);
422  net->getPersonControl().setWaitEnd(until, person);
423 }
424 
425 
426 void
428  os.openTag("stop").writeAttr("arrival", time2string(myArrived)).closeTag();
429 }
430 
431 
432 void
435  if (myWaitingDuration >= 0) {
436  os.writeAttr(SUMO_ATTR_DURATION, time2string(myWaitingDuration));
437  }
438  if (myWaitingUntil >= 0) {
439  os.writeAttr(SUMO_ATTR_UNTIL, time2string(myWaitingUntil));
440  }
441  os.closeTag();
442 }
443 
444 
445 void
447  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actstart " + myActType)
448  .writeAttr("agent", p.getID()).writeAttr("link", getEdge()->getID()).closeTag();
449 }
450 
451 
452 void
454  os.openTag("event").writeAttr("time", time2string(t)).writeAttr("type", "actend " + myActType).writeAttr("agent", p.getID())
455  .writeAttr("link", getEdge()->getID()).closeTag();
456 }
457 
458 
459 SUMOTime
461  return now - myWaitingStart;
462 }
463 
464 
465 SUMOReal
467  return 0;
468 }
469 
470 
471 
472 
473 /* -------------------------------------------------------------------------
474  * MSPerson - methods
475  * ----------------------------------------------------------------------- */
477  : MSTransportable(pars, vtype, plan) {
478 }
479 
480 
482 }
483 
484 
485 bool
487  MSEdge* arrivedAt = (MSEdge*)(*myStep)->getEdge();
488  SUMOReal atPos = (*myStep)->getEdgePos(time);
489  //MSPersonPlan::iterator prior = myStep;
490  (*myStep)->setArrived(time);
491  /*
492  if(myWriteEvents) {
493  (*myStep)->endEventOutput(*this, time, OutputDevice::getDeviceByOption("person-event-output"));
494  }
495  */
496  myStep++;
497  if (myStep != myPlan->end()) {
498  (*myStep)->proceed(net, this, time, arrivedAt, atPos);
499  /*
500  if(myWriteEvents) {
501  (*myStep)->beginEventOutput(*this, time, OutputDevice::getDeviceByOption("person-event-output"));
502  }
503  */
504  return true;
505  } else {
506  arrivedAt->removePerson(this);
507  return false;
508  }
509 }
510 
511 
512 void
514  MSTransportable::MSTransportablePlan::const_iterator i = myPlan->begin();
515  if ((*i)->getStageType() == WAITING && getDesiredDepart() == static_cast<MSPersonStage_Waiting*>(*i)->getUntil()) {
516  ++i;
517  }
518  for (; i != myPlan->end(); ++i) {
519  (*i)->routeOutput(os);
520  }
521 }
522 
523 const std::string&
526  MSPersonStage_Walking* walkingStage = dynamic_cast<MSPersonStage_Walking*>(*myStep);
527  assert(walkingStage != 0);
528  const MSEdge* nextEdge = walkingStage->getPedestrianState()->getNextEdge(*walkingStage);
529  if (nextEdge != 0) {
530  return nextEdge->getID();
531  }
532  }
534 }
535 /****************************************************************************/
536 
The departure is person triggered.
virtual const MSEdge * getNextEdge(const MSPerson::MSPersonStage_Walking &stage) const =0
return the list of internal edges if the pedestrian is on an intersection
SUMOTime getUntil() const
Definition: MSPerson.cpp:399
SUMOReal getAngle(SUMOTime now) const
returns the angle of the transportable
Definition: MSPerson.cpp:411
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:257
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:245
virtual ~MSPerson()
destructor
Definition: MSPerson.cpp:481
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
Definition: MSPerson.cpp:460
virtual void erase(MSTransportable *person)
removes a single person
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:446
SUMOReal getSpeed() const
the speed of the transportable
Definition: MSPerson.cpp:466
A lane area vehicles can halt at.
bool isWaiting4Vehicle() const
Whether the container waits for a vehicle.
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:236
Position getPosition(SUMOTime now) const
returns the position of the transportable
Definition: MSPerson.cpp:105
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:427
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:61
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
Definition: MSPerson.cpp:313
SUMOReal getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:251
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:162
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:170
const std::string & getID() const
returns the id of the transportable
SUMOVehicle * getWaitingVehicle(const MSEdge *const edge, const std::set< std::string > &lines, const SUMOReal position, const std::string ridingID)
void removeWaiting(const MSEdge *const edge, SUMOVehicle *vehicle)
Removes a vehicle from the list of waiting vehicles to a given edge.
void setWalking(MSTransportable *p)
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:79
virtual bool proceed(MSNet *net, SUMOTime time)=0
MSTransportablePlan::iterator myStep
the iterator over the route
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:182
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:337
T MAX3(T a, T b, T c)
Definition: StdDefs.h:88
The simulated network and simulation perfomer.
Definition: MSNet.h:94
The car-following model and parameter.
Definition: MSVehicleType.h:74
SUMOReal getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:99
void setWaitEnd(SUMOTime time, MSTransportable *person)
sets the arrival time for a waiting or walking person
SUMOTime getDesiredDepart() const
Returns the desired departure time.
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:83
virtual void proceed(MSNet *net, MSTransportable *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
proceeds to the next step
Definition: MSPerson.cpp:417
virtual PedestrianState * add(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)=0
register the given person as a pedestrian
static SUMOReal interpretEdgePos(SUMOReal pos, SUMOReal maximumValue, SumoXMLAttr attr, const std::string &id)
Interprets negative edge positions and fits them onto a given edge.
ConstMSEdgeVector myRoute
The route of the person.
Definition: MSPerson.h:177
const std::string & getID() const
Returns the id.
Definition: Named.h:60
A road/street connecting two junctions.
Definition: MSEdge.h:81
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a container
void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:513
SUMOReal getLength() const
return the length of the edge
Definition: MSEdge.h:535
virtual void removePerson(MSTransportable *p) const
Definition: MSEdge.h:558
bool moveToNextEdge(MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0)
move forward and return whether the person arrived
Definition: MSPerson.cpp:196
the edges of a route
SUMOReal getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:393
const MSEdge * getEdge() const
Returns the current edge.
PedestrianState * getPedestrianState() const
Definition: MSPerson.h:159
virtual void addPerson(MSTransportable *p) const
Definition: MSEdge.h:554
Representation of a vehicle.
Definition: SUMOVehicle.h:65
static MSPModel * getModel()
Definition: MSPModel.cpp:65
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
SUMOReal getAngle(SUMOTime now) const
returns the angle of the transportable
Definition: MSPerson.cpp:271
SUMOReal getSpeed() const
the speed of the transportable
Definition: MSPerson.cpp:325
SUMOReal computeAverageSpeed() const
Definition: MSPerson.cpp:152
StageType getCurrentStageType() const
the current stage type of the container
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:304
Position getPosition(SUMOTime now) const
returns the position of the transportable
Definition: MSPerson.cpp:405
#define STEPS2TIME(x)
Definition: SUMOTime.h:65
DepartDefinition departProcedure
Information how the vehicle shall choose the depart time.
T MIN2(T a, T b)
Definition: StdDefs.h:68
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:343
virtual void proceed(MSNet *net, MSTransportable *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
proceeds to the next step
Definition: MSPerson.cpp:286
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:387
MSPersonStage_Driving(const MSEdge &destination, MSStoppingPlace *toBS, const std::vector< std::string > &lines)
constructor
Definition: MSPerson.cpp:226
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
Definition: MSPerson.cpp:117
bool isWaitingFor(const std::string &line) const
Whether the person waits for a vehicle of the line specified.
Definition: MSPerson.cpp:307
MSPersonStage_Waiting(const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType)
constructor
Definition: MSPerson.cpp:365
void unregisterOneWaitingForPerson()
decreases the count of vehicles waiting for a person to allow recogniztion of person related deadlock...
const MSEdge & getDestination() const
Returns the current destination.
void unsetWalking(MSTransportable *p)
static std::string emptyString
An empty string.
Definition: StringUtils.h:84
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:453
SUMOReal getAngle(SUMOTime now) const
returns the angle of the transportable
Definition: MSPerson.cpp:111
const MSEdge * getFromEdge() const
Returns the departure edge.
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:189
void addWaiting(const MSEdge *edge, MSTransportable *person)
adds a person to the list of persons waiting for a vehicle on the specified edge
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:381
static const SUMOReal SIDEWALK_OFFSET
the offset for computing person positions when walking on edges without a sidewalk ...
Definition: MSPModel.h:84
Structure representing possible vehicle parameter.
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:433
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:350
virtual MSPersonControl & getPersonControl()
Returns the person control.
Definition: MSNet.cpp:685
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:345
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle&#39;s parameter (including departure definition)
~MSPersonStage_Walking()
destructor
Definition: MSPerson.cpp:78
const std::string & getNextEdge() const
return the list of internal edges if this person is walking and the pedestrian model allows it ...
Definition: MSPerson.cpp:524
Position getPosition(SUMOTime now) const
returns the position of the transportable
Definition: MSPerson.cpp:261
std::string getStageDescription() const
return string representation of the current stage
Definition: MSPerson.cpp:331
bool proceed(MSNet *net, SUMOTime time)
Definition: MSPerson.cpp:486
MSPersonStage_Walking(const ConstMSEdgeVector &route, MSStoppingPlace *toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos)
constructor
Definition: MSPerson.cpp:59
SUMOTime getWaitingTime(SUMOTime now) const
time spent waiting for a ride
Definition: MSPerson.cpp:319
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:93
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=OUTPUT_ACCURACY)
Definition: ToString.h:159
MSPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
constructor
Definition: MSPerson.cpp:476
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:356
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
bool closeTag()
Closes the most recently opened tag.
#define SUMOReal
Definition: config.h:215
MSTransportablePlan * myPlan
the plan of the container
SUMOReal myDepartPos
A vector of computed times an edge is reached.
Definition: MSPerson.h:188
SUMOReal getSpeed() const
the speed of the transportable
Definition: MSPerson.cpp:123
const MSEdge & myDestination
the next edge to reach by getting transported
void add(SUMOVehicle *veh)
Adds a single vehicle for departure.
virtual void proceed(MSNet *net, MSTransportable *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
proceeds to the next step
Definition: MSPerson.cpp:129
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:164
SUMOReal getAngle() const
Returns the vehicle&#39;s direction in degrees.
Definition: MSVehicle.cpp:640