SUMO - Simulation of Urban MObility
MSPerson.h
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-sim.org/
13 // Copyright (C) 2001-2014 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 #ifndef MSPerson_h
24 #define MSPerson_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <string>
37 #include <vector>
38 #include <set>
39 #include <utils/common/SUMOTime.h>
40 #include <utils/common/Command.h>
41 #include <utils/geom/Position.h>
43 
44 
45 // ===========================================================================
46 // class declarations
47 // ===========================================================================
48 class MSNet;
49 class MSEdge;
50 class MSLane;
51 class OutputDevice;
53 class MSBusStop;
54 class SUMOVehicle;
55 class MSVehicleType;
56 class MSPModel;
58 
59 typedef std::vector<const MSEdge*> MSEdgeVector;
60 
61 
62 // ===========================================================================
63 // class definitions
64 // ===========================================================================
70 class MSPerson {
71 public:
72  enum StageType {
73  WALKING = 0,
74  DRIVING = 1,
75  WAITING = 2
76  };
77 
78 
83  class MSPersonStage {
84  public:
86  MSPersonStage(const MSEdge& destination, StageType type);
87 
89  virtual ~MSPersonStage();
90 
92  const MSEdge& getDestination() const;
93 
95  virtual const MSEdge* getEdge() const = 0;
96  virtual const MSEdge* getFromEdge() const = 0;
97  virtual SUMOReal getEdgePos(SUMOTime now) const = 0;
98 
100  virtual Position getPosition(SUMOTime now) const = 0;
101  virtual SUMOReal getAngle(SUMOTime now) const = 0;
102 
105  return myType;
106  }
107 
109  virtual std::string getStageDescription() const = 0;
110 
112  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at) = 0;
113 
115  void setDeparted(SUMOTime now);
116 
118  void setArrived(SUMOTime now);
119 
121  virtual bool isWaitingFor(const std::string& line) const;
122 
124  virtual bool isWaiting4Vehicle() const {
125  return false;
126  }
127 
129  virtual SUMOTime getWaitingTime(SUMOTime now) const = 0;
130 
132  virtual SUMOReal getSpeed() const = 0;
133 
135  Position getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const;
136 
138  Position getLanePosition(const MSLane* lane, SUMOReal at, SUMOReal offset) const;
139 
140  SUMOReal getEdgeAngle(const MSEdge* e, SUMOReal at) const;
141 
146  virtual void tripInfoOutput(OutputDevice& os) const = 0;
147 
152  virtual void routeOutput(OutputDevice& os) const = 0;
153 
158  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0;
159 
164  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0;
165 
166 
167  protected:
170 
173 
176 
179 
180  private:
183 
186 
187  };
188 
195  friend class MSPModel;
196  friend class GUIPerson; // debugging
197 
198  public:
200  MSPersonStage_Walking(const std::vector<const MSEdge*>& route, MSBusStop* toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos);
201 
204 
206  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at);
207 
209  const MSEdge* getEdge() const;
210  const MSEdge* getFromEdge() const;
211  SUMOReal getEdgePos(SUMOTime now) const;
212 
214  Position getPosition(SUMOTime now) const;
215 
216  SUMOReal getAngle(SUMOTime now) const;
217 
218  SUMOTime getWaitingTime(SUMOTime now) const;
219 
220  SUMOReal getSpeed() const;
221 
222  std::string getStageDescription() const {
223  return "walking";
224  }
225 
230  virtual void tripInfoOutput(OutputDevice& os) const;
231 
236  virtual void routeOutput(OutputDevice& os) const;
237 
242  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
243 
248  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
249 
251  bool moveToNextEdge(MSPerson* person, SUMOTime currentTime, MSEdge* nextInternal = 0);
252 
253 
255 
256  inline SUMOReal getMaxSpeed() const {
257  return mySpeed;
258  }
259  inline SUMOReal getDepartPos() const {
260  return myDepartPos;
261  }
262  inline SUMOReal getArrivalPos() const {
263  return myArrivalPos;
264  }
265 
266  inline const MSEdge* getRouteEdge() const {
267  return *myRouteStep;
268  }
269  inline const MSEdge* getNextRouteEdge() const {
270  return myRouteStep == myRoute.end() - 1 ? 0 : *(myRouteStep + 1);
271  }
272  inline const std::vector<const MSEdge*>& getRoute() const {
273  return myRoute;
274  }
275 
277  return myPedestrianState;
278  }
280 
281 
282  private:
283 
284  /* @brief compute average speed if the total walking duration is given
285  * @note Must be callled when the previous stage changes myDepartPos from the default*/
287 
288 
289  private:
292 
294  std::vector<const MSEdge*> myRoute;
295 
296 
297  std::vector<const MSEdge*>::iterator myRouteStep;
298 
301 
303  //std::vector<SUMOTime> myArrivalTimes;
304 
309 
312 
314  public:
316  explicit arrival_finder(SUMOTime time) : myTime(time) {}
317 
319  bool operator()(SUMOReal t) const {
320  return myTime > t;
321  }
322 
323  private:
326  };
327 
328  private:
331 
334 
335  };
336 
342  public:
344  MSPersonStage_Driving(const MSEdge& destination, MSBusStop* toBS,
345  const std::vector<std::string>& lines);
346 
349 
351  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at);
352 
354  const MSEdge* getEdge() const;
355  const MSEdge* getFromEdge() const;
356  SUMOReal getEdgePos(SUMOTime now) const;
357 
359  Position getPosition(SUMOTime now) const;
360 
361  SUMOReal getAngle(SUMOTime now) const;
362 
363  std::string getStageDescription() const;
364 
366  bool isWaitingFor(const std::string& line) const;
367 
369  bool isWaiting4Vehicle() const;
370 
372  SUMOTime getWaitingTime(SUMOTime now) const;
373 
374  SUMOReal getSpeed() const;
375 
377  myVehicle = v;
378  }
379 
385  virtual void tripInfoOutput(OutputDevice& os) const;
386 
392  virtual void routeOutput(OutputDevice& os) const;
393 
398  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
399 
404  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
405 
406  private:
408  const std::set<std::string> myLines;
409 
412 
418 
419  private:
422 
425 
426  };
427 
432  public:
434  MSPersonStage_Waiting(const MSEdge& destination,
435  SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType);
436 
439 
441  const MSEdge* getEdge() const;
442  const MSEdge* getFromEdge() const;
443  SUMOReal getEdgePos(SUMOTime now) const;
444  SUMOTime getUntil() const;
445 
447  Position getPosition(SUMOTime now) const;
448 
449  SUMOReal getAngle(SUMOTime now) const;
450 
451  SUMOTime getWaitingTime(SUMOTime now) const;
452 
453  SUMOReal getSpeed() const;
454 
455  std::string getStageDescription() const {
456  return "waiting (" + myActType + ")";
457  }
458 
460  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at);
461 
467  virtual void tripInfoOutput(OutputDevice& os) const;
468 
474  virtual void routeOutput(OutputDevice& os) const;
475 
480  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
481 
486  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
487 
488  private:
491 
494 
497 
499  std::string myActType;
500 
502 
503 
504  private:
507 
510 
511  };
512 
513 public:
515  typedef std::vector<MSPersonStage*> MSPersonPlan;
516 
517 protected:
520 
523 
525  MSPersonPlan* myPlan;
526 
528  MSPersonPlan::iterator myStep;
529 
532 
533 public:
535  MSPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPersonPlan* plan);
536 
538  virtual ~MSPerson();
539 
541  const std::string& getID() const;
542 
543  /* @brief proceeds to the next step of the route,
544  * @return Whether the persons plan continues */
545  bool proceed(MSNet* net, SUMOTime time);
546 
548  SUMOTime getDesiredDepart() const;
549 
551  void setDeparted(SUMOTime now);
552 
554  const MSEdge& getDestination() const {
555  return (*myStep)->getDestination();
556  }
557 
559  const MSEdge* getEdge() const {
560  return (*myStep)->getEdge();
561  }
562 
564  const MSEdge* getFromEdge() const {
565  return (*myStep)->getFromEdge();
566  }
567 
569  virtual SUMOReal getEdgePos() const;
570 
572  virtual Position getPosition() const;
573 
575  virtual SUMOReal getAngle() const;
576 
578  virtual SUMOReal getWaitingSeconds() const;
579 
581  virtual SUMOReal getSpeed() const;
582 
585  return (*myStep)->getStageType();
586  }
587 
588 
589  std::string getCurrentStageDescription() const {
590  return (*myStep)->getStageDescription();
591  }
592 
594  return *myStep;
595  }
596 
602  void tripInfoOutput(OutputDevice& os) const;
603 
609  void routeOutput(OutputDevice& os) const;
610 
612  bool isWaitingFor(const std::string& line) const {
613  return (*myStep)->isWaitingFor(line);
614  }
615 
617  bool isWaiting4Vehicle() const {
618  return (*myStep)->isWaiting4Vehicle();
619  }
620 
621 
623  return *myParameter;
624  }
625 
626 
627  inline const MSVehicleType& getVehicleType() const {
628  return *myVType;
629  }
630 
631 private:
633  MSPerson(const MSPerson&);
634 
636  MSPerson& operator=(const MSPerson&);
637 
638 };
639 
640 
641 #endif
642 
643 /****************************************************************************/
virtual void routeOutput(OutputDevice &os) const =0
Called on writing vehroute output.
SUMOTime getUntil() const
Definition: MSPerson.cpp:458
SUMOReal getAngle(SUMOTime now) const
Definition: MSPerson.cpp:470
const std::string & getID() const
returns the person id
Definition: MSPerson.cpp:551
const MSEdge * myWaitingEdge
Definition: MSPerson.h:417
virtual void beginEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:409
SUMOTime myArrived
the time at which this stage ended
Definition: MSPerson.h:175
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:305
SUMOTime getDesiredDepart() const
Returns the desired departure time.
Definition: MSPerson.cpp:584
virtual ~MSPerson()
destructor
Definition: MSPerson.cpp:541
const SUMOVehicleParameter * myParameter
the plan of the person
Definition: MSPerson.h:519
SUMOTime getWaitingTime(SUMOTime now) const
the time this person spent waiting
Definition: MSPerson.cpp:519
bool myWriteEvents
Whether events shall be written.
Definition: MSPerson.h:531
const MSEdge * getNextRouteEdge() const
Definition: MSPerson.h:269
const MSEdge & getDestination() const
returns the destination edge
Definition: MSPerson.cpp:70
Position getLanePosition(const MSLane *lane, SUMOReal at, SUMOReal offset) const
get position on lane at length at with orthogonal offset
Definition: MSPerson.cpp:102
const MSVehicleType & getVehicleType() const
Definition: MSPerson.h:627
SUMOReal getSpeed() const
the time this person spent waiting
Definition: MSPerson.cpp:525
void setDeparted(SUMOTime now)
logs end of the step
Definition: MSPerson.cpp:590
bool isWaitingFor(const std::string &line) const
Whether the person waits for a vehicle of the line specified.
Definition: MSPerson.h:612
arrival_finder(SUMOTime time)
constructor
Definition: MSPerson.h:316
virtual Position getPosition() const
return the Network coordinate of the person
Definition: MSPerson.cpp:620
MSPersonStage(const MSEdge &destination, StageType type)
constructor
Definition: MSPerson.cpp:62
MSEdge * myCurrentInternalEdge
The current internal edge this person is on or 0.
Definition: MSPerson.h:300
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:296
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
Definition: MSPerson.h:617
std::vector< const MSEdge * > myRoute
The route of the person.
Definition: MSPerson.h:294
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.h:559
const MSEdge * getFromEdge() const
Returns the departure edge.
Definition: MSPerson.h:564
virtual bool isWaitingFor(const std::string &line) const
Whether the person waits for a vehicle of the line specified.
Definition: MSPerson.cpp:90
StageType getCurrentStageType() const
Definition: MSPerson.h:584
virtual void beginEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:505
void setDeparted(SUMOTime now)
logs end of the step
Definition: MSPerson.cpp:76
virtual SUMOReal getWaitingSeconds() const
the time this person spent waiting in seconds
Definition: MSPerson.cpp:631
SUMOTime myWaitingSince
The time since which this person is waiting for a ride.
Definition: MSPerson.h:416
Position getPosition(SUMOTime now) const
Definition: MSPerson.cpp:165
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:486
virtual bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
Definition: MSPerson.h:124
const std::set< std::string > myLines
the lines to choose from
Definition: MSPerson.h:408
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
Definition: MSPerson.cpp:372
SUMOReal getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:311
SUMOTime myWaitingUntil
the time until the person is waiting
Definition: MSPerson.h:493
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:230
const MSVehicleType * myVType
This Persons's type. (mainly used for drawing related information.
Definition: MSPerson.h:522
MSPersonStage & operator=(const MSPersonStage &)
Invalidated assignment operator.
SUMOReal getEdgeAngle(const MSEdge *e, SUMOReal at) const
Definition: MSPerson.cpp:108
virtual const MSEdge * getEdge() const =0
Returns the current edge.
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:396
virtual void proceed(MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
proceeds to the next step
Definition: MSPerson.cpp:189
The simulated network and simulation perfomer.
Definition: MSNet.h:91
SUMOReal getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:159
The car-following model and parameter.
Definition: MSVehicleType.h:74
const MSEdge & getDestination() const
Returns the current destination.
Definition: MSPerson.h:554
const SUMOVehicleParameter & getParameter() const
Definition: MSPerson.h:622
MSPersonStage_Walking(const std::vector< const MSEdge * > &route, MSBusStop *toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos)
constructor
Definition: MSPerson.cpp:119
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:143
The pedestrian following model.
Definition: MSPModel.h:54
const std::vector< const MSEdge * > & getRoute() const
Definition: MSPerson.h:272
virtual SUMOTime getWaitingTime(SUMOTime now) const =0
the time this person spent waiting
A road/street connecting two junctions.
Definition: MSEdge.h:74
Position getEdgePosition(const MSEdge *e, SUMOReal at, SUMOReal offset) const
get position on edge e at length at with orthogonal offset
Definition: MSPerson.cpp:96
std::string getCurrentStageDescription() const
Definition: MSPerson.h:589
MSPersonPlan * myPlan
the plan of the person
Definition: MSPerson.h:525
void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:604
virtual void proceed(MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)=0
proceeds to the next step
bool moveToNextEdge(MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0)
move forward and return whether the person arrived
Definition: MSPerson.cpp:256
SUMOReal getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:452
PedestrianState * getPedestrianState() const
Definition: MSPerson.h:276
Representation of a vehicle.
Definition: SUMOVehicle.h:64
SUMOTime myDeparted
the time at which this stage started
Definition: MSPerson.h:172
MSPersonStage_Walking & operator=(const MSPersonStage_Walking &)
Invalidated assignment operator.
std::vector< const MSEdge * > MSEdgeVector
Definition: MSPerson.h:57
virtual SUMOReal getAngle(SUMOTime now) const =0
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
virtual void beginEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const =0
Called for writing the events output (begin of an action)
SUMOReal getAngle(SUMOTime now) const
Definition: MSPerson.cpp:331
SUMOReal getSpeed() const
the time this person spent waiting
Definition: MSPerson.cpp:384
A lane area vehicles can halt at.
Definition: MSBusStop.h:64
virtual void endEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const =0
Called for writing the events output (end of an action)
SUMOReal computeAverageSpeed() const
Definition: MSPerson.cpp:212
MSPersonStage * getCurrentStage() const
Definition: MSPerson.h:593
virtual void tripInfoOutput(OutputDevice &os) const =0
Called on writing tripinfo output.
SUMOTime myWaitingDuration
the time the person is waiting
Definition: MSPerson.h:490
virtual void endEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:249
Position getPosition(SUMOTime now) const
Definition: MSPerson.cpp:464
virtual const MSEdge * getFromEdge() const =0
virtual void proceed(MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
proceeds to the next step
Definition: MSPerson.cpp:476
virtual SUMOReal getSpeed() const =0
the time this person spent waiting
std::vector< const MSEdge * >::iterator myRouteStep
Definition: MSPerson.h:297
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:402
std::string myActType
The type of activity.
Definition: MSPerson.h:499
MSPerson & operator=(const MSPerson &)
Invalidated assignment operator.
MSPersonStage_Driving & operator=(const MSPersonStage_Driving &)
Invalidated assignment operator.
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:446
const MSEdge * getRouteEdge() const
Definition: MSPerson.h:266
virtual SUMOReal getAngle() const
return the current angle of the person
Definition: MSPerson.cpp:626
bool operator()(SUMOReal t) const
comparison operator
Definition: MSPerson.h:319
void setVehicle(SUMOVehicle *v)
Definition: MSPerson.h:376
SUMOTime getWaitingTime(SUMOTime now) const
the time this person spent waiting
Definition: MSPerson.cpp:177
bool isWaitingFor(const std::string &line) const
Whether the person waits for a vehicle of the line specified.
Definition: MSPerson.cpp:366
MSPersonStage_Waiting(const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType)
constructor
Definition: MSPerson.cpp:424
std::string getStageDescription() const
return string representation of the current stage
Definition: MSPerson.h:222
abstract base class for managing callbacks to retrieve various state information from the model ...
Definition: MSPModel.h:96
virtual SUMOReal getEdgePos(SUMOTime now) const =0
SUMOReal getArrivalPos() const
Definition: MSPerson.h:262
SUMOReal getAngle(SUMOTime now) const
Definition: MSPerson.cpp:171
MSPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSPersonPlan *plan)
constructor
Definition: MSPerson.cpp:535
virtual void beginEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:242
virtual Position getPosition(SUMOTime now) const =0
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:440
Structure representing possible vehicle parameter.
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:492
virtual void endEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:415
virtual std::string getStageDescription() const =0
return string representation of the current stage
void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:596
SUMOTime myTime
the searched arrival time
Definition: MSPerson.h:325
SUMOTime myWaitingStart
the time the person is waiting
Definition: MSPerson.h:496
MSPersonStage_Waiting & operator=(const MSPersonStage_Waiting &)
Invalidated assignment operator.
MSPersonPlan::iterator myStep
the iterator over the route
Definition: MSPerson.h:528
SUMOTime myWalkingTime
the time the person is walking
Definition: MSPerson.h:291
SUMOReal getDepartPos() const
Definition: MSPerson.h:259
StageType myType
The type of this stage.
Definition: MSPerson.h:178
Position getPosition(SUMOTime now) const
Definition: MSPerson.cpp:321
std::string getStageDescription() const
return string representation of the current stage
Definition: MSPerson.cpp:390
PedestrianState * myPedestrianState
state that is to be manipulated by MSPModel
Definition: MSPerson.h:311
bool proceed(MSNet *net, SUMOTime time)
Definition: MSPerson.cpp:557
MSPersonStage_Driving(const MSEdge &destination, MSBusStop *toBS, const std::vector< std::string > &lines)
constructor
Definition: MSPerson.cpp:286
virtual SUMOReal getSpeed() const
the current speed of the person
Definition: MSPerson.cpp:636
SUMOTime getWaitingTime(SUMOTime now) const
time spent waiting for a ride
Definition: MSPerson.cpp:378
virtual void endEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:512
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:153
virtual SUMOReal getEdgePos() const
return the offset from the start of the current edge
Definition: MSPerson.cpp:615
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:215
virtual void proceed(MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
proceeds to the next step
Definition: MSPerson.cpp:346
const MSEdge & myDestination
the next edge to reach (either by walking or driving)
Definition: MSPerson.h:169
virtual ~MSPersonStage()
destructor
Definition: MSPerson.cpp:66
SUMOReal myDepartPos
A vector of computed times an edge is reached.
Definition: MSPerson.h:305
SUMOVehicle * myVehicle
The taken vehicle.
Definition: MSPerson.h:411
SUMOReal getMaxSpeed() const
accessors to be used by MSPModel
Definition: MSPerson.h:256
SUMOReal getSpeed() const
the time this person spent waiting
Definition: MSPerson.cpp:183
void setArrived(SUMOTime now)
logs end of the step
Definition: MSPerson.cpp:84
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
std::vector< MSPersonStage * > MSPersonPlan
the structure holding the plan of a person
Definition: MSPerson.h:515
std::string getStageDescription() const
return string representation of the current stage
Definition: MSPerson.h:455
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:224
StageType getStageType() const
Definition: MSPerson.h:104