SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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.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 #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*> ConstMSEdgeVector;
60 
61 // ===========================================================================
62 // class definitions
63 // ===========================================================================
69 class MSPerson {
70 public:
71  enum StageType {
72  WALKING = 0,
73  DRIVING = 1,
74  WAITING = 2
75  };
76 
77 
82  class MSPersonStage {
83  public:
85  MSPersonStage(const MSEdge& destination, StageType type);
86 
88  virtual ~MSPersonStage();
89 
91  const MSEdge& getDestination() const;
92 
94  virtual const MSEdge* getEdge() const = 0;
95  virtual const MSEdge* getFromEdge() const = 0;
96  virtual SUMOReal getEdgePos(SUMOTime now) const = 0;
97 
99  virtual Position getPosition(SUMOTime now) const = 0;
100  virtual SUMOReal getAngle(SUMOTime now) const = 0;
101 
104  return myType;
105  }
106 
108  virtual std::string getStageDescription() const = 0;
109 
111  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at) = 0;
112 
114  void setDeparted(SUMOTime now);
115 
117  void setArrived(SUMOTime now);
118 
120  virtual bool isWaitingFor(const std::string& line) const;
121 
123  virtual bool isWaiting4Vehicle() const {
124  return false;
125  }
126 
128  virtual SUMOTime getWaitingTime(SUMOTime now) const = 0;
129 
131  virtual SUMOReal getSpeed() const = 0;
132 
134  Position getEdgePosition(const MSEdge* e, SUMOReal at, SUMOReal offset) const;
135 
137  Position getLanePosition(const MSLane* lane, SUMOReal at, SUMOReal offset) const;
138 
139  SUMOReal getEdgeAngle(const MSEdge* e, SUMOReal at) const;
140 
145  virtual void tripInfoOutput(OutputDevice& os) const = 0;
146 
151  virtual void routeOutput(OutputDevice& os) const = 0;
152 
157  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0;
158 
163  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const = 0;
164 
165 
166  protected:
169 
172 
175 
178 
179  private:
182 
185 
186  };
187 
194  friend class MSPModel;
195  friend class GUIPerson; // debugging
196 
197  public:
199  MSPersonStage_Walking(const ConstMSEdgeVector& route, MSBusStop* toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos);
200 
203 
205  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at);
206 
208  const MSEdge* getEdge() const;
209  const MSEdge* getFromEdge() const;
210  SUMOReal getEdgePos(SUMOTime now) const;
211 
213  Position getPosition(SUMOTime now) const;
214 
215  SUMOReal getAngle(SUMOTime now) const;
216 
217  SUMOTime getWaitingTime(SUMOTime now) const;
218 
219  SUMOReal getSpeed() const;
220 
221  std::string getStageDescription() const {
222  return "walking";
223  }
224 
229  virtual void tripInfoOutput(OutputDevice& os) const;
230 
235  virtual void routeOutput(OutputDevice& os) const;
236 
241  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
242 
247  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
248 
250  bool moveToNextEdge(MSPerson* person, SUMOTime currentTime, MSEdge* nextInternal = 0);
251 
252 
254 
255  inline SUMOReal getMaxSpeed() const {
256  return mySpeed;
257  }
258  inline SUMOReal getDepartPos() const {
259  return myDepartPos;
260  }
261  inline SUMOReal getArrivalPos() const {
262  return myArrivalPos;
263  }
264 
265  inline const MSEdge* getRouteEdge() const {
266  return *myRouteStep;
267  }
268  inline const MSEdge* getNextRouteEdge() const {
269  return myRouteStep == myRoute.end() - 1 ? 0 : *(myRouteStep + 1);
270  }
271  inline const ConstMSEdgeVector& getRoute() const {
272  return myRoute;
273  }
274 
276  return myPedestrianState;
277  }
279 
280 
281  private:
282 
283  /* @brief compute average speed if the total walking duration is given
284  * @note Must be callled when the previous stage changes myDepartPos from the default*/
286 
287 
288  private:
291 
294 
295 
296  ConstMSEdgeVector::iterator myRouteStep;
297 
300 
302  //std::vector<SUMOTime> myArrivalTimes;
303 
308 
311 
313  public:
315  explicit arrival_finder(SUMOTime time) : myTime(time) {}
316 
318  bool operator()(SUMOReal t) const {
319  return myTime > t;
320  }
321 
322  private:
325  };
326 
327  private:
330 
333 
334  };
335 
341  public:
343  MSPersonStage_Driving(const MSEdge& destination, MSBusStop* toBS,
344  const std::vector<std::string>& lines);
345 
348 
350  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at);
351 
353  const MSEdge* getEdge() const;
354  const MSEdge* getFromEdge() const;
355  SUMOReal getEdgePos(SUMOTime now) const;
356 
358  Position getPosition(SUMOTime now) const;
359 
360  SUMOReal getAngle(SUMOTime now) const;
361 
362  std::string getStageDescription() const;
363 
365  bool isWaitingFor(const std::string& line) const;
366 
368  bool isWaiting4Vehicle() const;
369 
371  SUMOTime getWaitingTime(SUMOTime now) const;
372 
373  SUMOReal getSpeed() const;
374 
376  myVehicle = v;
377  }
378 
384  virtual void tripInfoOutput(OutputDevice& os) const;
385 
391  virtual void routeOutput(OutputDevice& os) const;
392 
397  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
398 
403  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
404 
405  private:
407  const std::set<std::string> myLines;
408 
411 
417 
418  private:
421 
424 
425  };
426 
431  public:
433  MSPersonStage_Waiting(const MSEdge& destination,
434  SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string& actType);
435 
438 
440  const MSEdge* getEdge() const;
441  const MSEdge* getFromEdge() const;
442  SUMOReal getEdgePos(SUMOTime now) const;
443  SUMOTime getUntil() const;
444 
446  Position getPosition(SUMOTime now) const;
447 
448  SUMOReal getAngle(SUMOTime now) const;
449 
450  SUMOTime getWaitingTime(SUMOTime now) const;
451 
452  SUMOReal getSpeed() const;
453 
454  std::string getStageDescription() const {
455  return "waiting (" + myActType + ")";
456  }
457 
459  virtual void proceed(MSNet* net, MSPerson* person, SUMOTime now, MSEdge* previousEdge, const SUMOReal at);
460 
466  virtual void tripInfoOutput(OutputDevice& os) const;
467 
473  virtual void routeOutput(OutputDevice& os) const;
474 
479  virtual void beginEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
480 
485  virtual void endEventOutput(const MSPerson& p, SUMOTime t, OutputDevice& os) const;
486 
487  private:
490 
493 
496 
498  std::string myActType;
499 
501 
502 
503  private:
506 
509 
510  };
511 
512 public:
514  typedef std::vector<MSPersonStage*> MSPersonPlan;
515 
516 public:
518  MSPerson(const SUMOVehicleParameter* pars, const MSVehicleType* vtype, MSPersonPlan* plan);
519 
521  virtual ~MSPerson();
522 
524  const std::string& getID() const;
525 
526  /* @brief proceeds to the next step of the route,
527  * @return Whether the persons plan continues */
528  bool proceed(MSNet* net, SUMOTime time);
529 
531  SUMOTime getDesiredDepart() const;
532 
534  void setDeparted(SUMOTime now);
535 
537  const MSEdge& getDestination() const {
538  return (*myStep)->getDestination();
539  }
540 
542  const MSEdge* getEdge() const {
543  return (*myStep)->getEdge();
544  }
545 
547  const MSEdge* getFromEdge() const {
548  return (*myStep)->getFromEdge();
549  }
550 
552  virtual SUMOReal getEdgePos() const;
553 
555  virtual Position getPosition() const;
556 
558  virtual SUMOReal getAngle() const;
559 
561  virtual SUMOReal getWaitingSeconds() const;
562 
564  virtual SUMOReal getSpeed() const;
565 
568  return (*myStep)->getStageType();
569  }
570 
571 
572  std::string getCurrentStageDescription() const {
573  return (*myStep)->getStageDescription();
574  }
575 
577  return *myStep;
578  }
579 
585  void tripInfoOutput(OutputDevice& os) const;
586 
592  void routeOutput(OutputDevice& os) const;
593 
595  bool isWaitingFor(const std::string& line) const {
596  return (*myStep)->isWaitingFor(line);
597  }
598 
600  bool isWaiting4Vehicle() const {
601  return (*myStep)->isWaiting4Vehicle();
602  }
603 
604 
606  return *myParameter;
607  }
608 
609 
610  inline const MSVehicleType& getVehicleType() const {
611  return *myVType;
612  }
613 
614 
615 protected:
618 
621 
623  MSPersonPlan* myPlan;
624 
626  MSPersonPlan::iterator myStep;
627 
630 
631 
632 private:
634  MSPerson(const MSPerson&);
635 
637  MSPerson& operator=(const MSPerson&);
638 
639 };
640 
641 
642 #endif
643 
644 /****************************************************************************/
virtual void routeOutput(OutputDevice &os) const =0
Called on writing vehroute output.
SUMOTime getUntil() const
Definition: MSPerson.cpp:459
SUMOReal getAngle(SUMOTime now) const
Definition: MSPerson.cpp:471
const std::string & getID() const
returns the person id
Definition: MSPerson.cpp:552
const MSEdge * myWaitingEdge
Definition: MSPerson.h:416
virtual void beginEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:410
SUMOTime myArrived
the time at which this stage ended
Definition: MSPerson.h:174
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:305
SUMOTime getDesiredDepart() const
Returns the desired departure time.
Definition: MSPerson.cpp:585
virtual ~MSPerson()
destructor
Definition: MSPerson.cpp:542
const SUMOVehicleParameter * myParameter
the plan of the person
Definition: MSPerson.h:617
SUMOTime getWaitingTime(SUMOTime now) const
the time this person spent waiting
Definition: MSPerson.cpp:520
bool myWriteEvents
Whether events shall be written.
Definition: MSPerson.h:629
const MSEdge * getNextRouteEdge() const
Definition: MSPerson.h:268
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:610
SUMOReal getSpeed() const
the time this person spent waiting
Definition: MSPerson.cpp:526
void setDeparted(SUMOTime now)
logs end of the step
Definition: MSPerson.cpp:591
bool isWaitingFor(const std::string &line) const
Whether the person waits for a vehicle of the line specified.
Definition: MSPerson.h:595
arrival_finder(SUMOTime time)
constructor
Definition: MSPerson.h:315
virtual Position getPosition() const
return the Network coordinate of the person
Definition: MSPerson.cpp:621
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:299
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:600
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.h:542
const MSEdge * getFromEdge() const
Returns the departure edge.
Definition: MSPerson.h:547
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:567
virtual void beginEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:506
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:632
SUMOTime myWaitingSince
The time since which this person is waiting for a ride.
Definition: MSPerson.h:415
Position getPosition(SUMOTime now) const
Definition: MSPerson.cpp:165
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:487
virtual bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
Definition: MSPerson.h:123
const std::set< std::string > myLines
the lines to choose from
Definition: MSPerson.h:407
bool isWaiting4Vehicle() const
Whether the person waits for a vehicle.
Definition: MSPerson.cpp:373
SUMOReal getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:311
SUMOTime myWaitingUntil
the time until the person is waiting
Definition: MSPerson.h:492
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:620
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:79
MSPersonStage & operator=(const MSPersonStage &)
Invalidated assignment operator.
SUMOReal getEdgeAngle(const MSEdge *e, SUMOReal at) const
Definition: MSPerson.cpp:108
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSPerson.h:57
virtual const MSEdge * getEdge() const =0
Returns the current edge.
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:397
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:94
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:537
const SUMOVehicleParameter & getParameter() const
Definition: MSPerson.h:605
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:143
The pedestrian following model.
Definition: MSPModel.h:54
virtual SUMOTime getWaitingTime(SUMOTime now) const =0
the time this person spent waiting
ConstMSEdgeVector myRoute
The route of the person.
Definition: MSPerson.h:293
A road/street connecting two junctions.
Definition: MSEdge.h:81
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:572
MSPersonPlan * myPlan
the plan of the person
Definition: MSPerson.h:623
void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:605
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:453
PedestrianState * getPedestrianState() const
Definition: MSPerson.h:275
Representation of a vehicle.
Definition: SUMOVehicle.h:65
SUMOTime myDeparted
the time at which this stage started
Definition: MSPerson.h:171
MSPersonStage_Walking & operator=(const MSPersonStage_Walking &)
Invalidated assignment operator.
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
const ConstMSEdgeVector & getRoute() const
Definition: MSPerson.h:271
SUMOReal getSpeed() const
the time this person spent waiting
Definition: MSPerson.cpp:385
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:576
MSPersonStage_Walking(const ConstMSEdgeVector &route, MSBusStop *toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos)
constructor
Definition: MSPerson.cpp:119
virtual void tripInfoOutput(OutputDevice &os) const =0
Called on writing tripinfo output.
SUMOTime myWaitingDuration
the time the person is waiting
Definition: MSPerson.h:489
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:465
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:477
virtual SUMOReal getSpeed() const =0
the time this person spent waiting
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:403
std::string myActType
The type of activity.
Definition: MSPerson.h:498
MSPerson & operator=(const MSPerson &)
Invalidated assignment operator.
MSPersonStage_Driving & operator=(const MSPersonStage_Driving &)
Invalidated assignment operator.
ConstMSEdgeVector::iterator myRouteStep
Definition: MSPerson.h:296
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:447
const MSEdge * getRouteEdge() const
Definition: MSPerson.h:265
virtual SUMOReal getAngle() const
return the current angle of the person
Definition: MSPerson.cpp:627
bool operator()(SUMOReal t) const
comparison operator
Definition: MSPerson.h:318
void setVehicle(SUMOVehicle *v)
Definition: MSPerson.h:375
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:367
MSPersonStage_Waiting(const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType)
constructor
Definition: MSPerson.cpp:425
std::string getStageDescription() const
return string representation of the current stage
Definition: MSPerson.h:221
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:261
SUMOReal getAngle(SUMOTime now) const
Definition: MSPerson.cpp:171
MSPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSPersonPlan *plan)
constructor
Definition: MSPerson.cpp:536
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:441
Structure representing possible vehicle parameter.
virtual void routeOutput(OutputDevice &os) const
Called on writing vehroute output.
Definition: MSPerson.cpp:493
virtual void endEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:416
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:597
SUMOTime myTime
the searched arrival time
Definition: MSPerson.h:324
SUMOTime myWaitingStart
the time the person is waiting
Definition: MSPerson.h:495
MSPersonStage_Waiting & operator=(const MSPersonStage_Waiting &)
Invalidated assignment operator.
MSPersonPlan::iterator myStep
the iterator over the route
Definition: MSPerson.h:626
SUMOTime myWalkingTime
the time the person is walking
Definition: MSPerson.h:290
SUMOReal getDepartPos() const
Definition: MSPerson.h:258
StageType myType
The type of this stage.
Definition: MSPerson.h:177
int SUMOTime
Definition: SUMOTime.h:43
Position getPosition(SUMOTime now) const
Definition: MSPerson.cpp:321
std::string getStageDescription() const
return string representation of the current stage
Definition: MSPerson.cpp:391
PedestrianState * myPedestrianState
state that is to be manipulated by MSPModel
Definition: MSPerson.h:310
bool proceed(MSNet *net, SUMOTime time)
Definition: MSPerson.cpp:558
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:637
SUMOTime getWaitingTime(SUMOTime now) const
time spent waiting for a ride
Definition: MSPerson.cpp:379
virtual void endEventOutput(const MSPerson &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:513
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:616
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:218
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:168
virtual ~MSPersonStage()
destructor
Definition: MSPerson.cpp:66
SUMOReal myDepartPos
A vector of computed times an edge is reached.
Definition: MSPerson.h:304
SUMOVehicle * myVehicle
The taken vehicle.
Definition: MSPerson.h:410
SUMOReal getMaxSpeed() const
accessors to be used by MSPModel
Definition: MSPerson.h:255
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:514
std::string getStageDescription() const
return string representation of the current stage
Definition: MSPerson.h:454
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:224
StageType getStageType() const
Definition: MSPerson.h:103