 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef MSRoutingEngine_h
20 #define MSRoutingEngine_h
125 static void waitForAll();
129 static void unlock() {
130 myThreadPool.unlock();
132 static bool isParallel() {
133 return myThreadPool.size() > 0;
152 virtual ~WorkerThread() {
167 : myVehicle(v), myTime(time), myOnInit(onInit) {}
175 RoutingTask&
operator=(
const RoutingTask&);
static SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector())
return the router instance
static void reroute(SUMOVehicle &vehicle, const SUMOTime currentTime, const bool onInit)
initiate the rerouting, create router / thread pool on first use
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 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 int myAdaptationStepsIndex
The current index in the pastEdgeSpeed ring-buffer.
static bool myWithTaz
whether taz shall be used at initial rerouting
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 AStarRouter< MSEdge, SUMOVehicle, SUMOAbstractRouterPermissions< MSEdge, SUMOVehicle > > * myRouterWithProhibited
The router to use by rerouter elements.
static bool isEnabled()
returns whether any routing actions take place
static double getEffortExtra(const MSEdge *const e, const SUMOVehicle *const v, double t)
A pool of worker threads which distributes the tasks and collects the results.
Base (microsim) event class.
std::vector< MSEdge * > MSEdgeVector
Computes the shortest path through a network using the A* algorithm.
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.