Eclipse SUMO - Simulation of Urban MObility
MSStageDriving::BookReservation Class Reference
Inheritance diagram for MSStageDriving::BookReservation:
[legend]
Collaboration diagram for MSStageDriving::BookReservation:
[legend]

Public Member Functions

 BookReservation (MSTransportable *transportable, SUMOTime earliestPickupTime, MSStageDriving *stage)
 
SUMOTime execute (SUMOTime currentTime)
 Executes the command. More...
 
virtual SUMOTime shiftTime (SUMOTime, SUMOTime, SUMOTime)
 Reschedule or deschedule the command when quick-loading state. More...
 

Data Fields

SUMOTime myEarliestPickupTime
 
MSStageDrivingmyStage
 
MSTransportablemyTransportable
 
double myWaitingPos
 
int priority = 0
 

Detailed Description

Definition at line 235 of file MSStageDriving.h.

Constructor & Destructor Documentation

◆ BookReservation()

MSStageDriving::BookReservation::BookReservation ( MSTransportable transportable,
SUMOTime  earliestPickupTime,
MSStageDriving stage 
)
inline

Definition at line 237 of file MSStageDriving.h.

Member Function Documentation

◆ execute()

SUMOTime MSStageDriving::BookReservation::execute ( SUMOTime  currentTime)
virtual

Executes the command.

The implementations should return 0 if the command shall not be repeated, or a value larger than 0 that describe the time after which the command shall be executed again. Values below 0 must not be returned.

Parameters
[in]currentTimeThe current simulation time
Returns
The time after which the command shall be executed again, 0 if this command shall be descheduled.
Exceptions
ProcessErrorDerived actions may throw this exception

Implements Command.

Definition at line 675 of file MSStageDriving.cpp.

References MSDevice_Taxi::addReservation(), MSStageDriving::getArrivalPos(), MSStage::getDestination(), MSStageDriving::getLines(), MSStage::myDestinationStop, myEarliestPickupTime, MSStage::myGroup, MSStageDriving::myOrigin, MSStageDriving::myOriginStop, myStage, myTransportable, and MSStageDriving::myWaitingPos.

◆ shiftTime()

virtual SUMOTime Command::shiftTime ( SUMOTime  ,
SUMOTime  ,
SUMOTime   
)
inlinevirtualinherited

Reschedule or deschedule the command when quick-loading state.

The implementations should return -1 if the command shall not be re-scheduled, or a value >= 0 that describe the new time at which the command shall be executed again.

Parameters
[in]currentTimeThe current simulation time
[in]execTimeThe time at which the command would have been executed
[in]newTimeThe simulation time at which the simulation is restarted
Returns
The time at which the command shall be executed again

Reimplemented in MSCalibrator::CalibratorCommand, and MSTrafficLightLogic::SwitchCommand.

Definition at line 83 of file Command.h.

Field Documentation

◆ myEarliestPickupTime

SUMOTime MSStageDriving::BookReservation::myEarliestPickupTime

Definition at line 243 of file MSStageDriving.h.

Referenced by execute().

◆ myStage

MSStageDriving* MSStageDriving::BookReservation::myStage

Definition at line 244 of file MSStageDriving.h.

Referenced by execute().

◆ myTransportable

MSTransportable* MSStageDriving::BookReservation::myTransportable

Definition at line 242 of file MSStageDriving.h.

Referenced by execute().

◆ myWaitingPos

double MSStageDriving::BookReservation::myWaitingPos

Definition at line 245 of file MSStageDriving.h.

Referenced by MSStageDriving::registerWaiting().

◆ priority

int Command::priority = 0
inherited

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