19 #ifndef MSDevice_Routing_h 20 #define MSDevice_Routing_h 158 void setParameter(
const std::string& key,
const std::string& value);
SUMOTime myPeriod
The period with which a vehicle shall be rerouted.
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key ...
SUMOTime mySkipRouting
The time for which routing may be skipped because we cannot be inserted.
SUMOTime myLastRouting
The last time a routing took place.
MSDevice_Routing(SUMOVehicle &holder, const std::string &id, SUMOTime period, SUMOTime preInsertionPeriod)
Constructor.
Notification
Definition of a vehicle state.
A device that performs vehicle rerouting based on current edge speeds.
const std::string deviceName() const
return the name for this type of device
SUMOTime myPreInsertionPeriod
The period with which a vehicle shall be rerouted before insertion.
void saveState(OutputDevice &out) const
Saves the state of the device.
SUMOTime wrappedRerouteCommandExecute(SUMOTime currentTime)
Performs rerouting after a period.
void skipRouting(const SUMOTime currentTime)
Labels the current time step as "unroutable".
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_Routing-options.
void reroute(const SUMOTime currentTime, const bool onInit=false)
initiate the rerouting, create router / thread pool on first use
Representation of a vehicle.
Encapsulated SAX-Attributes.
MSDevice_Routing & operator=(const MSDevice_Routing &)
Invalidated assignment operator.
WrappingCommand< MSDevice_Routing > * myRerouteCommand
The (optional) command responsible for rerouting.
A storage for options typed value containers)
Abstract in-vehicle device.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Computes a new route on vehicle insertion.
void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the device from the given description.
~MSDevice_Routing()
Destructor.
Static storage of an output device and its base (abstract) implementation.
static bool checkOptions(OptionsCont &oc)
checks MSDevice_Routing-options
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice *> &into)
Build devices for the given vehicle, if needed.
Representation of a lane in the micro simulation.
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key ...
SUMOTime preInsertionReroute(const SUMOTime currentTime)
Performs rerouting before insertion into the network.