Eclipse SUMO - Simulation of Urban MObility
MSStageWaiting Class Reference

#include <MSStage.h>

Inheritance diagram for MSStageWaiting:
[legend]
Collaboration diagram for MSStageWaiting:
[legend]

Public Member Functions

void abort (MSTransportable *)
 abort this stage (TraCI) More...
 
MSStageclone () const
 
double getAngle (SUMOTime now) const
 returns the angle of the transportable More...
 
virtual double getArrivalPos () const
 
SUMOTime getArrived () const
 get arrival time of stage More...
 
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
 
const std::string & getGroup () const
 return the id of the group of transportables traveling together More...
 
virtual const MSLanegetLane () const
 Returns the current lane (if applicable) More...
 
Position getLanePosition (const MSLane *lane, double at, double offset) const
 get position on lane at length at with orthogonal offset More...
 
virtual MSStoppingPlacegetOriginStop () const
 returns the origin stop (if any). only needed for MSStageTrip 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 bool isPerson) const
 return (brief) string representation of the current stage More...
 
std::string getStageSummary (const bool isPerson) const
 return string summary of the current stage More...
 
MSStageType 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 loadState (MSTransportable *transportable, std::istringstream &state)
 Reconstructs the current state, standard implementation does nothing. More...
 
 MSStageWaiting (const MSEdge *destination, MSStoppingPlace *toStop, SUMOTime duration, SUMOTime until, double pos, const std::string &actType, const bool initial)
 constructor More...
 
void proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous)
 proceeds to the next step More...
 
void routeOutput (const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const
 Called on writing vehroute output. More...
 
virtual void saveState (std::ostringstream &out)
 Saves the current state into the given stream, standard implementation does nothing. More...
 
void setArrivalPos (double arrivalPos)
 
virtual const std::string setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived)
 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...
 
void tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const
 Called on writing tripinfo output. More...
 
virtual ~MSStageWaiting ()
 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...
 
const std::string myGroup
 The id of the group of transportables traveling together. More...
 
MSStageType myType
 The type of this stage. More...
 

Static Protected Attributes

static const double ROADSIDE_OFFSET
 the offset for computing positions when standing at an edge More...
 

Private Member Functions

 MSStageWaiting (const MSStageWaiting &)
 Invalidated copy constructor. More...
 
MSStageWaitingoperator= (const MSStageWaiting &)=delete
 Invalidated assignment operator. 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 373 of file MSStage.h.

Constructor & Destructor Documentation

◆ MSStageWaiting() [1/2]

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

constructor

Definition at line 407 of file MSStage.cpp.

References WAITING, and WAITING_FOR_DEPART.

Referenced by clone().

Here is the caller graph for this function:

◆ ~MSStageWaiting()

MSStageWaiting::~MSStageWaiting ( )
virtual

destructor

Definition at line 419 of file MSStage.cpp.

◆ MSStageWaiting() [2/2]

MSStageWaiting::MSStageWaiting ( const MSStageWaiting )
private

Invalidated copy constructor.

Member Function Documentation

◆ abort()

void MSStageWaiting::abort ( MSTransportable t)
virtual

◆ clone()

◆ getAngle()

double MSStageWaiting::getAngle ( SUMOTime  now) const
virtual

returns the angle of the transportable

Implements MSStage.

Definition at line 440 of file MSStage.cpp.

References MSStage::getEdgeAngle(), MSGlobals::gLefthand, M_PI, MSStage::myArrivalPos, and MSStage::myDestination.

◆ getArrivalPos()

◆ getArrived()

SUMOTime MSStage::getArrived ( ) const
inherited

get arrival time of stage

Definition at line 126 of file MSStage.cpp.

References MSStage::myArrived.

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

Here is the caller graph for this function:

◆ getDeparted()

SUMOTime MSStage::getDeparted ( ) const
inherited

get departure time of stage

Definition at line 121 of file MSStage.cpp.

References MSStage::myDeparted.

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

Here is the caller graph for this function:

◆ getDestination()

◆ getDestinationStop()

MSStoppingPlace* MSStage::getDestinationStop ( ) const
inlineinherited

◆ getDistance()

double MSStageWaiting::getDistance ( ) const
inlinevirtual

get travel distance in this stage

Implements MSStage.

Definition at line 395 of file MSStage.h.

◆ getEdge()

const MSEdge * MSStage::getEdge ( ) const
virtualinherited

Returns the current edge.

Reimplemented in MSStageDriving, MSStageMoving, and MSStageTrip.

Definition at line 76 of file MSStage.cpp.

References MSStage::myDestination.

Referenced by GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSPerson::MSPersonStage_Walking::proceed(), proceed(), MSStageDriving::proceed(), MSTransportable::proceed(), and MSStageDriving::routeOutput().

Here is the caller graph for this function:

◆ getEdgeAngle()

double MSStage::getEdgeAngle ( const MSEdge e,
double  at 
) const
inherited

get angle of the edge at a certain position

Definition at line 153 of file MSStage.cpp.

References MSEdge::getLanes().

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

Here is the caller graph for this function:

◆ getEdgePos()

double MSStage::getEdgePos ( SUMOTime  now) const
virtualinherited

Reimplemented in MSStageDriving, MSStageMoving, and MSStageTrip.

Definition at line 88 of file MSStage.cpp.

References MSStage::myArrivalPos.

Referenced by MSEdge::transportable_by_position_sorter::operator()(), MSPerson::MSPersonStage_Walking::proceed(), MSStageDriving::proceed(), and MSStageTranship::proceed().

Here is the caller graph for this function:

◆ getEdgePosition()

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

get position on edge e at length at with orthogonal offset

Definition at line 142 of file MSStage.cpp.

References MSStage::getLanePosition(), and MSEdge::getLanes().

Referenced by MSStageTrip::getPosition(), getPosition(), and MSStageDriving::getPosition().

Here is the caller graph for this function:

◆ getEdges()

ConstMSEdgeVector MSStage::getEdges ( ) const
virtualinherited

the edges of the current stage

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 106 of file MSStage.cpp.

References MSStage::getDestination().

Referenced by LIBSUMO_NAMESPACE::Person::getStage(), LIBSUMO_NAMESPACE::Person::rerouteTraveltime(), and MSStageTrip::setArrived().

Here is the caller graph for this function:

◆ getFromEdge()

const MSEdge * MSStage::getFromEdge ( ) const
virtualinherited

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 82 of file MSStage.cpp.

References MSStage::myDestination.

Referenced by MSTransportable::rerouteParkingArea().

Here is the caller graph for this function:

◆ getGroup()

const std::string& MSStage::getGroup ( ) const
inlineinherited

return the id of the group of transportables traveling together

Definition at line 119 of file MSStage.h.

References MSStage::myGroup.

◆ getLane()

virtual const MSLane* MSStage::getLane ( ) const
inlinevirtualinherited

Returns the current lane (if applicable)

Reimplemented in MSStageMoving.

Definition at line 109 of file MSStage.h.

◆ getLanePosition()

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

get position on lane at length at with orthogonal offset

Definition at line 147 of file MSStage.cpp.

References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().

Referenced by MSPModel_NonInteracting::CState::computeDuration(), MSStage::getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().

Here is the caller graph for this function:

◆ getOriginStop()

virtual MSStoppingPlace* MSStage::getOriginStop ( ) const
inlinevirtualinherited

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

Reimplemented in MSStageDriving, and MSStageTrip.

Definition at line 85 of file MSStage.h.

Referenced by MSStageDriving::proceed().

Here is the caller graph for this function:

◆ getPosition()

Position MSStageWaiting::getPosition ( SUMOTime  now) const
virtual

returns the position of the transportable

Implements MSStage.

Definition at line 433 of file MSStage.cpp.

References MSStage::getEdgePosition(), MSGlobals::gLefthand, MSStage::myArrivalPos, MSStage::myDestination, and MSStage::ROADSIDE_OFFSET.

◆ getSpeed()

double MSStage::getSpeed ( ) const
virtualinherited

the speed of the transportable

Reimplemented in MSStageDriving, and MSStageMoving.

Definition at line 100 of file MSStage.cpp.

◆ getStageDescription()

std::string MSStageWaiting::getStageDescription ( const bool  isPerson) const
inlinevirtual

return (brief) string representation of the current stage

Implements MSStage.

Definition at line 401 of file MSStage.h.

References myActType, and UNUSED_PARAMETER.

◆ getStageSummary()

std::string MSStageWaiting::getStageSummary ( const bool  isPerson) const
virtual

return string summary of the current stage

Implements MSStage.

Definition at line 517 of file MSStage.cpp.

References MSStage::getDestination(), Named::getID(), myActType, myWaitingDuration, myWaitingUntil, and time2string().

◆ getStageType()

MSStageType MSStage::getStageType ( ) const
inlineinherited

Definition at line 114 of file MSStage.h.

References MSStage::myType.

Referenced by MSPerson::checkAccess(), LIBSUMO_NAMESPACE::Person::getStage(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), and MSStageDriving::routeOutput().

Here is the caller graph for this function:

◆ getUntil()

SUMOTime MSStageWaiting::getUntil ( ) const

Definition at line 427 of file MSStage.cpp.

References myWaitingUntil.

◆ getVehicle()

virtual SUMOVehicle* MSStage::getVehicle ( ) const
inlinevirtualinherited

Whether the transportable waits for a vehicle.

Reimplemented in MSStageDriving.

Definition at line 159 of file MSStage.h.

◆ getWaitingTime()

SUMOTime MSStageWaiting::getWaitingTime ( SUMOTime  now) const
virtual

the time this transportable spent waiting

Reimplemented from MSStage.

Definition at line 502 of file MSStage.cpp.

References MSStage::myDeparted.

◆ isWaiting4Vehicle()

virtual bool MSStage::isWaiting4Vehicle ( ) const
inlinevirtualinherited

Whether the transportable waits for a vehicle.

Reimplemented in MSStageDriving.

Definition at line 154 of file MSStage.h.

◆ isWaitingFor()

bool MSStage::isWaitingFor ( const SUMOVehicle vehicle) const
virtualinherited

Whether the transportable waits for the given vehicle.

Reimplemented in MSStageDriving.

Definition at line 137 of file MSStage.cpp.

◆ loadState()

virtual void MSStage::loadState ( MSTransportable transportable,
std::istringstream &  state 
)
inlinevirtualinherited

Reconstructs the current state, standard implementation does nothing.

Reimplemented in MSStageDriving, and MSPerson::MSPersonStage_Walking.

Definition at line 211 of file MSStage.h.

References UNUSED_PARAMETER.

◆ operator=()

MSStageWaiting& MSStageWaiting::operator= ( const MSStageWaiting )
privatedelete

Invalidated assignment operator.

◆ proceed()

◆ routeOutput()

void MSStageWaiting::routeOutput ( const bool  isPerson,
OutputDevice os,
const bool  withRouteLength,
const MSStage *const  previous 
) const
virtual

Called on writing vehroute output.

Parameters
[in]isPersonWhether we are writing person or container info
[in]osThe stream to write the information into
[in]withRouteLengthwhether route length shall be written
[in]previousThe previous stage for additional info such as from edge
Exceptions
IOErrornot yet implemented

Implements MSStage.

Definition at line 476 of file MSStage.cpp.

References OutputDevice::closeTag(), StringUtils::escapeXML(), MSStage::getArrivalPos(), MSStage::getDestination(), Named::getID(), MSStoppingPlace::getMyName(), MSStage::myDestinationStop, MSStage::myType, myWaitingDuration, myWaitingUntil, OutputDevice::openTag(), SUMO_ATTR_BUS_STOP, SUMO_ATTR_DURATION, SUMO_ATTR_ENDPOS, SUMO_ATTR_LANE, SUMO_ATTR_UNTIL, time2string(), WAITING_FOR_DEPART, and OutputDevice::writeAttr().

