260 const std::string& vTypes,
const double speed,
const double walkFactor,
261 const std::string& group,
262 const double departPosLat,
const bool hasArrivalPos,
const double arrivalPos);
377 double pos,
const std::string& actType,
const bool initial);
454 const double departPos,
const double arrivalPos,
const double departPosLat,
MSStageType type) :
455 MSStage(route.back(), toStop, arrivalPos, type),
505 inline const std::vector<const MSEdge*>&
getRoute()
const {
509 inline const std::vector<const MSEdge*>::iterator
getRouteStep()
const {
std::vector< const MSEdge * > ConstMSEdgeVector
std::vector< const MSEdge * > ConstMSEdgeVector
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
#define UNUSED_PARAMETER(x)
A road/street connecting two junctions.
Representation of a lane in the micro simulation.
The simulated network and simulation perfomer.
virtual MSStoppingPlace * getOriginStop() const
returns the origin stop (if any). only needed for MSStageTrip
virtual ~MSStage()
destructor
const MSEdge * getDestination() const
returns the destination edge
MSStage(const MSStage &)
Invalidated copy constructor.
virtual ConstMSEdgeVector getEdges() const
the edges of the current stage
virtual double getEdgePos(SUMOTime now) const
virtual void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const =0
Called on writing tripinfo output.
virtual const MSEdge * getFromEdge() const
MSStage(const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, MSStageType type, const std::string &group="")
constructor
virtual double getArrivalPos() const
virtual MSStage * clone() const =0
virtual void setSpeed(double)
sets the walking speed (ignored in other stages)
virtual const MSLane * getLane() const
Returns the current lane (if applicable)
virtual SUMOVehicle * getVehicle() const
Whether the transportable waits for a vehicle.
virtual void saveState(std::ostringstream &out)
Saves the current state into the given stream, standard implementation does nothing.
SUMOTime getDeparted() const
get departure time of stage
void setDeparted(SUMOTime now)
logs end of the step
virtual bool isWaitingFor(const SUMOVehicle *vehicle) const
Whether the transportable waits for the given vehicle.
MSStoppingPlace * myDestinationStop
the stop to reach by getting transported (if any)
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.
virtual const std::string setArrived(MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
logs end of the step
MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
SUMOTime getArrived() const
get arrival time of stage
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.
virtual Position getPosition(SUMOTime now) const =0
returns the position of the transportable
MSStageType getStageType() const
void setArrivalPos(double arrivalPos)
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)
virtual double getSpeed() const
the speed of the transportable
virtual bool isWaiting4Vehicle() const
Whether the transportable waits for a vehicle.
SUMOTime myArrived
the time at which this stage ended
void setDestination(const MSEdge *newDestination, MSStoppingPlace *newDestStop)
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
MSStageType myType
The type of this stage.
double getEdgeAngle(const MSEdge *e, double at) const
get angle of the edge at a certain position
virtual const MSEdge * getEdge() const
Returns the current edge.
MSStage & operator=(const MSStage &)=delete
Invalidated assignment operator.
const std::string & getGroup() const
return the id of the group of transportables traveling together
static const double ROADSIDE_OFFSET
the offset for computing positions when standing at an edge
double myArrivalPos
the position at which we want to arrive
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
const MSEdge * myDestination
the next edge to reach by getting transported
virtual SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
SUMOTime myDeparted
the time at which this stage started
double getAngle(SUMOTime now) const
Returns the angle of the container.
const MSLane * getLane() const
Returns the current lane.
double getEdgePos(SUMOTime now) const
Returns the offset from the start of the current edge measured in its natural direction.
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 myDepartPosLat
the lateral depart position
double getSpeed() const
Returns the speed of the container.
const std::vector< const MSEdge * >::iterator getRouteStep() const
virtual MSTransportableStateAdapter * getState() const
double getDepartPosLat() const
double mySpeed
the speed of the transportable
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 const MSEdge * getNextRouteEdge() const =0
virtual bool moveToNextEdge(MSTransportable *transportable, SUMOTime currentTime, MSEdge *nextInternal=0)=0
move forward and return whether the transportable arrived
const std::vector< const MSEdge * > & getRoute() const
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.
double getDepartPos() const
MSStageMoving(const std::vector< const MSEdge * > &route, MSStoppingPlace *toStop, const double speed, const double departPos, const double arrivalPos, const double departPosLat, MSStageType type)
constructor
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 double getMaxSpeed(const MSTransportable *const transportable=nullptr) const =0
the maximum speed of the transportable
std::vector< const MSEdge * >::iterator myRouteStep
current step
virtual ~MSStageMoving()
destructor
MSStageTrip(const MSStageTrip &)
Invalidated copy constructor.
const bool myHaveArrivalPos
whether an arrivalPos was in the input
double getAngle(SUMOTime now) const
returns the angle of the transportable
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
MSStageTrip & operator=(const MSStageTrip &)
Invalidated assignment operator.
void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous)
proceeds to the next step
const std::string setArrived(MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
logs end of the step
double getDistance() const
get travel distance in this stage
std::string getStageDescription(const bool isPerson) const
return (brief) string representation of the current stage
std::string getStageSummary(const bool isPerson) const
return string summary of the current stage
const std::string myVTypes
The possible vehicles to use.
double myDepartPos
The depart position.
double getEdgePos(SUMOTime now) const
const MSEdge * getEdge() const
Returns the current edge.
void routeOutput(const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const
Called on writing vehroute output.
const MSEdge * myOrigin
the origin edge
void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
const double mySpeed
The walking speed.
MSStoppingPlace * myOriginStop
the origin edge
SUMOTime myDuration
the time the trip should take (applies to only walking)
const double myWalkFactor
The factor to apply to walking durations.
const double myDepartPosLat
The lateral depart position.
void setOrigin(const MSEdge *origin)
change origin for parking area rerouting
MSStoppingPlace * getOriginStop() const
returns the origin stop (if any). only needed for MSStageTrip
const SVCPermissions myModeSet
The allowed modes of transportation.
Position getPosition(SUMOTime now) const
returns the position of the transportable
virtual ~MSStageTrip()
destructor
std::string myGroup
The group for this personTrip.
MSStageWaiting(const MSStageWaiting &)
Invalidated copy constructor.
void routeOutput(const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const
Called on writing vehroute output.
MSStageWaiting & operator=(const MSStageWaiting &)=delete
Invalidated assignment operator.
SUMOTime getUntil() const
double getDistance() const
get travel distance in this stage
SUMOTime myWaitingDuration
the time the person is waiting
SUMOTime myWaitingUntil
the time until the person is waiting
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
void proceed(MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous)
proceeds to the next step
std::string getStageDescription(const bool isPerson) const
return (brief) string representation of the current stage
double getAngle(SUMOTime now) const
returns the angle of the transportable
std::string myActType
The type of activity.
virtual ~MSStageWaiting()
destructor
void abort(MSTransportable *)
abort this stage (TraCI)
std::string getStageSummary(const bool isPerson) const
return string summary of the current stage
Position getPosition(SUMOTime now) const
returns the position of the transportable
MSStageWaiting(const MSEdge *destination, MSStoppingPlace *toStop, SUMOTime duration, SUMOTime until, double pos, const std::string &actType, const bool initial)
constructor
void tripInfoOutput(OutputDevice &os, const MSTransportable *const transportable) const
Called on writing tripinfo output.
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
The car-following model and parameter.
Static storage of an output device and its base (abstract) implementation.
A point in 2D or 3D with translation and scaling methods.
Representation of a vehicle.
Structure representing possible vehicle parameter.