Eclipse SUMO - Simulation of Urban MObility
MSStage.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-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // The common superclass for modelling transportable objects like persons and containers
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include <set>
24 #include <cassert>
25 #include <utils/common/SUMOTime.h>
27 #include <utils/geom/Position.h>
29 #include <utils/geom/Boundary.h>
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 class MSEdge;
38 class MSLane;
39 class MSNet;
40 class MSStoppingPlace;
41 class MSVehicleType;
42 class OutputDevice;
44 class SUMOVehicle;
46 class MSTransportable;
48 
49 typedef std::vector<const MSEdge*> ConstMSEdgeVector;
50 
51 // ===========================================================================
52 // class definitions
53 // ===========================================================================
54 enum class MSStageType {
56  WAITING = 1,
57  WALKING = 2, // only for persons
58  DRIVING = 3,
59  ACCESS = 4,
60  TRIP = 5,
61  TRANSHIP = 6
62 };
63 
68 class MSStage {
69 public:
71  MSStage(const MSEdge* destination, MSStoppingPlace* toStop, const double arrivalPos, MSStageType type, const std::string& group = "");
72 
74  virtual ~MSStage();
75 
77  const MSEdge* getDestination() const;
78 
81  return myDestinationStop;
82  }
83 
85  virtual MSStoppingPlace* getOriginStop() const {
86  return nullptr;
87  }
88 
89  virtual double getArrivalPos() const {
90  return myArrivalPos;
91  }
92 
93  void setArrivalPos(double arrivalPos) {
94  myArrivalPos = arrivalPos;
95  }
96 
98  virtual const MSEdge* getEdge() const;
99  virtual const MSEdge* getFromEdge() const;
100  virtual double getEdgePos(SUMOTime now) const;
101 
103  virtual int getDirection() const;
104 
106  virtual Position getPosition(SUMOTime now) const = 0;
107 
109  virtual double getAngle(SUMOTime now) const = 0;
110 
112  virtual const MSLane* getLane() const {
113  return nullptr;
114  }
115 
118  return myType;
119  }
120 
122  const std::string& getGroup() const {
123  return myGroup;
124  }
125 
127  virtual std::string getStageDescription(const bool isPerson) const = 0;
128 
130  virtual std::string getStageSummary(const bool isPerson) const = 0;
131 
133  virtual void proceed(MSNet* net, MSTransportable* transportable, SUMOTime now, MSStage* previous) = 0;
134 
136  virtual void abort(MSTransportable*) {};
137 
139  virtual void setSpeed(double) {};
140 
142  SUMOTime getDeparted() const;
143 
145  SUMOTime getArrived() const;
146 
148  void setDeparted(SUMOTime now);
149 
151  virtual const std::string setArrived(MSNet* net, MSTransportable* transportable, SUMOTime now, const bool vehicleArrived);
152 
154  virtual bool isWaitingFor(const SUMOVehicle* vehicle) const;
155 
157  virtual bool isWaiting4Vehicle() const {
158  return false;
159  }
160 
162  virtual SUMOVehicle* getVehicle() const {
163  return nullptr;
164  }
165 
167  virtual SUMOTime getWaitingTime(SUMOTime now) const;
168 
170  virtual double getSpeed() const;
171 
173  virtual ConstMSEdgeVector getEdges() const;
174 
176  Position getEdgePosition(const MSEdge* e, double at, double offset) const;
177 
179  Position getLanePosition(const MSLane* lane, double at, double offset) const;
180 
182  double getEdgeAngle(const MSEdge* e, double at) const;
183 
184  void setDestination(const MSEdge* newDestination, MSStoppingPlace* newDestStop);
185 
187  virtual double getDistance() const = 0;
188 
193  virtual void tripInfoOutput(OutputDevice& os, const MSTransportable* const transportable) const = 0;
194 
202  virtual void routeOutput(const bool isPerson, OutputDevice& os, const bool withRouteLength, const MSStage* const previous) const = 0;
203 
204  virtual MSStage* clone() const = 0;
205 
208  virtual void saveState(std::ostringstream& out) {
209  UNUSED_PARAMETER(out);
210  }
211 
214  virtual void loadState(MSTransportable* transportable, std::istringstream& state) {
215  UNUSED_PARAMETER(transportable);
216  UNUSED_PARAMETER(state);
217  }
218 
219 protected:
222 
225 
227  double myArrivalPos;
228 
231 
234 
237 
239  const std::string myGroup;
240 
242  static const double ROADSIDE_OFFSET;
243 
244 private:
246  MSStage(const MSStage&);
247 
249  MSStage& operator=(const MSStage&) = delete;
250 
251 };
252 
253 
257 class MSStageTrip : public MSStage {
258 public:
260  MSStageTrip(const MSEdge* origin, MSStoppingPlace* fromStop,
261  const MSEdge* destination, MSStoppingPlace* toStop,
262  const SUMOTime duration, const SVCPermissions modeSet,
263  const std::string& vTypes, const double speed, const double walkFactor,
264  const std::string& group,
265  const double departPosLat, const bool hasArrivalPos, const double arrivalPos);
266 
268  virtual ~MSStageTrip();
269 
270  MSStage* clone() const;
271 
272  const MSEdge* getEdge() const;
273 
275  return myOriginStop;
276  }
277 
278  double getEdgePos(SUMOTime now) const;
279 
280  Position getPosition(SUMOTime now) const;
281 
282  double getAngle(SUMOTime now) const;
283 
284  double getDistance() const {
285  // invalid
286  return -1;
287  }
288 
289  std::string getStageDescription(const bool isPerson) const {
290  UNUSED_PARAMETER(isPerson);
291  return "trip";
292  }
293 
294  std::string getStageSummary(const bool isPerson) const;
295 
297  const std::string setArrived(MSNet* net, MSTransportable* transportable, SUMOTime now, const bool vehicleArrived);
298 
300  void setOrigin(const MSEdge* origin) {
301  myOrigin = origin;
302  }
303 
305  void proceed(MSNet* net, MSTransportable* transportable, SUMOTime now, MSStage* previous);
306 
312  void tripInfoOutput(OutputDevice& os, const MSTransportable* const transportable) const {
313  UNUSED_PARAMETER(os);
314  UNUSED_PARAMETER(transportable);
315  }
316 
322  void routeOutput(const bool isPerson, OutputDevice& os, const bool withRouteLength, const MSStage* const previous) const {
323  UNUSED_PARAMETER(isPerson);
324  UNUSED_PARAMETER(os);
325  UNUSED_PARAMETER(withRouteLength);
326  UNUSED_PARAMETER(previous);
327  }
328 
329 private:
331  const MSEdge* myOrigin;
332 
335 
338 
341 
343  const std::string myVTypes;
344 
346  const double mySpeed;
347 
349  const double myWalkFactor;
350 
352  std::string myGroup;
353 
355  double myDepartPos;
356 
358  const double myDepartPosLat;
359 
361  const bool myHaveArrivalPos;
362 
363 private:
366 
369 
370 };
371 
372 
376 class MSStageWaiting : public MSStage {
377 public:
379  MSStageWaiting(const MSEdge* destination, MSStoppingPlace* toStop, SUMOTime duration, SUMOTime until,
380  double pos, const std::string& actType, const bool initial);
381 
383  virtual ~MSStageWaiting();
384 
385  MSStage* clone() const;
386 
388  void abort(MSTransportable*);
389 
390  SUMOTime getUntil() const;
391 
392  SUMOTime getDuration() const;
393 
395  return myStopEndTime;
396  }
398  Position getPosition(SUMOTime now) const;
399 
400  double getAngle(SUMOTime now) const;
401 
403  double getDistance() const {
404  return 0;
405  }
406 
407  std::string getStageDescription(const bool isPerson) const;
408 
409  std::string getStageSummary(const bool isPerson) const;
410 
412  void proceed(MSNet* net, MSTransportable* transportable, SUMOTime now, MSStage* previous);
413 
419  void tripInfoOutput(OutputDevice& os, const MSTransportable* const transportable) const;
420 
428  void routeOutput(const bool isPerson, OutputDevice& os, const bool withRouteLength, const MSStage* const previous) const;
429 
430  void saveState(std::ostringstream& out);
431 
432  void loadState(MSTransportable* transportable, std::istringstream& state);
433 
434 private:
437 
440 
443 
445  std::string myActType;
446 
449 
450 private:
453 
456 
457 };
458 
459 
463 class MSStageMoving : public MSStage {
464 public:
466  MSStageMoving(const std::vector<const MSEdge*>& route, MSStoppingPlace* toStop, const double speed,
467  const double departPos, const double arrivalPos, const double departPosLat, const int departLane, MSStageType type) :
468  MSStage(route.back(), toStop, arrivalPos, type),
469  myState(nullptr), myRoute(route), myRouteStep(myRoute.begin()),
470  mySpeed(speed), myDepartPos(departPos),
471  myDepartPosLat(departPosLat), myDepartLane(departLane) {}
472 
474  virtual ~MSStageMoving();
475 
476  virtual const MSEdge* getNextRouteEdge() const = 0;
477 
479  return myState;
480  }
481 
483  const MSEdge* getEdge() const;
484 
486  const MSLane* getLane() const;
487 
489  const MSEdge* getFromEdge() const;
490 
492  ConstMSEdgeVector getEdges() const;
493 
495  double getEdgePos(SUMOTime now) const;
496 
498  int getDirection() const;
499 
501  Position getPosition(SUMOTime now) const;
502 
504  double getAngle(SUMOTime now) const;
505 
507  SUMOTime getWaitingTime(SUMOTime now) const;
508 
510  double getSpeed() const;
511 
513  virtual double getMaxSpeed(const MSTransportable* const transportable = nullptr) const = 0;
514 
516  virtual bool moveToNextEdge(MSTransportable* transportable, SUMOTime currentTime, int prevDir, MSEdge* nextInternal = 0) = 0;
517 
519  virtual void setRouteIndex(MSTransportable* const transportable, int routeOffset);
520 
521  virtual void replaceRoute(MSTransportable* const transportable, const ConstMSEdgeVector& edges, int routeOffset);
522 
523  inline const std::vector<const MSEdge*>& getRoute() const {
524  return myRoute;
525  }
526 
527  inline const std::vector<const MSEdge*>::iterator getRouteStep() const {
528  return myRouteStep;
529  }
530 
531  inline double getDepartPos() const {
532  return myDepartPos;
533  }
534 
535  inline double getDepartPosLat() const {
536  return myDepartPosLat;
537  }
538 
539  inline int getDepartLane() const {
540  return myDepartLane;
541  }
542 
543 protected:
546 
548  std::vector<const MSEdge*> myRoute;
549 
551  std::vector<const MSEdge*>::iterator myRouteStep;
552 
555 
557  double mySpeed;
558 
560  double myDepartPos;
561 
564 
567 };
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:74
MSStageType
Definition: MSStage.h:54
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSStage.h:47
long long int SUMOTime
Definition: SUMOTime.h:32
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:30
A road/street connecting two junctions.
Definition: MSEdge.h:77
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
The simulated network and simulation perfomer.
Definition: MSNet.h:88
virtual MSStoppingPlace * getOriginStop() const
returns the origin stop (if any). only needed for MSStageTrip
Definition: MSStage.h:85
virtual ~MSStage()
destructor
Definition: MSStage.cpp:67
const MSEdge * getDestination() const
returns the destination edge
Definition: MSStage.cpp:70
MSStage(const MSStage &)
Invalidated copy constructor.
virtual ConstMSEdgeVector getEdges() const
the edges of the current stage
Definition: MSStage.cpp:111
virtual double getEdgePos(SUMOTime now) const
Definition: MSStage.cpp:88
virtual int getDirection() const
Return the movement directon on the edge.
Definition: MSStage.cpp:93
virtual void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const =0
Called on writing tripinfo output.
virtual const MSEdge * getFromEdge() const
Definition: MSStage.cpp:82
MSStage(const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, MSStageType type, const std::string &group="")
constructor
Definition: MSStage.cpp:57
virtual double getArrivalPos() const
Definition: MSStage.h:89
virtual MSStage * clone() const =0
virtual void setSpeed(double)
sets the walking speed (ignored in other stages)
Definition: MSStage.h:139
virtual const MSLane * getLane() const
Returns the current lane (if applicable)
Definition: MSStage.h:112
virtual SUMOVehicle * getVehicle() const
Current vehicle in which the transportable is driving (or nullptr)
Definition: MSStage.h:162
virtual void saveState(std::ostringstream &out)
Saves the current state into the given stream, standard implementation does nothing.
Definition: MSStage.h:208
SUMOTime getDeparted() const
get departure time of stage
Definition: MSStage.cpp:126
void setDeparted(SUMOTime now)
logs end of the step
Definition: MSStage.cpp:119
virtual bool isWaitingFor(const SUMOVehicle *vehicle) const
Whether the transportable waits for the given vehicle.
Definition: MSStage.cpp:142
MSStoppingPlace * myDestinationStop
the stop to reach by getting transported (if any)
Definition: MSStage.h:224
virtual std::string getStageDescription(const bool isPerson) const =0
return (brief) string representation of the current stage
const std::string myGroup
The id of the group of transportables traveling together.
Definition: MSStage.h:239
virtual const std::string setArrived(MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
logs end of the step
Definition: MSStage.cpp:136
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
Definition: MSStage.h:80
SUMOTime getArrived() const
get arrival time of stage
Definition: MSStage.cpp:131
virtual std::string getStageSummary(const bool isPerson) const =0
return string summary of the current stage
virtual void loadState(MSTransportable *transportable, std::istringstream &state)
Reconstructs the current state, standard implementation does nothing.
Definition: MSStage.h:214
virtual Position getPosition(SUMOTime now) const =0
returns the position of the transportable
MSStageType getStageType() const
Definition: MSStage.h:117
void setArrivalPos(double arrivalPos)
Definition: MSStage.h:93
virtual double getDistance() const =0
get travel distance in this stage
virtual void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous)=0
proceeds to this stage
virtual void abort(MSTransportable *)
abort this stage (TraCI)
Definition: MSStage.h:136
virtual double getSpeed() const
the speed of the transportable
Definition: MSStage.cpp:105
virtual bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
Definition: MSStage.h:157
SUMOTime myArrived
the time at which this stage ended
Definition: MSStage.h:233
void setDestination(const MSEdge *newDestination, MSStoppingPlace *newDestStop)
Definition: MSStage.cpp:164
virtual void routeOutput(const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const =0
Called on writing vehroute output.
Position getLanePosition(const MSLane *lane, double at, double offset) const
get position on lane at length at with orthogonal offset
Definition: MSStage.cpp:152
MSStageType myType
The type of this stage.
Definition: MSStage.h:236
double getEdgeAngle(const MSEdge *e, double at) const
get angle of the edge at a certain position
Definition: MSStage.cpp:158
virtual const MSEdge * getEdge() const
Returns the current edge.
Definition: MSStage.cpp:76
MSStage & operator=(const MSStage &)=delete
Invalidated assignment operator.
const std::string & getGroup() const
return the id of the group of transportables traveling together
Definition: MSStage.h:122
static const double ROADSIDE_OFFSET
the offset for computing positions when standing at an edge
Definition: MSStage.h:242
double myArrivalPos
the position at which we want to arrive
Definition: MSStage.h:227
virtual double getAngle(SUMOTime now) const =0
returns the angle of the transportable
Position getEdgePosition(const MSEdge *e, double at, double offset) const
get position on edge e at length at with orthogonal offset
Definition: MSStage.cpp:147
const MSEdge * myDestination
the next edge to reach by getting transported
Definition: MSStage.h:221
virtual SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
Definition: MSStage.cpp:99
SUMOTime myDeparted
the time at which this stage started
Definition: MSStage.h:230
double getAngle(SUMOTime now) const
Returns the angle of the container.
Definition: MSStage.cpp:635
const MSLane * getLane() const
Returns the current lane.
Definition: MSStage.cpp:650
virtual bool moveToNextEdge(MSTransportable *transportable, SUMOTime currentTime, int prevDir, MSEdge *nextInternal=0)=0
move forward and return whether the transportable arrived
double getEdgePos(SUMOTime now) const
Returns the offset from the start of the current edge measured in its natural direction.
Definition: MSStage.cpp:619
int getDirection() const
Return the movement directon on the edge.
Definition: MSStage.cpp:624
MSTransportableStateAdapter * myState
state that is to be manipulated by MSPModel
Definition: MSStage.h:545
ConstMSEdgeVector getEdges() const
the edges of the current stage
Definition: MSStage.cpp:613
SUMOTime getWaitingTime(SUMOTime now) const
Returns the time the container spent waiting.
Definition: MSStage.cpp:640
double myDepartPosLat
the lateral depart position
Definition: MSStage.h:563
double getSpeed() const
Returns the speed of the container.
Definition: MSStage.cpp:645
const std::vector< const MSEdge * >::iterator getRouteStep() const
Definition: MSStage.h:527
virtual MSTransportableStateAdapter * getState() const
Definition: MSStage.h:478
double getDepartPosLat() const
Definition: MSStage.h:535
MSStageMoving(const std::vector< const MSEdge * > &route, MSStoppingPlace *toStop, const double speed, const double departPos, const double arrivalPos, const double departPosLat, const int departLane, MSStageType type)
constructor
Definition: MSStage.h:466
int getDepartLane() const
Definition: MSStage.h:539
double mySpeed
the speed of the transportable
Definition: MSStage.h:557
int myDepartLane
the depart lane or -1
Definition: MSStage.h:566
MSEdge * myCurrentInternalEdge
The current internal edge this transportable is on or nullptr.
Definition: MSStage.h:554
Position getPosition(SUMOTime now) const
Returns the position of the container.
Definition: MSStage.cpp:630
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSStage.cpp:599
virtual const MSEdge * getNextRouteEdge() const =0
const std::vector< const MSEdge * > & getRoute() const
Definition: MSStage.h:523
virtual void setRouteIndex(MSTransportable *const transportable, int routeOffset)
place transportable on a previously passed edge
Definition: MSStage.cpp:655
std::vector< const MSEdge * > myRoute
The route of the container.
Definition: MSStage.h:548
double getDepartPos() const
Definition: MSStage.h:531
double myDepartPos
the depart position
Definition: MSStage.h:560
const MSEdge * getFromEdge() const
Returns first edge of the containers route.
Definition: MSStage.cpp:608
virtual void replaceRoute(MSTransportable *const transportable, const ConstMSEdgeVector &edges, int routeOffset)
Definition: MSStage.cpp:664
virtual double getMaxSpeed(const MSTransportable *const transportable=nullptr) const =0
the maximum speed of the transportable
std::vector< const MSEdge * >::iterator myRouteStep
current step
Definition: MSStage.h:551
virtual ~MSStageMoving()
destructor
Definition: MSStage.cpp:594
MSStageTrip(const MSStageTrip &)
Invalidated copy constructor.
const bool myHaveArrivalPos
whether an arrivalPos was in the input
Definition: MSStage.h:361
double getAngle(SUMOTime now) const
returns the angle of the transportable
Definition: MSStage.cpp:215
MSStageTrip(const MSEdge *origin, MSStoppingPlace *fromStop, const MSEdge *destination, MSStoppingPlace *toStop, const SUMOTime duration, const SVCPermissions modeSet, const std::string &vTypes, const double speed, const double walkFactor, const std::string &group, const double departPosLat, const bool hasArrivalPos, const double arrivalPos)
constructor
Definition: MSStage.cpp:177
MSStageTrip & operator=(const MSStageTrip &)
Invalidated assignment operator.
void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous)
proceeds to the next step
Definition: MSStage.cpp:404
const std::string setArrived(MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
logs end of the step
Definition: MSStage.cpp:234
double getDistance() const
get travel distance in this stage
Definition: MSStage.h:284
std::string getStageDescription(const bool isPerson) const
return (brief) string representation of the current stage
Definition: MSStage.h:289
std::string getStageSummary(const bool isPerson) const
return string summary of the current stage
Definition: MSStage.cpp:411
const std::string myVTypes
The possible vehicles to use.
Definition: MSStage.h:343
double myDepartPos
The depart position.
Definition: MSStage.h:355
double getEdgePos(SUMOTime now) const
Definition: MSStage.cpp:228
MSStage * clone() const
Definition: MSStage.cpp:200
const MSEdge * getEdge() const
Returns the current edge.
Definition: MSStage.cpp:222
void routeOutput(const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const
Called on writing vehroute output.
Definition: MSStage.h:322
const MSEdge * myOrigin
the origin edge
Definition: MSStage.h:331
void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
Definition: MSStage.h:312
const double mySpeed
The walking speed.
Definition: MSStage.h:346
MSStoppingPlace * myOriginStop
the origin edge
Definition: MSStage.h:334
SUMOTime myDuration
the time the trip should take (applies to only walking)
Definition: MSStage.h:337
const double myWalkFactor
The factor to apply to walking durations.
Definition: MSStage.h:349
const double myDepartPosLat
The lateral depart position.
Definition: MSStage.h:358
void setOrigin(const MSEdge *origin)
change origin for parking area rerouting
Definition: MSStage.h:300
MSStoppingPlace * getOriginStop() const
returns the origin stop (if any). only needed for MSStageTrip
Definition: MSStage.h:274
const SVCPermissions myModeSet
The allowed modes of transportation.
Definition: MSStage.h:340
Position getPosition(SUMOTime now) const
returns the position of the transportable
Definition: MSStage.cpp:208
virtual ~MSStageTrip()
destructor
Definition: MSStage.cpp:197
std::string myGroup
The group for this personTrip.
Definition: MSStage.h:352
MSStageWaiting(const MSStageWaiting &)
Invalidated copy constructor.
void loadState(MSTransportable *transportable, std::istringstream &state)
Reconstructs the current state, standard implementation does nothing.
Definition: MSStage.cpp:574
void routeOutput(const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const
Called on writing vehroute output.
Definition: MSStage.cpp:499
MSStageWaiting & operator=(const MSStageWaiting &)=delete
Invalidated assignment operator.
SUMOTime getUntil() const
Definition: MSStage.cpp:441
double getDistance() const
get travel distance in this stage
Definition: MSStage.h:403
SUMOTime myWaitingDuration
the time the person is waiting
Definition: MSStage.h:436
SUMOTime myWaitingUntil
the time until the person is waiting
Definition: MSStage.h:439
SUMOTime getDuration() const
Definition: MSStage.cpp:446
void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous)
proceeds to the next step
Definition: MSStage.cpp:468
void saveState(std::ostringstream &out)
Saves the current state into the given stream, standard implementation does nothing.
Definition: MSStage.cpp:569
std::string getStageDescription(const bool isPerson) const
return (brief) string representation of the current stage
Definition: MSStage.cpp:540
double getAngle(SUMOTime now) const
returns the angle of the transportable
Definition: MSStage.cpp:462
Position myStopWaitPos
waiting position at stopping place
Definition: MSStage.h:442
SUMOTime myStopEndTime
stores the actual end time of the stop (combination of duration and until)
Definition: MSStage.h:448
MSStage * clone() const
Definition: MSStage.cpp:436
std::string myActType
The type of activity.
Definition: MSStage.h:445
virtual ~MSStageWaiting()
destructor
Definition: MSStage.cpp:433
void abort(MSTransportable *)
abort this stage (TraCI)
Definition: MSStage.cpp:532
std::string getStageSummary(const bool isPerson) const
return string summary of the current stage
Definition: MSStage.cpp:550
Position getPosition(SUMOTime now) const
returns the position of the transportable
Definition: MSStage.cpp:452
MSStageWaiting(const MSEdge *destination, MSStoppingPlace *toStop, SUMOTime duration, SUMOTime until, double pos, const std::string &actType, const bool initial)
constructor
Definition: MSStage.cpp:419
void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
Definition: MSStage.cpp:486
SUMOTime getStopEnd() const
Definition: MSStage.h:394
A lane area vehicles can halt at.
Abstract in-person device.
abstract base class for managing callbacks to retrieve various state information from the model
Definition: MSPModel.h:133
The car-following model and parameter.
Definition: MSVehicleType.h:62
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
Representation of a vehicle.
Definition: SUMOVehicle.h:60
Structure representing possible vehicle parameter.