Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSCalibrator::CalibratorCommand Class Reference

#include <MSCalibrator.h>

Inheritance diagram for MSCalibrator::CalibratorCommand:
[legend]
Collaboration diagram for MSCalibrator::CalibratorCommand:
[legend]

Public Member Functions

 CalibratorCommand (MSCalibrator *cali)
 
SUMOTime execute (SUMOTime currentTime)
 Executes the command.
 
SUMOTime shiftTime (SUMOTime currentTime, SUMOTime execTime, SUMOTime newTime)
 Reschedule or deschedule the command when quick-loading state.
 

Data Fields

int priority = 0
 

Private Attributes

MSCalibratormyCalibrator
 

Detailed Description

Definition at line 141 of file MSCalibrator.h.

Constructor & Destructor Documentation

◆ CalibratorCommand()

MSCalibrator::CalibratorCommand::CalibratorCommand ( MSCalibrator cali)
inline

Definition at line 143 of file MSCalibrator.h.

Member Function Documentation

◆ execute()

SUMOTime MSCalibrator::CalibratorCommand::execute ( SUMOTime  currentTime)
inlinevirtual

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 146 of file MSCalibrator.h.

References MSCalibrator::execute(), and myCalibrator.

◆ shiftTime()

SUMOTime MSCalibrator::CalibratorCommand::shiftTime ( SUMOTime  currentTime,
SUMOTime  execTime,
SUMOTime  newTime 
)
virtual

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 from Command.

Definition at line 64 of file MSCalibrator.cpp.

References myCalibrator, MSCalibrator::myCurrentStateInterval, MSCalibrator::myIntervals, and UNUSED_PARAMETER.

Field Documentation

◆ myCalibrator

MSCalibrator* MSCalibrator::CalibratorCommand::myCalibrator
private

Definition at line 164 of file MSCalibrator.h.

Referenced by execute(), and shiftTime().

◆ priority

int Command::priority = 0
inherited

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