Eclipse SUMO - Simulation of Urban MObility
MSTransportable::Stage_Waiting Class Reference

#include <MSTransportable.h>

Inheritance diagram for MSTransportable::Stage_Waiting:
Collaboration diagram for MSTransportable::Stage_Waiting:

Public Member Functions

void abort (MSTransportable *)
 abort this stage (TraCI) More...
 
virtual void beginEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output. More...
 
Stageclone () const
 
virtual void endEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output (end of an action) More...
 
double getAngle (SUMOTime now) const
 returns the angle of the transportable More...
 
double getArrivalPos () const
 
SUMOTime getDeparted () const
 get departure time of stage More...
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
MSStoppingPlacegetDestinationStop () const
 returns the destination stop (if any) More...
 
double getDistance () const
 get travel distance in this stage More...
 
virtual const MSEdgegetEdge () const
 Returns the current edge. More...
 
double getEdgeAngle (const MSEdge *e, double at) const
 get angle of the edge at a certain position More...
 
virtual double getEdgePos (SUMOTime now) const
 
Position getEdgePosition (const MSEdge *e, double at, double offset) const
 get position on edge e at length at with orthogonal offset More...
 
virtual ConstMSEdgeVector getEdges () const
 the edges of the current stage More...
 
virtual const MSEdgegetFromEdge () const
 
Position getLanePosition (const MSLane *lane, double at, double offset) const
 get position on lane at length at with orthogonal offset More...
 
virtual const MSStoppingPlacegetOriginStop () const
 returns the origin stop (if any). only needed for Stage_Trip More...
 
Position getPosition (SUMOTime now) const
 returns the position of the transportable More...
 
virtual double getSpeed () const
 the speed of the transportable More...
 
std::string getStageDescription () const
 return (brief) string representation of the current stage More...
 
std::string getStageSummary () const
 return string summary of the current stage More...
 
StageType getStageType () const
 
SUMOTime getUntil () const
 
virtual SUMOVehiclegetVehicle () const
 Whether the transportable waits for a vehicle. More...
 
SUMOTime getWaitingTime (SUMOTime now) const
 the time this transportable spent waiting More...
 
virtual bool isWaiting4Vehicle () const
 Whether the transportable waits for a vehicle. More...
 
virtual bool isWaitingFor (const SUMOVehicle *vehicle) const
 Whether the transportable waits for the given vehicle. More...
 
virtual void proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)
 proceeds to the next step More...
 
virtual void routeOutput (OutputDevice &os, const bool withRouteLength) const
 Called on writing vehroute output. More...
 
virtual void setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now)
 logs end of the step More...
 
void setDeparted (SUMOTime now)
 logs end of the step More...
 
void setDestination (const MSEdge *newDestination, MSStoppingPlace *newDestStop)
 
virtual void setSpeed (double)
 sets the walking speed (ignored in other stages) More...
 
 Stage_Waiting (const MSEdge *destination, MSStoppingPlace *toStop, SUMOTime duration, SUMOTime until, double pos, const std::string &actType, const bool initial)
 constructor More...
 
virtual void tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const
 Called on writing tripinfo output. More...
 
virtual ~Stage_Waiting ()
 destructor More...
 

Protected Attributes

double myArrivalPos
 the position at which we want to arrive More...
 
SUMOTime myArrived
 the time at which this stage ended More...
 
SUMOTime myDeparted
 the time at which this stage started More...
 
const MSEdgemyDestination
 the next edge to reach by getting transported More...
 
MSStoppingPlacemyDestinationStop
 the stop to reach by getting transported (if any) More...
 
StageType myType
 The type of this stage. More...
 

Private Member Functions

Stage_Waitingoperator= (const Stage_Waiting &)
 Invalidated assignment operator. More...
 
 Stage_Waiting (const Stage_Waiting &)
 Invalidated copy constructor. More...
 

Private Attributes

std::string myActType
 The type of activity. More...
 
SUMOTime myWaitingDuration
 the time the person is waiting More...
 
SUMOTime myWaitingUntil
 the time until the person is waiting More...
 

Detailed Description

A "real" stage performing a waiting over the specified time

Definition at line 349 of file MSTransportable.h.

Constructor & Destructor Documentation

◆ Stage_Waiting() [1/2]

MSTransportable::Stage_Waiting::Stage_Waiting ( const MSEdge destination,
MSStoppingPlace toStop,
SUMOTime  duration,
SUMOTime  until,
double  pos,
const std::string &  actType,
const bool  initial 
)

constructor

Definition at line 360 of file MSTransportable.cpp.

◆ ~Stage_Waiting()

MSTransportable::Stage_Waiting::~Stage_Waiting ( )
virtual

destructor

Definition at line 372 of file MSTransportable.cpp.

◆ Stage_Waiting() [2/2]

