Eclipse SUMO - Simulation of Urban MObility
MSPerson.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // The class for modelling person-movements
18 /****************************************************************************/
19 #ifndef MSPerson_h
20 #define MSPerson_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <vector>
30 #include <set>
31 #include <utils/common/SUMOTime.h>
32 #include <utils/common/Command.h>
33 #include <utils/geom/Position.h>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class MSNet;
42 class MSEdge;
43 class MSLane;
44 class OutputDevice;
46 class MSStoppingPlace;
47 class SUMOVehicle;
48 class MSVehicleType;
49 class MSPModel;
50 class PedestrianState;
51 class DummyState;
52 
53 typedef std::vector<const MSEdge*> ConstMSEdgeVector;
54 
55 // ===========================================================================
56 // class definitions
57 // ===========================================================================
63 class MSPerson : public MSTransportable {
64 public:
71  public:
73  MSPersonStage_Walking(const std::string& personID, const ConstMSEdgeVector& route, MSStoppingPlace* toStop, SUMOTime walkingTime,
74  double speed, double departPos, double arrivalPos, double departPosLat);
75 
78 
79  Stage* clone() const;
80 
82  virtual void proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous);
83 
85  void abort(MSTransportable*);
86 
88  void setSpeed(double speed);
89 
91  const MSEdge* getEdge() const;
92  const MSEdge* getFromEdge() const;
93  double getEdgePos(SUMOTime now) const;
94 
96  Position getPosition(SUMOTime now) const;
97 
98  double getAngle(SUMOTime now) const;
99 
101  double getDistance() const {
102  return walkDistance();
103  }
104 
105  SUMOTime getWaitingTime(SUMOTime now) const;
106 
107  double getSpeed() const;
108 
110  ConstMSEdgeVector getEdges() const;
111 
112  std::string getStageDescription() const {
113  return "walking";
114  }
115  std::string getStageSummary() const;
116 
121  virtual void tripInfoOutput(OutputDevice& os, const MSTransportable* const transportable) const;
122 
128  virtual void routeOutput(OutputDevice& os, const bool withRouteLength) const;
129 
134  virtual void beginEventOutput(const MSTransportable& p, SUMOTime t, OutputDevice& os) const;
135 
140  virtual void endEventOutput(const MSTransportable& p, SUMOTime t, OutputDevice& os) const;
141 
143  bool moveToNextEdge(MSPerson* person, SUMOTime currentTime, MSEdge* nextInternal = nullptr);
144 
146  void setRouteIndex(MSPerson* person, int routeOffset);
147 
149 
150  double getMaxSpeed(const MSTransportable* const person) const;
151 
152  inline double getDepartPos() const {
153  return myDepartPos;
154  }
155 
156  inline double getDepartPosLat() const {
157  return myDepartPosLat;
158  }
159 
160  inline double getArrivalPos() const {
161  return myArrivalPos;
162  }
163 
164  inline const std::vector<const MSEdge*>::iterator getRouteStep() const {
165  return myRouteStep;
166  }
167 
168  inline const MSEdge* getRouteEdge() const {
169  return *myRouteStep;
170  }
171  inline const MSEdge* getNextRouteEdge() const {
172  return myRouteStep == myRoute.end() - 1 ? 0 : *(myRouteStep + 1);
173  }
174  inline const ConstMSEdgeVector& getRoute() const {
175  return myRoute;
176  }
177 
179  return myPedestrianState;
180  }
182 
183 
184  private:
185 
187  double walkDistance() const;
188 
189  /* @brief compute average speed if the total walking duration is given
190  * @note Must be called when the previous stage changes myDepartPos from the default*/
191  double computeAverageSpeed() const;
192 
193 
194  private:
197 
200 
203 
204 
205  ConstMSEdgeVector::iterator myRouteStep;
206 
209 
210  double myDepartPos;
212  double mySpeed;
213 
216 
218  public:
220  explicit arrival_finder(SUMOTime time) : myTime(time) {}
221 
223  bool operator()(double t) const {
224  return myTime > t;
225  }
226 
227  private:
230  };
231 
232  private:
235 
238 
239  };
240 
246  public:
248  MSPersonStage_Driving(const MSEdge* destination, MSStoppingPlace* toStop,
249  const double arrivalPos, const std::vector<std::string>& lines,
250  const std::string& intendedVeh = "", SUMOTime intendedDepart = -1);
251 
254 
255  Stage* clone() const;
256 
258  virtual void proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous);
259 
261  std::string getStageDescription() const;
262  std::string getStageSummary() const;
263 
270  virtual void tripInfoOutput(OutputDevice& os, const MSTransportable* const transportable) const;
271 
278  virtual void routeOutput(OutputDevice& os, const bool withRouteLength) const;
279  };
280 
286  public:
288  MSPersonStage_Access(const MSEdge* destination, MSStoppingPlace* toStop,
289  const double arrivalPos, const double dist, const bool isExit);
290 
293 
294  Stage* clone() const;
295 
297  virtual void proceed(MSNet* net, MSTransportable* person, SUMOTime now, Stage* previous);
298 
300  std::string getStageDescription() const;
301  std::string getStageSummary() const;
302 
303  Position getPosition(SUMOTime now) const;
304 
305  double getAngle(SUMOTime now) const;
306 
308  double getDistance() const {
309  return myDist;
310  }
311 
318  void tripInfoOutput(OutputDevice& os, const MSTransportable* const transportable) const;
319 
321  void routeOutput(OutputDevice&, const bool) const {};
322 
325 
328 
329  private:
330  class ProceedCmd : public Command {
331  public:
332  ProceedCmd(MSTransportable* person, MSEdge* edge) : myPerson(person), myStopEdge(edge) {}
334  SUMOTime execute(SUMOTime currentTime);
335  private:
338  private:
341  };
342 
343  private:
344  const double myDist;
345  const bool myAmExit;
348  };
349 
350 public:
352  MSPerson(const SUMOVehicleParameter* pars, MSVehicleType* vtype, MSTransportable::MSTransportablePlan* plan, const double speedFactor);
353 
355  virtual ~MSPerson();
356 
357  /* @brief proceeds to the next step of the route,
358  * @return Whether the persons plan continues */
359  bool proceed(MSNet* net, SUMOTime time);
360 
362  const std::string& getNextEdge() const;
363 
365  const MSEdge* getNextEdgePtr() const;
366 
372  virtual void tripInfoOutput(OutputDevice& os) const;
373 
379  virtual void routeOutput(OutputDevice& os, const bool withRouteLength) const;
380 
382  virtual bool isSelected() const {
383  return false;
384  }
385 
386  inline double getSpeedFactor() const {
387  return myChosenSpeedFactor;
388  }
389 
391  void reroute(ConstMSEdgeVector& newEdges, double departPos, int firstIndex, int nextIndex);
392 
393 
399  class Influencer {
400  public:
402  Influencer();
403 
404 
406  ~Influencer();
407 
408 
409  void setRemoteControlled(Position xyPos, MSLane* l, double pos, double posLat, double angle, int edgeOffset, const ConstMSEdgeVector& route, SUMOTime t);
410 
412  return myLastRemoteAccess;
413  }
414 
416 
417  bool isRemoteControlled() const;
418 
419  bool isRemoteAffected(SUMOTime t) const;
420 
421  private:
424  double myRemotePos;
430  };
431 
432 
439 
440  const Influencer* getInfluencer() const;
441 
442  bool hasInfluencer() const {
443  return myInfluencer != 0;
444  }
445 
447  void setRemoteState(Position xyPos);
448 
449 private:
452 
453  const double myChosenSpeedFactor;
454 
456 
457 private:
459  MSPerson(const MSPerson&);
460 
462  MSPerson& operator=(const MSPerson&);
463 
464 };
465 
466 
467 #endif
468 
469 /****************************************************************************/
ConstMSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSPerson.h:51
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:65
MSPerson::MSPersonStage_Walking::endEventOutput
virtual void endEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output (end of an action)
Definition: MSPerson.cpp:320
MSPerson::MSPersonStage_Access::myAmExit
const bool myAmExit
Definition: MSPerson.h:345
MSPerson::MSPersonStage_Access::beginEventOutput
void beginEventOutput(const MSTransportable &, SUMOTime, OutputDevice &) const
Called on writing events output (begin of an action). Currently does nothing.
Definition: MSPerson.h:324
MSPerson::MSPersonStage_Access::ProceedCmd
Definition: MSPerson.h:330
MSPerson::MSPersonStage_Walking::myRoute
ConstMSEdgeVector myRoute
The route of the person.
Definition: MSPerson.h:202
MSPerson::MSPersonStage_Access
Definition: MSPerson.h:285
MSStoppingPlace
A lane area vehicles can halt at.
Definition: MSStoppingPlace.h:59
MSPerson::MSPersonStage_Access::ProceedCmd::myPerson
MSTransportable *const myPerson
Definition: MSPerson.h:336
MSPerson::MSPersonStage_Walking::computeAverageSpeed
double computeAverageSpeed() const
Definition: MSPerson.cpp:188
MSTransportable::Stage::myArrivalPos
double myArrivalPos
the position at which we want to arrive
Definition: MSTransportable.h:209
MSPerson::MSPersonStage_Walking::myWalkingTime
SUMOTime myWalkingTime
the time the person is walking
Definition: MSPerson.h:196
MSPModel
The pedestrian following model.
Definition: MSPModel.h:52
SUMOTime.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
MSPerson::MSPersonStage_Access::ProceedCmd::myStopEdge
MSEdge * myStopEdge
Definition: MSPerson.h:337
MSPerson::getNextEdge
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:666
MSPerson::MSPersonStage_Access::~MSPersonStage_Access
~MSPersonStage_Access()
destructor
Definition: MSPerson.cpp:540
MSPerson::MSPersonStage_Access::tripInfoOutput
void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:581
MSPerson::MSPersonStage_Access::endEventOutput
void endEventOutput(const MSTransportable &, SUMOTime, OutputDevice &) const
Called on writing events output (end of an action). Currently does nothing.
Definition: MSPerson.h:327
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
MSPerson::hasInfluencer
bool hasInfluencer() const
Definition: MSPerson.h:442
MSPerson::Influencer::getLastAccessTimeStep
SUMOTime getLastAccessTimeStep() const
Definition: MSPerson.h:411
MSTransportable::Stage_Driving
Definition: MSTransportable.h:435
MSPerson::MSPersonStage_Driving::MSPersonStage_Driving
MSPersonStage_Driving(const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines, const std::string &intendedVeh="", SUMOTime intendedDepart=-1)
constructor
Definition: MSPerson.cpp:395
MSPerson::MSPersonStage_Walking::myDepartPosLat
double myDepartPosLat
Definition: MSPerson.h:211
MSPerson::MSPersonStage_Walking::getDepartPos
double getDepartPos() const
Definition: MSPerson.h:152
MSPerson::Influencer::postProcessRemoteControl
void postProcessRemoteControl(MSPerson *p)
Definition: MSPerson.cpp:801
MSPerson::Influencer::myLastRemoteAccess
SUMOTime myLastRemoteAccess
Definition: MSPerson.h:429
MSPerson::MSPersonStage_Walking::myPedestrianState
PedestrianState * myPedestrianState
state that is to be manipulated by MSPModel
Definition: MSPerson.h:215
MSNet
The simulated network and simulation perfomer.
Definition: MSNet.h:91
MSPerson
Definition: MSPerson.h:63
MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking
~MSPersonStage_Walking()
destructor
Definition: MSPerson.cpp:79
MSPerson::MSPersonStage_Access::myPath
PositionVector myPath
Definition: MSPerson.h:347
MSPerson::MSPersonStage_Access::getStageDescription
std::string getStageDescription() const
returns the stage description as a string
Definition: MSPerson.cpp:557
MSPerson::MSPersonStage_Walking::MSPersonStage_Walking
MSPersonStage_Walking(const std::string &personID, const ConstMSEdgeVector &route, MSStoppingPlace *toStop, SUMOTime walkingTime, double speed, double departPos, double arrivalPos, double departPosLat)
constructor
Definition: MSPerson.cpp:55
MSTransportable::Stage
Definition: MSTransportable.h:73
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:60
ConstMSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:75
MSPerson::Influencer::myRemoteAngle
double myRemoteAngle
Definition: MSPerson.h:426
MSPerson::Influencer::~Influencer
~Influencer()
Destructor.
Definition: MSPerson.cpp:772
MSPerson::MSPersonStage_Access::getStageSummary
std::string getStageSummary() const
return string summary of the current stage
Definition: MSPerson.cpp:563
MSPerson::setRemoteState
void setRemoteState(Position xyPos)
sets position outside the road network
MSPerson::MSPersonStage_Walking::arrival_finder::operator()
bool operator()(double t) const
comparison operator
Definition: MSPerson.h:223
MSPerson::Influencer::setRemoteControlled
void setRemoteControlled(Position xyPos, MSLane *l, double pos, double posLat, double angle, int edgeOffset, const ConstMSEdgeVector &route, SUMOTime t)
Definition: MSPerson.cpp:776
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:297
MSPerson::MSPersonStage_Walking::arrival_finder::arrival_finder
arrival_finder(SUMOTime time)
constructor
Definition: MSPerson.h:220
MSTransportable
Definition: MSTransportable.h:58
MSPerson::MSPersonStage_Access::ProceedCmd::execute
SUMOTime execute(SUMOTime currentTime)
Executes the command.
Definition: MSPerson.cpp:591
PositionVector
A list of positions.
Definition: PositionVector.h:45
MSPerson::MSPersonStage_Walking::arrival_finder
Definition: MSPerson.h:217
MSPerson::Influencer::myRemoteLane
MSLane * myRemoteLane
Definition: MSPerson.h:423
MSPerson::MSPersonStage_Walking::getFromEdge
const MSEdge * getFromEdge() const
Definition: MSPerson.cpp:101
MSPerson::Influencer::myRemoteEdgeOffset
int myRemoteEdgeOffset
Definition: MSPerson.h:427
MSPerson::MSPersonStage_Walking::arrival_finder::myTime
SUMOTime myTime
the searched arrival time
Definition: MSPerson.h:229
MSPerson::MSPersonStage_Walking::getRouteStep
const std::vector< const MSEdge * >::iterator getRouteStep() const
Definition: MSPerson.h:164
MSPerson::MSPersonStage_Walking::tripInfoOutput
virtual void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:270
MSPerson::MSPersonStage_Access::ProceedCmd::operator=
ProceedCmd & operator=(const ProceedCmd &)
Invalidated assignment operator.
MSPerson::Influencer
Changes the wished person speed and position.
Definition: MSPerson.h:399
MSPerson::Influencer::myRemotePos
double myRemotePos
Definition: MSPerson.h:424
PedestrianState
abstract base class for managing callbacks to retrieve various state information from the model
Definition: MSPModel.h:137
MSPerson::Influencer::myRemotePosLat
double myRemotePosLat
Definition: MSPerson.h:425
MSPerson::MSPersonStage_Walking::walkDistance
double walkDistance() const
compute total walking distance
Definition: MSPerson.cpp:194
MSPerson::MSPersonStage_Walking::getRouteEdge
const MSEdge * getRouteEdge() const
Definition: MSPerson.h:168
MSPerson::getInfluencer
Influencer & getInfluencer()
Returns the velocity/lane influencer.
Definition: MSPerson.cpp:751
MSPerson::MSPersonStage_Walking::getSpeed
double getSpeed() const
the speed of the transportable
Definition: MSPerson.cpp:131
MSPerson::MSPersonStage_Walking::proceed
virtual void proceed(MSNet *net, MSTransportable *person, SUMOTime now, Stage *previous)
proceeds to the next step
Definition: MSPerson.cpp:143
MSPerson::MSPersonStage_Walking::getWaitingTime
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
Definition: MSPerson.cpp:125
MSPerson::tripInfoOutput
virtual void tripInfoOutput(OutputDevice &os) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:698
MSPerson::MSPersonStage_Access::ProceedCmd::ProceedCmd
ProceedCmd(MSTransportable *person, MSEdge *edge)
Definition: MSPerson.h:332
MSPerson::operator=
MSPerson & operator=(const MSPerson &)
Invalidated assignment operator.
MSPerson::MSPersonStage_Walking::beginEventOutput
virtual void beginEventOutput(const MSTransportable &p, SUMOTime t, OutputDevice &os) const
Called for writing the events output.
Definition: MSPerson.cpp:313
MSPerson::MSPersonStage_Walking::abort
void abort(MSTransportable *)
abort this stage (TraCI)
Definition: MSPerson.cpp:176
MSPerson::Influencer::isRemoteAffected
bool isRemoteAffected(SUMOTime t) const
Definition: MSPerson.cpp:795
MSPerson::MSPersonStage_Walking::myRouteStep
ConstMSEdgeVector::iterator myRouteStep
Definition: MSPerson.h:205
MSPerson::MSPersonStage_Walking::getStageSummary
std::string getStageSummary() const
return string summary of the current stage
Definition: MSPerson.cpp:383
MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving
~MSPersonStage_Driving()
destructor
Definition: MSPerson.cpp:406
MSPerson::MSPersonStage_Walking::getMaxSpeed
double getMaxSpeed(const MSTransportable *const person) const
accessors to be used by MSPModel
Definition: MSPerson.cpp:378
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
MSPerson::MSPersonStage_Access::getPosition
Position getPosition(SUMOTime now) const
returns the position of the transportable
Definition: MSPerson.cpp:569
MSPerson::MSPersonStage_Walking::getPosition
Position getPosition(SUMOTime now) const
returns the position of the transportable
Definition: MSPerson.cpp:113
MSPerson::MSPersonStage_Driving::getStageSummary
std::string getStageSummary() const
return string summary of the current stage
Definition: MSPerson.cpp:463
MSPerson::MSPersonStage_Walking::routeOutput
virtual void routeOutput(OutputDevice &os, const bool withRouteLength) const
Called on writing vehroute output.
Definition: MSPerson.cpp:291
MSPerson::MSPersonStage_Walking::setSpeed
void setSpeed(double speed)
sets the walking speed (ignored in other stages)
Definition: MSPerson.cpp:182
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:78
MSPerson::MSPersonStage_Walking::myCurrentInternalEdge
MSEdge * myCurrentInternalEdge
The current internal edge this person is on or 0.
Definition: MSPerson.h:208
MSPerson::MSPersonStage_Walking::getDepartPosLat
double getDepartPosLat() const
Definition: MSPerson.h:156
MSPerson::MSPersonStage_Access::MSPersonStage_Access
MSPersonStage_Access(const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const double dist, const bool isExit)
constructor
Definition: MSPerson.cpp:528
MSPerson::MSPersonStage_Access::ProceedCmd::~ProceedCmd
~ProceedCmd()
Definition: MSPerson.h:333
MSPerson::MSPersonStage_Access::routeOutput
void routeOutput(OutputDevice &, const bool) const
Called on writing vehroute output. Currently does nothing.
Definition: MSPerson.h:321
MSPerson::myChosenSpeedFactor
const double myChosenSpeedFactor
Definition: MSPerson.h:453
MSPerson::MSPersonStage_Walking::getAngle
double getAngle(SUMOTime now) const
returns the angle of the transportable
Definition: MSPerson.cpp:119
MSPerson::MSPersonStage_Walking::getArrivalPos
double getArrivalPos() const
Definition: MSPerson.h:160
MSPerson::isSelected
virtual bool isSelected() const
whether this person is selected in the GUI
Definition: MSPerson.h:382
MSPerson::MSPersonStage_Access::clone
Stage * clone() const
Definition: MSPerson.cpp:543
MSPerson::MSPersonStage_Driving::routeOutput
virtual void routeOutput(OutputDevice &os, const bool withRouteLength) const
Called on writing vehroute output.
Definition: MSPerson.cpp:498
MSPerson::MSPersonStage_Walking::getDistance
double getDistance() const
get travel distance in this stage
Definition: MSPerson.h:101
MSPerson::myDummyState
static DummyState myDummyState
Definition: MSPerson.h:455
MSPerson::getSpeedFactor
double getSpeedFactor() const
the current speed factor of the transportable (where applicable)
Definition: MSPerson.h:386
Position.h
MSPerson::MSPerson
MSPerson(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, const double speedFactor)
constructor
Definition: MSPerson.cpp:603
MSTransportable::MSTransportablePlan
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
Definition: MSTransportable.h:587
MSPerson::Influencer::myRemoteRoute
ConstMSEdgeVector myRemoteRoute
Definition: MSPerson.h:428
MSPerson::MSPersonStage_Driving::proceed
virtual void proceed(MSNet *net, MSTransportable *person, SUMOTime now, Stage *previous)
proceeds to the next step
Definition: MSPerson.cpp:415
MSPerson::MSPersonStage_Driving
Definition: MSPerson.h:245
MSPerson::MSPersonStage_Walking::moveToNextEdge
bool moveToNextEdge(MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=nullptr)
move forward and return whether the person arrived
Definition: MSPerson.cpp:327
MSPerson::MSPersonStage_Walking::getRoute
const ConstMSEdgeVector & getRoute() const
Definition: MSPerson.h:174
DummyState
Definition: MSPModel.h:178
MSPerson::MSPersonStage_Walking::clone
Stage * clone() const
Definition: MSPerson.cpp:86
MSPerson::MSPersonStage_Access::getDistance
double getDistance() const
get travel distance in this stage
Definition: MSPerson.h:308
MSTransportable.h
Command
Base (microsim) event class.
Definition: Command.h:52
MSPerson::MSPersonStage_Walking
Definition: MSPerson.h:70
MSPerson::getNextEdgePtr
const MSEdge * getNextEdgePtr() const
returns the next edge ptr if this person is walking and the pedestrian model allows it
Definition: MSPerson.cpp:685
config.h
MSPerson::MSPersonStage_Walking::getStageDescription
std::string getStageDescription() const
return (brief) string representation of the current stage
Definition: MSPerson.h:112
Command.h
MSPerson::Influencer::myRemoteXYPos
Position myRemoteXYPos
Definition: MSPerson.h:422
MSPerson::MSPersonStage_Walking::myDepartPos
double myDepartPos
Definition: MSPerson.h:210
MSPerson::MSPersonStage_Access::myDist
const double myDist
Definition: MSPerson.h:344
MSPerson::MSPersonStage_Walking::operator=
MSPersonStage_Walking & operator=(const MSPersonStage_Walking &)
Invalidated assignment operator.
MSPerson::MSPersonStage_Walking::getEdge
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSPerson.cpp:91
MSPerson::reroute
void reroute(ConstMSEdgeVector &newEdges, double departPos, int firstIndex, int nextIndex)
set new walk and replace the stages with relative indices in the interval [firstIndex,...
Definition: MSPerson.cpp:726
MSPerson::MSPersonStage_Access::myEstimatedArrival
SUMOTime myEstimatedArrival
Definition: MSPerson.h:346
MSPerson::~MSPerson
virtual ~MSPerson()
destructor
Definition: MSPerson.cpp:609
MSPerson::MSPersonStage_Walking::getEdges
ConstMSEdgeVector getEdges() const
the edges of the current stage
Definition: MSPerson.cpp:137
MSPerson::MSPersonStage_Access::getAngle
double getAngle(SUMOTime now) const
returns the angle of the transportable
Definition: MSPerson.cpp:575
MSPerson::MSPersonStage_Walking::getEdgePos
double getEdgePos(SUMOTime now) const
Definition: MSPerson.cpp:107
MSPerson::MSPersonStage_Driving::clone
Stage * clone() const
Definition: MSPerson.cpp:409
MSPerson::MSPersonStage_Walking::getNextRouteEdge
const MSEdge * getNextRouteEdge() const
Definition: MSPerson.h:171
PositionVector.h
MSPerson::MSPersonStage_Walking::setRouteIndex
void setRouteIndex(MSPerson *person, int routeOffset)
place person on a previously passed edge
Definition: MSPerson.cpp:369
MSPerson::Influencer::isRemoteControlled
bool isRemoteControlled() const
Definition: MSPerson.cpp:789
MSPerson::MSPersonStage_Walking::mySpeed
double mySpeed
Definition: MSPerson.h:212
MSPerson::MSPersonStage_Driving::getStageDescription
std::string getStageDescription() const
returns the stage description as a string
Definition: MSPerson.cpp:457
MSPerson::proceed
bool proceed(MSNet *net, SUMOTime time)
Definition: MSPerson.cpp:614
MSPerson::MSPersonStage_Walking::myLastEdgeEntryTime
SUMOTime myLastEdgeEntryTime
the time the person entered the edge
Definition: MSPerson.h:199
MSPerson::myInfluencer
Influencer * myInfluencer
An instance of a speed/position influencing instance; built in "getInfluencer".
Definition: MSPerson.h:451
MSPerson::Influencer::Influencer
Influencer()
Constructor.
Definition: MSPerson.cpp:769
MSPerson::MSPersonStage_Driving::tripInfoOutput
virtual void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
Definition: MSPerson.cpp:478
MSPerson::routeOutput
virtual void routeOutput(OutputDevice &os, const bool withRouteLength) const
Called on writing vehroute output.
Definition: MSPerson.cpp:711
MSPerson::MSPersonStage_Access::proceed
virtual void proceed(MSNet *net, MSTransportable *person, SUMOTime now, Stage *previous)
proceeds to the next step
Definition: MSPerson.cpp:548
MSPerson::MSPersonStage_Walking::getPedestrianState
PedestrianState * getPedestrianState() const
Definition: MSPerson.h:178