100 assert(routeOffset >= 0);
101 assert(routeOffset < (
int)
myRoute.size());
109 assert(routeOffset >= 0);
110 assert(routeOffset < (
int)edges.size());
120 const MSLane* lane = getSidewalk<MSEdge, MSLane>(edge, svc);
122 const std::vector<MSLane*>& departLanes = edge->
getLanes();
123 if ((
int)departLanes.size() <= laneIndex || !departLanes[laneIndex]->allowsVehicleClass(svc)) {
124 std::string error =
"Invalid departLane '" +
toString(laneIndex) +
"' for person '" +
id +
"'";
132 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 MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
static const int UNDEFINED_DIRECTION
double getAngle(SUMOTime now) const
Returns the angle of the container.
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.
MSTransportableStateAdapter * myState
state that is to be manipulated by MSPModel
ConstMSEdgeVector getEdges() const
the edges of the current stage
SUMOTime getWaitingTime(SUMOTime now) const
Returns the time the container spent waiting.
double getSpeed() const
Returns the speed of the container.
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.
virtual void setRouteIndex(MSTransportable *const transportable, int routeOffset)
place transportable on a previously passed edge
std::vector< const MSEdge * > myRoute
The route of the container.
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 double getSpeed(const MSStageMoving &stage) const =0
return the current speed of the transportable
virtual int getDirection(const MSStageMoving &stage, SUMOTime now) const =0
return the walking direction (FORWARD, BACKWARD)
virtual Position getPosition(const MSStageMoving &stage, SUMOTime now) const =0
return the network coordinate of the transportable
virtual const MSLane * getLane() const
whether the transportable is jammed
virtual SUMOTime getWaitingTime(const MSStageMoving &stage, SUMOTime now) const =0
return the time the transportable spent standing
virtual double getEdgePos(const MSStageMoving &stage, SUMOTime now) const =0
return the offset from the start of the current edge measured in its natural direction
virtual double getAngle(const MSStageMoving &stage, SUMOTime now) const =0
return the direction in which the transportable faces in degrees
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