107 assert(routeOffset >= 0);
108 assert(routeOffset < (
int)
myRoute.size());
116 assert(routeOffset >= 0);
117 assert(routeOffset < (
int)edges.size());
127 const MSLane* lane = getSidewalk<MSEdge, MSLane>(edge, svc);
129 const std::vector<MSLane*>& departLanes = edge->
getLanes();
130 if ((
int)departLanes.size() <= laneIndex || !departLanes[laneIndex]->allowsVehicleClass(svc)) {
131 std::string error =
"Invalid departLane '" +
toString(laneIndex) +
"' for person '" +
id +
"'";
139 lane = departLanes[laneIndex];
std::vector< const MSEdge * > ConstMSEdgeVector
#define WRITE_WARNING(msg)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A road/street connecting two junctions.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
virtual void removeTransportable(MSTransportable *t) const
virtual void addTransportable(MSTransportable *t) const
Representation of a lane in the micro simulation.
static const int UNDEFINED_DIRECTION
double getAngle(SUMOTime now) const
Returns the angle of the transportable.
const MSLane * getLane() const
Returns the current lane.
static const MSLane * checkDepartLane(const MSEdge *edge, SUMOVehicleClass svc, int laneIndex, const std::string &id)
interpret custom depart lane
double getEdgePos(SUMOTime now) const
Returns the offset from the start of the current edge measured in its natural direction.
int getDirection() const
Return the movement directon on the edge.
ConstMSEdgeVector getEdges() const
the edges of the current stage
double getSpeed() const
Returns the speed of the transportable.
std::vector< constMSEdge * >::iterator myRouteStep
current step
MSEdge * myCurrentInternalEdge
The current internal edge this transportable is on or nullptr.
Position getPosition(SUMOTime now) const
Returns the position of the container.
const MSEdge * getEdge() const
Returns the current edge.
MSTransportableStateAdapter * myPState
state that is to be manipulated by MSPModel
SUMOTime getWaitingTime() const
Returns the time the transportable spent waiting.
virtual void setRouteIndex(MSTransportable *const transportable, int routeOffset)
place transportable on a previously passed edge
SUMOTime getTotalWaitingTime() const
Returns the cumulative time the transportable spent waiting.
std::vector< const MSEdge * > myRoute
The route of the container.
double myDepartPos
the depart position
const MSEdge * getFromEdge() const
Returns first edge of the containers route.
virtual void replaceRoute(MSTransportable *const transportable, const ConstMSEdgeVector &edges, int routeOffset)
virtual ~MSStageMoving()
destructor
virtual SUMOTime getTotalWaitingTime() const
virtual double getSpeed(const MSStageMoving &stage) const =0
return the current speed of the transportable
virtual Position getPosition(const MSStageMoving &stage, SUMOTime now) const =0
return the network coordinate of the transportable
virtual const MSLane * getLane() const
the current lane of the transportable
virtual SUMOTime getWaitingTime() const =0
return the time the transportable spent standing consecutively
virtual int getDirection() const =0
return the walking direction (FORWARD, BACKWARD, UNDEFINED_DIRECTION)
virtual bool isFinished() const
whether the transportable has finished walking
virtual double getAngle(const MSStageMoving &stage, SUMOTime now) const =0
return the direction in which the transportable faces in degrees
virtual double getEdgePos(SUMOTime now=0) const =0
return the offset from the start of the current edge measured in its natural direction
static OptionsCont & getOptions()
Retrieves the options.
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid