168 void setParameter(
const std::string& key,
const std::string& value);
A device that performs vehicle rerouting based on current edge speeds.
const std::string deviceName() const
return the name for this type of device
void saveState(OutputDevice &out) const
Saves the state of the device.
SUMOTime getPeriod() const
void rebuildRerouteCommand(SUMOTime start)
rebuild reroute command according to period
SUMOTime wrappedRerouteCommandExecute(SUMOTime currentTime)
Performs rerouting after a period.
bool sufficientSaving(double oldCost, double newCost)
whether the change in saving is enough to trigger rerouting
SUMOTime mySkipRouting
The time for which routing may be skipped because we cannot be inserted.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_Routing-options.
void setActive(bool active)
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
bool myActive
Whether the equipped vehicle may perform rerouting.
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Computes a new route on vehicle insertion.
SUMOTime myPreInsertionPeriod
The period with which a vehicle shall be rerouted before insertion.
SUMOTime myPeriod
The period with which a vehicle shall be rerouted.
void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the device from the given description.
void reroute(const SUMOTime currentTime, const bool onInit=false)
initiate the rerouting, create router / thread pool on first use
bool myRerouteRailSignal
Whether the equipped vehicle may receive dispatch information at a rail signal.
bool mayRerouteRailSignal() const
return whether the equipped vehicle may receive dispatch information at a rail signal
MSDevice_Routing(const MSDevice_Routing &)
Invalidated copy constructor.
WrappingCommand< MSDevice_Routing > * myRerouteCommand
The (optional) command responsible for rerouting.
void skipRouting(const SUMOTime currentTime)
Labels the current time step as "unroutable".
~MSDevice_Routing()
Destructor.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
SUMOTime myLastLaneEntryTime
the previous time that a vehicle entered a lane
SUMOTime myLastRouting
The last time a routing took place.
void notifyStopEnded()
called to do the rerouting we missed whuile stopping
bool myRerouteAfterStop
Whether the equipped vehicle missed a reroute while stopping and should do so after the stop has ende...
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key
MSDevice_Routing & operator=(const MSDevice_Routing &)
Invalidated assignment operator.
SUMOTime preInsertionReroute(const SUMOTime currentTime)
Performs rerouting before insertion into the network.
Representation of a lane in the micro simulation.
Notification
Definition of a vehicle state.
Abstract in-vehicle device.
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
Encapsulated SAX-Attributes.
Representation of a vehicle, person, or container.
Representation of a vehicle.