MSTransportable::Stage_Waiting::Stage_Waiting ( const Stage_Waiting )
private

Invalidated copy constructor.

Member Function Documentation

◆ abort()

void MSTransportable::Stage_Waiting::abort ( MSTransportable t)
virtual

◆ beginEventOutput()

void MSTransportable::Stage_Waiting::beginEventOutput ( const MSTransportable p,
SUMOTime  t,
OutputDevice os 
) const
virtual

Called for writing the events output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSTransportable::Stage.

Definition at line 445 of file MSTransportable.cpp.

References MSTransportable::getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

◆ clone()

MSTransportable::Stage * MSTransportable::Stage_Waiting::clone ( ) const
virtual

Implements MSTransportable::Stage.

Definition at line 375 of file MSTransportable.cpp.

References MSTransportable::WAITING_FOR_DEPART.

◆ endEventOutput()

void MSTransportable::Stage_Waiting::endEventOutput ( const MSTransportable p,
SUMOTime  t,
OutputDevice os 
) const
virtual

Called for writing the events output (end of an action)

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSTransportable::Stage.

Definition at line 452 of file MSTransportable.cpp.

References MSTransportable::getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

◆ getAngle()

double MSTransportable::Stage_Waiting::getAngle ( SUMOTime  now) const
virtual

returns the angle of the transportable

Implements MSTransportable::Stage.

Definition at line 393 of file MSTransportable.cpp.

References MSNet::getInstance(), MSNet::lefthand(), and M_PI.

◆ getArrivalPos()

◆ getDeparted()

SUMOTime MSTransportable::Stage::getDeparted ( ) const
inherited

get departure time of stage

Definition at line 108 of file MSTransportable.cpp.

◆ getDestination()

const MSEdge * MSTransportable::Stage::getDestination ( ) const
inherited

◆ getDestinationStop()

◆ getDistance()

double MSTransportable::Stage_Waiting::getDistance ( ) const
inlinevirtual

get travel distance in this stage

Implements MSTransportable::Stage.

Definition at line 371 of file MSTransportable.h.

◆ getEdge()

◆ getEdgeAngle()

double MSTransportable::Stage::getEdgeAngle ( const MSEdge e,
double  at 
) const
inherited

get angle of the edge at a certain position

Definition at line 133 of file MSTransportable.cpp.

References MSEdge::getLanes().

Referenced by MSPModel_NonInteracting::PState::getAngle(), and CState::getAngle().

◆ getEdgePos()

◆ getEdgePosition()

Position MSTransportable::Stage::getEdgePosition ( const MSEdge e,
double  at,
double  offset 
) const
inherited

get position on edge e at length at with orthogonal offset

Definition at line 123 of file MSTransportable.cpp.

References MSEdge::getLanes().

◆ getEdges()

ConstMSEdgeVector MSTransportable::Stage::getEdges ( ) const
virtualinherited

◆ getFromEdge()

const MSEdge * MSTransportable::Stage::getFromEdge ( ) const
virtualinherited

◆ getLanePosition()

Position MSTransportable::Stage::getLanePosition ( const MSLane lane,
double  at,
double  offset 
) const
inherited

◆ getOriginStop()

virtual const MSStoppingPlace* MSTransportable::Stage::getOriginStop ( ) const
inlinevirtualinherited

returns the origin stop (if any). only needed for Stage_Trip

Reimplemented in MSTransportable::Stage_Trip.

Definition at line 90 of file MSTransportable.h.

Referenced by MSPerson::MSPersonStage_Driving::proceed().

◆ getPosition()

Position MSTransportable::Stage_Waiting::getPosition ( SUMOTime  now) const
virtual

returns the position of the transportable

Implements MSTransportable::Stage.

Definition at line 386 of file MSTransportable.cpp.

References MSNet::getInstance(), and MSTransportable::ROADSIDE_OFFSET.

◆ getSpeed()

double MSTransportable::Stage::getSpeed ( ) const
virtualinherited

the speed of the transportable

Reimplemented in MSTransportable::Stage_Driving, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.

Definition at line 87 of file MSTransportable.cpp.

◆ getStageDescription()

std::string MSTransportable::Stage_Waiting::getStageDescription ( ) const
inlinevirtual

return (brief) string representation of the current stage

Implements MSTransportable::Stage.

Definition at line 377 of file MSTransportable.h.

References myActType.

◆ getStageSummary()

std::string MSTransportable::Stage_Waiting::getStageSummary ( ) const
virtual

return string summary of the current stage

Implements MSTransportable::Stage.

Definition at line 474 of file MSTransportable.cpp.

References MSTransportable::getDestination(), Named::getID(), and time2string().

◆ getStageType()

StageType MSTransportable::Stage::getStageType ( ) const
inlineinherited

◆ getUntil()

