 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef MSRoutingEngine_h
19 #define MSRoutingEngine_h
127 static void waitForAll();
140 const bool onInit,
const bool silent,
const MSEdgeVector& prohibited)
141 : myVehicle(v), myTime(time), myInfo(info), myOnInit(onInit), mySilent(silent), myProhibited(prohibited) {}
146 const std::string myInfo;
152 RoutingTask&
operator=(
const RoutingTask&) =
delete;
209 static FXMutex myRouteCacheMutex;
static double myAdaptationWeight
Information which weight prior edge efforts have.
static SUMOTime getLastAdaptation()
Information when the last edge weight adaptation occurred.
static Command * myEdgeWeightSettingCommand
The weights adaptation/overwriting command.
MSRoutingEngine(const MSRoutingEngine &)
Invalidated copy constructor.
static SUMOAbstractRouter< MSEdge, SUMOVehicle > * myRouter
The router to use.
static std::map< std::pair< const MSEdge *, const MSEdge * >, const MSRoute * > myCachedRoutes
The container of pre-calculated routes.
Representation of a vehicle.
static double getAssumedSpeed(const MSEdge *edge)
return current travel speed assumption
static std::vector< double > myEdgeSpeeds
The container of edge speeds.
static SUMOTime adaptEdgeEfforts(SUMOTime currentTime)
Adapt edge efforts by the current edge states.
static SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const int rngIndex, const MSEdgeVector &prohibited=MSEdgeVector())
return the router instance
static SUMOTime myLastAdaptation
Information when the last edge weight adaptation occurred.
static void setEdgeTravelTime(const MSEdge *const edge, const double travelTime)
adapt the known travel time for an edge
static void cleanup()
deletes the router instance
static void initEdgeWeights()
initialize the edge weights if not done before
static double getEffort(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the effort to pass an edge.
static void reroute(SUMOVehicle &vehicle, const SUMOTime currentTime, const std::string &info, const bool onInit=false, const bool silent=false, const MSEdgeVector &prohibited=MSEdgeVector())
initiate the rerouting, create router / thread pool on first use
static int myAdaptationStepsIndex
The current index in the pastEdgeSpeed ring-buffer.
static bool myWithTaz
whether taz shall be used at initial rerouting
static void initRouter(SUMOVehicle *vehicle=nullptr)
static SUMOTime myAdaptationInterval
At which time interval the edge weights get updated.
A road/street connecting two junctions.
static std::vector< std::vector< double > > myPastEdgeSpeeds
The container of edge speeds.
static void initWeightUpdate()
intialize period edge weight update
static bool hasEdgeUpdates()
returns whether any routing actions take place
static bool isEnabled()
returns whether any routing actions take place
static double getEffortExtra(const MSEdge *const e, const SUMOVehicle *const v, double t)
Base (microsim) event class.
std::vector< MSEdge * > MSEdgeVector
static int myAdaptationSteps
The number of steps for averaging edge speeds (ring-buffer)
static SUMOAbstractRouter< MSEdge, SUMOVehicle >::Operation myEffortFunc
Abstract superclass of a task to be run with an index to keep track of pending tasks.
static const MSRoute * getCachedRoute(const std::pair< const MSEdge *, const MSEdge * > &key)
return the cached route or nullptr on miss
MSRoutingEngine & operator=(const MSRoutingEngine &)
Invalidated assignment operator.
A device that performs vehicle rerouting based on current edge speeds.
A thread repeatingly calculating incoming tasks.