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

#include <MSTransportable.h>

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

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...
 
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
 
const MSEdgegetDestination () const
 returns the destination edge More...
 
MSStoppingPlacegetDestinationStop () const
 returns the destination stop (if any) 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...
 
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 std::string &line) const
 Whether the transportable waits for a vehicle of the line specified. 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 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, 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 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 216 of file MSTransportable.h.

Constructor & Destructor Documentation

◆ Stage_Trip() [1/2]

MSTransportable::Stage_Trip::Stage_Trip ( const MSEdge origin,
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 136 of file MSTransportable.cpp.

◆ ~Stage_Trip()

MSTransportable::Stage_Trip::~Stage_Trip ( )
virtual

destructor

Definition at line 150 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

abort this stage (TraCI)

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

Definition at line 118 of file MSTransportable.h.

◆ 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 303 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 308 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 160 of file MSTransportable.cpp.

◆ getArrivalPos()

◆ getDestination()

◆ getDestinationStop()

◆ getEdge()

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

Returns the current edge.

Reimplemented from MSTransportable::Stage.

Definition at line 166 of file MSTransportable.cpp.

References myOrigin.

◆ getEdgeAngle()

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

◆ getEdgePos()

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

Reimplemented from MSTransportable::Stage.

Definition at line 172 of file MSTransportable.cpp.

References myDepartPos.

◆ getEdgePosition()

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

◆ getEdges()

◆ getFromEdge()

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

◆ getLanePosition()

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

◆ getPosition()

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

returns the position of the transportable

Implements MSTransportable::Stage.

Definition at line 154 of file MSTransportable.cpp.

◆ getSpeed()

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

◆ getStageDescription()

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

return (brief) string representation of the current stage

Implements MSTransportable::Stage.

Definition at line 233 of file MSTransportable.h.

References MSTransportable::Stage::getStageSummary(), and MSTransportable::Stage::setArrived().

◆ getStageSummary()

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

return string summary of the current stage

Implements MSTransportable::Stage.

Definition at line 313 of file MSTransportable.cpp.

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

◆ getStageType()

◆ getVehicle()

◆ getWaitingTime()

SUMOTime MSTransportable::Stage::getWaitingTime ( SUMOTime  now) const
virtualinherited

◆ isWaiting4Vehicle()

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

Whether the transportable waits for a vehicle.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 133 of file MSTransportable.h.

◆ isWaitingFor()

bool MSTransportable::Stage::isWaitingFor ( const std::string &  line) const
virtualinherited

Whether the transportable waits for a vehicle of the line specified.

Reimplemented in MSTransportable::Stage_Driving.

Definition at line 113 of file MSTransportable.cpp.

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

◆ 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 286 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 298 of file MSTransportable.cpp.

◆ setArrived()

void MSTransportable::Stage_Trip::setArrived ( MSNet net,
MSTransportable transportable,
SUMOTime  now 
)
virtual

logs end of the step

Reimplemented from MSTransportable::Stage.

Definition at line 178 of file MSTransportable.cpp.

References MSVehicleControl::addVehicle(), MSTransportable::appendStage(), MSVehicleControl::buildVehicle(), IntermodalRouter< E, L, N, V >::compute(), DEFAULT_BIKETYPE_ID, MSVehicleControl::deleteVehicle(), SUMOVehicleParameter::depart, DEPART_POS_RANDOM, DEPART_TRIGGERED, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, MSGlobals::gCheckRoutes, MSStoppingPlace::getAccessPos(), MSTransportable::Stage::getArrivalPos(), MSTransportable::Stage::getDestinationStop(), MSTransportable::Stage::getEdge(), Named::getID(), MSVehicleType::getID(), MSTransportable::getID(), MSNet::getInstance(), MSNet::getIntermodalRouter(), MSEdge::getLength(), MSVehicleType::getMaxSpeed(), MSTransportable::getNextStage(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), MSTransportable::getParameter(), MSEdge::getPermissions(), MSNet::getStoppingPlace(), MSVehicleType::getVehicleClass(), MSNet::getVehicleControl(), MSTransportable::getVehicleType(), MSVehicleControl::getVType(), StringTokenizer::hasNext(), MSTransportable::Stage::myArrivalPos, myDepartPos, myDepartPosLat, MSTransportable::Stage::myDestination, MSTransportable::Stage::myDestinationStop, myDuration, myHaveArrivalPos, myModeSet, myOrigin, mySpeed, myVTypes, myWalkFactor, RandHelper::rand(), MSTransportable::Stage::setArrived(), SUMO_TAG_BUS_STOP, SVC_BICYCLE, SVC_IGNORING, SVC_PASSENGER, TIME2STEPS, toString(), VEHPARS_VTYPE_SET, and WRITE_WARNING.

◆ setDeparted()

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

logs end of the step

Definition at line 101 of file MSTransportable.cpp.

References MSTransportable::Stage::myDeparted.

Referenced by MSTransportable::getVehicleType(), and MSTransportable::Stage::setSpeed().

◆ setOrigin()

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

◆ setSpeed()

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

sets the walking speed (ignored in other stages)

Reimplemented in MSPerson::MSPersonStage_Walking.

Definition at line 121 of file MSTransportable.h.

References MSTransportable::Stage::isWaitingFor(), MSTransportable::Stage::setArrived(), and MSTransportable::Stage::setDeparted().

Referenced by MSTransportable::getVehicle().

◆ 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 293 of file MSTransportable.cpp.

Field Documentation

◆ myArrivalPos

◆ myArrived

◆ myDeparted

◆ myDepartPos

double MSTransportable::Stage_Trip::myDepartPos
private

The depart position.

Definition at line 296 of file MSTransportable.h.

Referenced by getEdgePos(), and setArrived().

◆ myDepartPosLat

const double MSTransportable::Stage_Trip::myDepartPosLat
private

The lateral depart position.

Definition at line 299 of file MSTransportable.h.

Referenced by setArrived().

◆ myDestination

◆ myDestinationStop

◆ myDuration

SUMOTime MSTransportable::Stage_Trip::myDuration
private

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

Definition at line 281 of file MSTransportable.h.

Referenced by setArrived().

◆ myHaveArrivalPos

const bool MSTransportable::Stage_Trip::myHaveArrivalPos
private

whether an arrivalPos was in the input

Definition at line 302 of file MSTransportable.h.

Referenced by setArrived().

◆ myModeSet

const SVCPermissions MSTransportable::Stage_Trip::myModeSet
private

The allowed modes of transportation.

Definition at line 284 of file MSTransportable.h.

Referenced by setArrived().

◆ myOrigin

const MSEdge* MSTransportable::Stage_Trip::myOrigin
private

the origin edge

Definition at line 278 of file MSTransportable.h.

Referenced by getEdge(), getStageSummary(), and setArrived().

◆ mySpeed

const double MSTransportable::Stage_Trip::mySpeed
private

The walking speed.

Definition at line 290 of file MSTransportable.h.

Referenced by setArrived().

◆ myType

StageType MSTransportable::Stage::myType
protectedinherited

◆ myVTypes

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

The possible vehicles to use.

Definition at line 287 of file MSTransportable.h.

Referenced by setArrived().

◆ myWalkFactor

const double MSTransportable::Stage_Trip::myWalkFactor
private

The factor to apply to walking durations.

Definition at line 293 of file MSTransportable.h.

Referenced by setArrived().


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