60template<
class E,
class V>
68 SUMOAbstractRouter<E, V>(
"CHRouterWrapper", ignoreErrors, operation, nullptr, havePermissions, false),
83 virtual void prohibit(
const std::map<const E*, RouterProhibition>& toProhibit)
override {
84 if (toProhibit.size() > 0) {
85 WRITE_WARNINGF(
TL(
"Routing algorithm CHWrapper does not support dynamic closing of edges%"),
"");
105 item.second->setMsgHandler(errorMsgHandler);
110 bool compute(
const E* from,
const E* to,
const V*
const vehicle,
111 SUMOTime msTime, std::vector<const E*>& into,
bool silent =
false)
override {
112 const std::pair<const SUMOVehicleClass, const double> svc = std::make_pair(vehicle->getVClass(), vehicle->getMaxSpeed());
119 return myRouters[svc]->compute(from, to, vehicle, msTime, into, silent);
#define WRITE_WARNINGF(...)
Computes the shortest path through a contracted network.
Computes the shortest path through a contracted network.
virtual SUMOAbstractRouter< E, V > * clone() override
void setMsgHandler(MsgHandler *const errorMsgHandler) override
bool supportsProhibitions() const override
const SUMOTime myWeightPeriod
const int myMaxNumInstances
CHRouter< E, V > CHRouterType
const bool myIgnoreErrors
CHRouterWrapper(const std::vector< E * > &edges, const bool ignoreErrors, typename SUMOAbstractRouter< E, V >::Operation operation, const SUMOTime begin, const SUMOTime end, const SUMOTime weightPeriod, bool havePermissions, const int numThreads)
Constructor.
std::map< std::pair< const SUMOVehicleClass, const double >, CHRouterType * > RouterMap
bool compute(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into, bool silent=false) override
Builds the route between the given edges using the minimum effort at the given time The definition of...
virtual void prohibit(const std::map< const E *, RouterProhibition > &toProhibit) override
const std::vector< E * > & myEdges
all edges with numerical ids
const bool myHavePermissions
whether edge permissions need to be considered
Operation myOperation
The object's operation to perform.
MsgHandler * myErrorMsgHandler
the handler for routing errors