45 #ifdef CHECK_MEMORY_LEAKS
47 #endif // CHECK_MEMORY_LEAKS
74 oc.
addSynonyme(
"device.rerouting.period",
"device.routing.period",
true);
75 oc.
addDescription(
"device.rerouting.period",
"Routing",
"The period with which the vehicle shall be rerouted");
78 oc.
addSynonyme(
"device.rerouting.pre-period",
"device.routing.pre-period",
true);
79 oc.
addDescription(
"device.rerouting.pre-period",
"Routing",
"The rerouting period before depart");
82 oc.
addSynonyme(
"device.rerouting.adaptation-weight",
"device.routing.adaptation-weight",
true);
83 oc.
addDescription(
"device.rerouting.adaptation-weight",
"Routing",
"The weight of prior edge weights");
86 oc.
addSynonyme(
"device.rerouting.adaptation-interval",
"device.routing.adaptation-interval",
true);
87 oc.
addDescription(
"device.rerouting.adaptation-interval",
"Routing",
"The interval for updating the edge weights");
90 oc.
addSynonyme(
"device.rerouting.with-taz",
"device.routing.with-taz",
true);
91 oc.
addDescription(
"device.rerouting.with-taz",
"Routing",
"Use zones (districts) as routing end points");
94 oc.
addDescription(
"device.rerouting.init-with-loaded-weights",
"Routing",
"Use given weight files for initializing edge weights");
105 if (!needRerouting && oc.
getFloat(
"device.rerouting.probability") == 0 && !oc.
isSet(
"device.rerouting.explicit")) {
117 into.push_back(device);
121 const bool useLoaded = oc.
getBool(
"device.rerouting.init-with-loaded-weights");
123 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
130 myEdgeEfforts[(*i)->getNumericalID()] = (*i)->getCurrentTravelTime();
161 :
MSDevice(holder, id), myPeriod(period), myPreInsertionPeriod(preInsertionPeriod), myRerouteCommand(0) {
207 if (source && dest) {
208 const std::pair<const MSEdge*, const MSEdge*> key = std::make_pair(source, dest);
240 std::map<std::pair<const MSEdge*, const MSEdge*>,
const MSRoute*>::iterator it =
myCachedRoutes.begin();
242 it->second->release();
247 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
248 const int id = (*i)->getNumericalID();
259 if (routingAlgorithm ==
"dijkstra") {
262 }
else if (routingAlgorithm ==
"astar") {
266 throw ProcessError(
"Unknown routing Algorithm '" + routingAlgorithm +
"'!");