Eclipse SUMO - Simulation of Urban MObility
|
Writes the state of the tls to a file (in each second) More...
#include <Command_RouteReplacement.h>
Public Member Functions | |
Command_RouteReplacement (const std::string &vehID, ConstMSRoutePtr route) | |
Constructor. | |
virtual SUMOTime | shiftTime (SUMOTime, SUMOTime, SUMOTime) |
Reschedule or deschedule the command when quick-loading state. | |
~Command_RouteReplacement () | |
Destructor. | |
Derived from Command | |
SUMOTime | execute (SUMOTime currentTime) |
toggles override | |
Data Fields | |
int | priority = 0 |
Private Member Functions | |
Command_RouteReplacement (const Command_RouteReplacement &) | |
Invalidated copy constructor. | |
Command_RouteReplacement & | operator= (const Command_RouteReplacement &) |
Invalidated assignment operator. | |
Private Attributes | |
ConstMSRoutePtr | myRoute |
The replacement route. | |
std::string | myVehID |
The id of the vehicle to be rerouted. | |
Writes the state of the tls to a file (in each second)
Definition at line 41 of file Command_RouteReplacement.h.
Command_RouteReplacement::Command_RouteReplacement | ( | const std::string & | vehID, |
ConstMSRoutePtr | route | ||
) |
Constructor.
[in] | tlls | The logic to write state of |
[in] | od | The output device to write the state into |
Definition at line 34 of file Command_RouteReplacement.cpp.
Command_RouteReplacement::~Command_RouteReplacement | ( | ) |
Destructor.
Definition at line 40 of file Command_RouteReplacement.cpp.
|
private |
Invalidated copy constructor.
toggles override
Returns always 1.
[in] | currentTime | The current simulation time (unused) |
Implements Command.
Definition at line 44 of file Command_RouteReplacement.cpp.
References MSGlobals::gCheckRoutes, Named::getID(), MSNet::getInstance(), SUMOTrafficObject::getLane(), MSRoute::getReplacedIndex(), SUMOVehicle::getRoute(), MSVehicleControl::getVehicle(), MSNet::getVehicleControl(), SUMOVehicle::hasValidRoute(), myRoute, myVehID, SUMOTrafficObject::replaceRoute(), SIMSTEP, time2string(), and WRITE_WARNING.
|
private |
Invalidated assignment operator.
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.
[in] | currentTime | The current simulation time |
[in] | execTime | The time at which the command would have been executed |
[in] | newTime | The simulation time at which the simulation is restarted |
Reimplemented in MSTrafficLightLogic::SwitchCommand, and MSCalibrator::CalibratorCommand.
|
private |
The replacement route.
Definition at line 74 of file Command_RouteReplacement.h.
Referenced by execute().
|
private |
The id of the vehicle to be rerouted.
Definition at line 71 of file Command_RouteReplacement.h.
Referenced by execute().
|
inherited |
Definition at line 87 of file Command.h.
Referenced by MSTransportableDevice_FCDReplay::MovePedestrians::MovePedestrians(), and MSTrafficLightLogic::SwitchCommand::SwitchCommand().