Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ROCCHMetrics Class Reference

function-pointer front end of the router applications' STATIC metric family More...

#include <ROCCHMetrics.h>

Collaboration diagram for ROCCHMetrics:
[legend]

Static Public Member Functions

static const RoutingKit::CustomizableContractionHierarchyMetricget (SUMOVehicleClass vClass, SUMOTime time, const ROVehicle *veh)
 the metric for the vehicle's type at a query time, built on first use; matches CCHRouter::MetricProvider
 
static void init (const ROCCHGraph *graph, ROCCHGraph::EffortOperation effort, SUMOTime begin, SUMOTime weightPeriod)
 install the shared graph, effort function and weight-period grid (call once, before routing); weightPeriod SUMOTime_MAX = static
 
static SUMOTime periodEnd (SUMOTime time)
 the end of the weight period containing the given time (SUMOTime_MAX when the weights are static); CCHRouter's PeriodEnd hook
 
static void reset (const ROVehicle *veh)
 the edge weights changed behind the metrics (marouter after an assignment iteration, through CCHRouter::reset): every metric is refilled and re-customized on the next query; CCHRouter's ResetHook
 

Static Private Member Functions

static void patchRestrictions (const ROCCHGraph *graph, const ROVehicle *veh, std::vector< unsigned > &weights)
 post-fill hook: mask the edges that restrict the querying vehicle's type to inf_weight (restriction-params)
 

Static Private Attributes

static ROCCHMetricFamilymyFamily = nullptr
 

Detailed Description

function-pointer front end of the router applications' STATIC metric family

Definition at line 56 of file ROCCHMetrics.h.

Member Function Documentation

◆ get()

const RoutingKit::CustomizableContractionHierarchyMetric * ROCCHMetrics::get ( SUMOVehicleClass  vClass,
SUMOTime  time,
const ROVehicle veh 
)
static

the metric for the vehicle's type at a query time, built on first use; matches CCHRouter::MetricProvider

Definition at line 49 of file ROCCHMetrics.cpp.

References CCHMetricFamily< E, V, K >::get(), RORoutable::getType(), and myFamily.

Referenced by computeRoutes(), and computeRoutes().

Here is the caller graph for this function:

◆ init()

void ROCCHMetrics::init ( const ROCCHGraph graph,
ROCCHGraph::EffortOperation  effort,
SUMOTime  begin,
SUMOTime  weightPeriod 
)
static

install the shared graph, effort function and weight-period grid (call once, before routing); weightPeriod SUMOTime_MAX = static

Definition at line 37 of file ROCCHMetrics.cpp.

References graph, myFamily, and patchRestrictions().

Referenced by computeRoutes(), and computeRoutes().

Here is the caller graph for this function:

◆ patchRestrictions()

void ROCCHMetrics::patchRestrictions ( const ROCCHGraph graph,
const ROVehicle veh,
std::vector< unsigned > &  weights 
)
staticprivate

post-fill hook: mask the edges that restrict the querying vehicle's type to inf_weight (restriction-params)

Definition at line 75 of file ROCCHMetrics.cpp.

References ROEdge::getAllEdges(), RORoutable::getType(), graph, RoutingKit::inf_weight, and SUMOVTypeParameter::paramRestrictions.

Referenced by init().

Here is the caller graph for this function:

◆ periodEnd()

SUMOTime ROCCHMetrics::periodEnd ( SUMOTime  time)
static

the end of the weight period containing the given time (SUMOTime_MAX when the weights are static); CCHRouter's PeriodEnd hook

Definition at line 61 of file ROCCHMetrics.cpp.

References myFamily, CCHMetricFamily< E, V, K >::periodEnd(), and SUMOTime_MAX.

Referenced by computeRoutes().

Here is the caller graph for this function:

◆ reset()

void ROCCHMetrics::reset ( const ROVehicle veh)
static

the edge weights changed behind the metrics (marouter after an assignment iteration, through CCHRouter::reset): every metric is refilled and re-customized on the next query; CCHRouter's ResetHook

Definition at line 67 of file ROCCHMetrics.cpp.

References CCHMetricFamily< E, V, K >::flagStale(), and myFamily.

Referenced by computeRoutes().

Here is the caller graph for this function:

Field Documentation

◆ myFamily

ROCCHMetricFamily * ROCCHMetrics::myFamily = nullptr
staticprivate

Definition at line 83 of file ROCCHMetrics.h.

Referenced by get(), init(), periodEnd(), and reset().


The documentation for this class was generated from the following files: