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

#include <MSTransportable.h>

Inheritance diagram for MSTransportable::Stage_Trip:
Collaboration diagram for MSTransportable::Stage_Trip:

Public Member Functions

virtual 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...
 
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...
 
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...
 
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
 
virtual SUMOVehiclegetVehicle () const
 Whether the transportable waits for a vehicle. More...
 
virtual 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)
 
void setOrigin (const MSEdge *origin)
 change origin for parking area rerouting More...
 
virtual void setSpeed (double)
 sets the walking speed (ignored in other stages) More...
 
 Stage_Trip (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 double departPosLat, const bool hasArrivalPos, const double arrivalPos)
 constructor More...
 
virtual void tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const
 Called on writing tripinfo output. More...
 
virtual ~Stage_Trip ()
 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_Tripoperator= (const Stage_Trip &)
 Invalidated assignment operator. More...
 
 Stage_Trip (const Stage_Trip &)
 Invalidated copy constructor. More...
 

Private Attributes

double myDepartPos
 The depart position. More...
 
const double myDepartPosLat
 The lateral depart position. More...
 
SUMOTime myDuration
 the time the trip should take (applies to only walking) More...
 
const bool myHaveArrivalPos
 whether an arrivalPos was in the input More...
 
const SVCPermissions myModeSet
 The allowed modes of transportation. More...
 
const MSEdgemyOrigin
 the origin edge More...
 
const MSStoppingPlacemyOriginStop
 the origin edge More...
 
const double mySpeed
 The walking speed. More...
 
const std::string myVTypes
 The possible vehicles to use. More...
 
const double myWalkFactor
 The factor to apply to walking durations. More...
 

Detailed Description

A "placeholder" stage storing routing info which will result in real stages when routed

Definition at line 232 of file MSTransportable.h.

Constructor & Destructor Documentation

◆ Stage_Trip() [1/2]

MSTransportable::Stage_Trip::Stage_Trip ( 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 double  departPosLat,
const bool  hasArrivalPos,
const double  arrivalPos 
)

constructor

Definition at line 152 of file MSTransportable.cpp.

◆ ~Stage_Trip()

MSTransportable::Stage_Trip::~Stage_Trip ( )
virtual

destructor

Definition at line 170 of file MSTransportable.cpp.

◆ Stage_Trip() [2/2]

MSTransportable::Stage_Trip::Stage_Trip ( const Stage_Trip )
private

Invalidated copy constructor.

Member Function Documentation

◆ abort()

virtual void MSTransportable::Stage::abort ( MSTransportable )
inlinevirtualinherited

◆ beginEventOutput()

void MSTransportable::Stage_Trip::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 341 of file MSTransportable.cpp.

◆ clone()

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

Implements MSTransportable::Stage.

Definition at line 173 of file MSTransportable.cpp.

◆ endEventOutput()

void MSTransportable::Stage_Trip::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 346 of file MSTransportable.cpp.

◆ getAngle()

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

returns the angle of the transportable

Implements MSTransportable::Stage.

Definition at line 188 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_Trip::getDistance ( ) const
inlinevirtual

get travel distance in this stage

Implements MSTransportable::Stage.

Definition at line 258 of file MSTransportable.h.

◆ getEdge()

const MSEdge * MSTransportable::Stage_Trip::getEdge ( ) const
virtual

Returns the current edge.

Reimplemented from MSTransportable::Stage.

Definition at line 195 of file MSTransportable.cpp.

◆ 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()

double MSTransportable::Stage_Trip::getEdgePos ( SUMOTime  now) const
virtual

Reimplemented from MSTransportable::Stage.

Definition at line 201 of file MSTransportable.cpp.

◆ 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()

const MSStoppingPlace* MSTransportable::Stage_Trip::getOriginStop ( ) const
inlinevirtual

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

Reimplemented from MSTransportable::Stage.

Definition at line 248 of file MSTransportable.h.

References myOriginStop.

◆ getPosition()

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

returns the position of the transportable

Implements MSTransportable::Stage.

Definition at line 181 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_Trip::getStageDescription ( ) const
inlinevirtual

return (brief) string representation of the current stage

Implements MSTransportable::Stage.

Definition at line 263 of file MSTransportable.h.

◆ getStageSummary()

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

return string summary of the current stage

Implements MSTransportable::Stage.

Definition at line 351 of file MSTransportable.cpp.

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

◆ getStageType()

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

◆ 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::getWaitingTime ( SUMOTime  now) const
virtualinherited

the time this transportable spent waiting

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

Definition at line 81 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_Trip& MSTransportable::Stage_Trip::operator= ( const Stage_Trip )
private

Invalidated assignment operator.

◆ proceed()

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

proceeds to the next step

Implements MSTransportable::Stage.

Definition at line 324 of file MSTransportable.cpp.

References MSTransportable::proceed().

◆ routeOutput()

void MSTransportable::Stage_Trip::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 336 of file MSTransportable.cpp.

◆ setArrived()

◆ 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

◆ setOrigin()

void MSTransportable::Stage_Trip::setOrigin ( const MSEdge origin)
inline

change origin for parking area rerouting

Definition at line 273 of file MSTransportable.h.

References myOrigin.

◆ 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_Trip::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 331 of file MSTransportable.cpp.

Field Documentation

◆ 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.

◆ myDepartPos

double MSTransportable::Stage_Trip::myDepartPos
private

The depart position.

Definition at line 329 of file MSTransportable.h.

◆ myDepartPosLat

const double MSTransportable::Stage_Trip::myDepartPosLat
private

The lateral depart position.

Definition at line 332 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().

◆ myDuration

SUMOTime MSTransportable::Stage_Trip::myDuration
private

the time the trip should take (applies to only walking)

Definition at line 314 of file MSTransportable.h.

◆ myHaveArrivalPos

const bool MSTransportable::Stage_Trip::myHaveArrivalPos
private

whether an arrivalPos was in the input

Definition at line 335 of file MSTransportable.h.

◆ myModeSet

const SVCPermissions MSTransportable::Stage_Trip::myModeSet
private

The allowed modes of transportation.

Definition at line 317 of file MSTransportable.h.

◆ myOrigin

const MSEdge* MSTransportable::Stage_Trip::myOrigin
private

the origin edge

Definition at line 308 of file MSTransportable.h.

Referenced by setOrigin().

◆ myOriginStop

const MSStoppingPlace* MSTransportable::Stage_Trip::myOriginStop
private

the origin edge

Definition at line 311 of file MSTransportable.h.

Referenced by getOriginStop().

◆ mySpeed

const double MSTransportable::Stage_Trip::mySpeed
private

The walking speed.

Definition at line 323 of file MSTransportable.h.

◆ myType

StageType MSTransportable::Stage::myType
protectedinherited

The type of this stage.

Definition at line 218 of file MSTransportable.h.

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

◆ myVTypes

const std::string MSTransportable::Stage_Trip::myVTypes
private

The possible vehicles to use.

Definition at line 320 of file MSTransportable.h.

◆ myWalkFactor

const double MSTransportable::Stage_Trip::myWalkFactor
private

The factor to apply to walking durations.

Definition at line 326 of file MSTransportable.h.


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