◆ saveState()

virtual void MSStage::saveState ( std::ostringstream &  out)
inlinevirtualinherited

Saves the current state into the given stream, standard implementation does nothing.

Reimplemented in MSStageDriving, and MSPerson::MSPersonStage_Walking.

Definition at line 205 of file MSStage.h.

References UNUSED_PARAMETER.

◆ setArrivalPos()

void MSStage::setArrivalPos ( double  arrivalPos)
inlineinherited

Definition at line 93 of file MSStage.h.

References MSStage::myArrivalPos.

Referenced by MSStageTrip::setArrived().

Here is the caller graph for this function:

◆ setArrived()

const std::string MSStage::setArrived ( MSNet net,
MSTransportable transportable,
SUMOTime  now,
const bool  vehicleArrived 
)
virtualinherited

logs end of the step

Reimplemented in MSStageDriving, and MSStageTrip.

Definition at line 131 of file MSStage.cpp.

References MSStage::myArrived.

Referenced by MSTransportable::proceed(), MSStageTrip::setArrived(), and MSStageDriving::setArrived().

Here is the caller graph for this function:

◆ setDeparted()

void MSStage::setDeparted ( SUMOTime  now)
inherited

logs end of the step

Definition at line 114 of file MSStage.cpp.

References MSStage::myDeparted.

◆ setDestination()

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

Definition at line 159 of file MSStage.cpp.

References MSStoppingPlace::getBeginLanePosition(), MSStoppingPlace::getEndLanePosition(), MSStage::myArrivalPos, MSStage::myDestination, and MSStage::myDestinationStop.

Referenced by MSTransportable::rerouteParkingArea().

Here is the caller graph for this function:

◆ setSpeed()

virtual void MSStage::setSpeed ( double  )
inlinevirtualinherited

sets the walking speed (ignored in other stages)

Reimplemented in MSPerson::MSPersonStage_Walking.

Definition at line 136 of file MSStage.h.

◆ tripInfoOutput()

void MSStageWaiting::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 MSStage.

Definition at line 463 of file MSStage.cpp.

References OutputDevice::closeTag(), myActType, MSStage::myArrivalPos, MSStage::myArrived, MSStage::myDeparted, MSStage::myType, OutputDevice::openTag(), time2string(), toString(), WAITING_FOR_DEPART, and OutputDevice::writeAttr().

Field Documentation

◆ myActType

std::string MSStageWaiting::myActType
private

The type of activity.

Definition at line 435 of file MSStage.h.

Referenced by clone(), getStageDescription(), getStageSummary(), and tripInfoOutput().

◆ myArrivalPos

◆ myArrived

◆ myDeparted

◆ myDestination

◆ myDestinationStop

◆ myGroup

const std::string MSStage::myGroup
protectedinherited

The id of the group of transportables traveling together.

Definition at line 236 of file MSStage.h.

Referenced by MSStageDriving::clone(), MSStage::getGroup(), and MSStageDriving::proceed().

◆ myType

MSStageType MSStage::myType
protectedinherited

The type of this stage.

Definition at line 233 of file MSStage.h.

Referenced by clone(), MSStage::getStageType(), routeOutput(), and tripInfoOutput().

◆ myWaitingDuration

SUMOTime MSStageWaiting::myWaitingDuration
private

the time the person is waiting

Definition at line 429 of file MSStage.h.

Referenced by clone(), getStageSummary(), proceed(), and routeOutput().

◆ myWaitingUntil

SUMOTime MSStageWaiting::myWaitingUntil
private

the time until the person is waiting

Definition at line 432 of file MSStage.h.

Referenced by clone(), getStageSummary(), getUntil(), proceed(), and routeOutput().

◆ ROADSIDE_OFFSET

const double MSStage::ROADSIDE_OFFSET
staticprotectedinherited

the offset for computing positions when standing at an edge

Definition at line 239 of file MSStage.h.

Referenced by MSStageTrip::getPosition(), getPosition(), and MSStageDriving::getPosition().


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