44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
73 oc.
addSynonyme(
"device.rerouting.period",
"device.routing.period",
true);
74 oc.
addDescription(
"device.rerouting.period",
"Routing",
"The period with which the vehicle shall be rerouted");
77 oc.
addSynonyme(
"device.rerouting.pre-period",
"device.routing.pre-period",
true);
78 oc.
addDescription(
"device.rerouting.pre-period",
"Routing",
"The rerouting period before depart");
81 oc.
addSynonyme(
"device.rerouting.adaptation-weight",
"device.routing.adaptation-weight",
true);
82 oc.
addDescription(
"device.rerouting.adaptation-weight",
"Routing",
"The weight of prior edge weights.");
85 oc.
addSynonyme(
"device.rerouting.adaptation-interval",
"device.routing.adaptation-interval",
true);
86 oc.
addDescription(
"device.rerouting.adaptation-interval",
"Routing",
"The interval for updating the edge weights.");
89 oc.
addSynonyme(
"device.rerouting.with-taz",
"device.routing.with-taz",
true);
90 oc.
addDescription(
"device.rerouting.with-taz",
"Routing",
"Use zones (districts) as routing end points");
93 oc.
addDescription(
"device.rerouting.init-with-loaded-weights",
"Routing",
"Use given weight files for initializing edge weights");
104 if(!needRerouting && oc.
getFloat(
"device.rerouting.probability") == 0 && !oc.
isSet(
"device.rerouting.explicit")) {
116 into.push_back(device);
120 const bool useLoaded = oc.
getBool(
"device.rerouting.init-with-loaded-weights");
122 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
157 :
MSDevice(holder, id), myPeriod(period), myPreInsertionPeriod(preInsertionPeriod), myRerouteCommand(0) {
203 if (source && dest) {
204 const std::pair<const MSEdge*, const MSEdge*> key = std::make_pair(source, dest);
235 std::map<std::pair<const MSEdge*, const MSEdge*>,
const MSRoute*>::iterator it =
myCachedRoutes.begin();
237 it->second->release();
242 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
253 if (routingAlgorithm ==
"dijkstra") {
256 }
else if (routingAlgorithm ==
"astar") {
260 throw ProcessError(
"Unknown routing Algorithm '" + routingAlgorithm +
"'!");