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

Public Member Functions

void abortWalk ()
 
SUMOTime execute (SUMOTime currentTime)
 Executes the command. More...
 
const MSTransportablegetTransportable () const
 
 MoveToNextEdge (MSTransportable *transportable, MSStageMoving &walk, MSPModel_NonInteracting *model)
 
virtual SUMOTime shiftTime (SUMOTime, SUMOTime, SUMOTime)
 Reschedule or deschedule the command when quick-loading state. More...
 

Data Fields

int priority = 0
 

Private Member Functions

MoveToNextEdgeoperator= (const MoveToNextEdge &)
 Invalidated assignment operator. More...
 

Private Attributes

MSPModel_NonInteractingmyModel
 
MSStageMovingmyParent
 
MSTransportablemyTransportable
 

Detailed Description

Definition at line 82 of file MSPModel_NonInteracting.h.

Constructor & Destructor Documentation

◆ MoveToNextEdge()

MSPModel_NonInteracting::MoveToNextEdge::MoveToNextEdge ( MSTransportable transportable,
MSStageMoving walk,
MSPModel_NonInteracting model 
)
inline

Definition at line 84 of file MSPModel_NonInteracting.h.

Member Function Documentation

◆ abortWalk()

void MSPModel_NonInteracting::MoveToNextEdge::abortWalk ( )
inline

Definition at line 87 of file MSPModel_NonInteracting.h.

References myTransportable.

◆ execute()

SUMOTime MSPModel_NonInteracting::MoveToNextEdge::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 100 of file MSPModel_NonInteracting.cpp.

References MSStageMoving::activateEntryReminders(), MSTransportableStateAdapter::getDirection(), MSStageMoving::getEdge(), MSStageMoving::getPState(), MSStageMoving::moveToNextEdge(), myModel, myParent, myTransportable, and MSPModel_NonInteracting::registerArrived().

◆ getTransportable()

const MSTransportable* MSPModel_NonInteracting::MoveToNextEdge::getTransportable ( ) const
inline

Definition at line 90 of file MSPModel_NonInteracting.h.

References myTransportable.

◆ operator=()

MoveToNextEdge& MSPModel_NonInteracting::MoveToNextEdge::operator= ( const MoveToNextEdge )
private

Invalidated assignment operator.

◆ 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

◆ myModel

MSPModel_NonInteracting* MSPModel_NonInteracting::MoveToNextEdge::myModel
private

Definition at line 97 of file MSPModel_NonInteracting.h.

Referenced by execute().

◆ myParent

MSStageMoving& MSPModel_NonInteracting::MoveToNextEdge::myParent
private

Definition at line 95 of file MSPModel_NonInteracting.h.

Referenced by execute().

◆ myTransportable

MSTransportable* MSPModel_NonInteracting::MoveToNextEdge::myTransportable
private

Definition at line 96 of file MSPModel_NonInteracting.h.

Referenced by abortWalk(), execute(), and getTransportable().

◆ priority

int Command::priority = 0
inherited

Definition at line 87 of file Command.h.

Referenced by MSTrafficLightLogic::SwitchCommand::SwitchCommand().


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