SUMOTime MSTransportable::Stage_Waiting::getUntil ( ) const

Definition at line 380 of file MSTransportable.cpp.

◆ getVehicle()

virtual SUMOVehicle* MSTransportable::Stage::getVehicle ( ) const
inlinevirtualinherited

Whether the transportable waits for a vehicle.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 147 of file MSTransportable.h.

Referenced by libsumo::Person::getStage().

◆ getWaitingTime()

SUMOTime MSTransportable::Stage_Waiting::getWaitingTime ( SUMOTime  now) const
virtual

the time this transportable spent waiting

Reimplemented from MSTransportable::Stage.

Definition at line 459 of file MSTransportable.cpp.

◆ isWaiting4Vehicle()

virtual bool MSTransportable::Stage::isWaiting4Vehicle ( ) const
inlinevirtualinherited

Whether the transportable waits for a vehicle.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 142 of file MSTransportable.h.

◆ isWaitingFor()

bool MSTransportable::Stage::isWaitingFor ( const SUMOVehicle vehicle) const
virtualinherited

Whether the transportable waits for the given vehicle.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 118 of file MSTransportable.cpp.

◆ operator=()

Stage_Waiting& MSTransportable::Stage_Waiting::operator= ( const Stage_Waiting )
private

Invalidated assignment operator.

◆ proceed()

void MSTransportable::Stage_Waiting::proceed ( MSNet net,
MSTransportable transportable,
SUMOTime  now,
Stage previous 
)
virtual

◆ routeOutput()

void MSTransportable::Stage_Waiting::routeOutput ( OutputDevice os,
const bool  withRouteLength 
) const
virtual

Called on writing vehroute output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSTransportable::Stage.

Definition at line 429 of file MSTransportable.cpp.

References OutputDevice::closeTag(), MSTransportable::getDestination(), MSTransportable::getID(), OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_LANE, SUMO_ATTR_UNTIL, time2string(), MSTransportable::WAITING_FOR_DEPART, and OutputDevice::writeAttr().

◆ setArrived()

void MSTransportable::Stage::setArrived ( MSNet net,
MSTransportable transportable,
SUMOTime  now 
)
virtualinherited

◆ setDeparted()

void MSTransportable::Stage::setDeparted ( SUMOTime  now)
inherited

logs end of the step

Definition at line 101 of file MSTransportable.cpp.

◆ setDestination()

void MSTransportable::Stage::setDestination ( const MSEdge newDestination,
MSStoppingPlace newDestStop 
)
inherited

◆ setSpeed()

virtual void MSTransportable::Stage::setSpeed ( double  )
inlinevirtualinherited

sets the walking speed (ignored in other stages)

Reimplemented in MSPerson::MSPersonStage_Walking.

Definition at line 127 of file MSTransportable.h.

◆ tripInfoOutput()

void MSTransportable::Stage_Waiting::tripInfoOutput ( OutputDevice os,
const MSTransportable *const  transportable 
) const
virtual

Called on writing tripinfo output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSTransportable::Stage.

Definition at line 416 of file MSTransportable.cpp.

References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), toString(), MSTransportable::WAITING_FOR_DEPART, and OutputDevice::writeAttr().

Field Documentation

◆ myActType

std::string MSTransportable::Stage_Waiting::myActType
private

The type of activity.

Definition at line 420 of file MSTransportable.h.

Referenced by getStageDescription().

◆ myArrivalPos

double MSTransportable::Stage::myArrivalPos
protectedinherited

◆ myArrived

SUMOTime MSTransportable::Stage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 215 of file MSTransportable.h.

◆ myDeparted

SUMOTime MSTransportable::Stage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 212 of file MSTransportable.h.

◆ myDestination

const MSEdge* MSTransportable::Stage::myDestination
protectedinherited

the next edge to reach by getting transported

Definition at line 203 of file MSTransportable.h.

◆ myDestinationStop

MSStoppingPlace* MSTransportable::Stage::myDestinationStop
protectedinherited

the stop to reach by getting transported (if any)

Definition at line 206 of file MSTransportable.h.

Referenced by MSTransportable::Stage::getDestinationStop(), and MSPerson::MSPersonStage_Access::MSPersonStage_Access().

◆ myType

StageType MSTransportable::Stage::myType
protectedinherited

The type of this stage.

Definition at line 218 of file MSTransportable.h.

Referenced by MSTransportable::Stage::getStageType().

◆ myWaitingDuration

SUMOTime MSTransportable::Stage_Waiting::myWaitingDuration
private

the time the person is waiting

Definition at line 414 of file MSTransportable.h.

◆ myWaitingUntil

SUMOTime MSTransportable::Stage_Waiting::myWaitingUntil
private

the time until the person is waiting

Definition at line 417 of file MSTransportable.h.


The documentation for this class was generated from the following files: