44 #ifdef CHECK_MEMORY_LEAKS
46 #endif // CHECK_MEMORY_LEAKS
74 oc.
addSynonyme(
"device.rerouting.probability",
"device.routing.probability",
true);
75 oc.
addDescription(
"device.rerouting.probability",
"Routing",
"The probability for a vehicle to have a routing device");
78 oc.
addSynonyme(
"device.rerouting.explicit",
"device.routing.knownveh",
true);
79 oc.
addDescription(
"device.rerouting.explicit",
"Routing",
"Assign a device to named vehicles");
82 oc.
addSynonyme(
"device.rerouting.deterministic",
"device.routing.deterministic",
true);
83 oc.
addDescription(
"device.rerouting.deterministic",
"Routing",
"The devices are set deterministic using a fraction of 1000");
86 oc.
addSynonyme(
"device.rerouting.period",
"device.routing.period",
true);
87 oc.
addDescription(
"device.rerouting.period",
"Routing",
"The period with which the vehicle shall be rerouted");
90 oc.
addSynonyme(
"device.rerouting.pre-period",
"device.routing.pre-period",
true);
91 oc.
addDescription(
"device.rerouting.pre-period",
"Routing",
"The rerouting period before depart");
94 oc.
addSynonyme(
"device.rerouting.adaptation-weight",
"device.routing.adaptation-weight",
true);
95 oc.
addDescription(
"device.rerouting.adaptation-weight",
"Routing",
"The weight of prior edge weights.");
98 oc.
addSynonyme(
"device.rerouting.adaptation-interval",
"device.routing.adaptation-interval",
true);
99 oc.
addDescription(
"device.rerouting.adaptation-interval",
"Routing",
"The interval for updating the edge weights.");
102 oc.
addSynonyme(
"device.rerouting.with-taz",
"device.routing.with-taz",
true);
103 oc.
addDescription(
"device.rerouting.with-taz",
"Routing",
"Use zones (districts) as routing end points");
106 oc.
addDescription(
"device.rerouting.init-with-loaded-weights",
"Routing",
"Use given weight files for initializing edge weights");
117 if (!needRerouting && oc.
getFloat(
"device.rerouting.probability") == 0 && !oc.
isSet(
"device.rerouting.explicit")) {
122 bool haveByNumber =
false;
123 if (oc.
getBool(
"device.rerouting.deterministic")) {
135 if (needRerouting || haveByNumber || haveByName) {
140 into.push_back(device);
144 const bool useLoaded = oc.
getBool(
"device.rerouting.init-with-loaded-weights");
146 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
181 :
MSDevice(holder, id), myPeriod(period), myPreInsertionPeriod(preInsertionPeriod), myRerouteCommand(0) {
227 if (source && dest) {
228 const std::pair<const MSEdge*, const MSEdge*> key = std::make_pair(source, dest);
259 std::map<std::pair<const MSEdge*, const MSEdge*>,
const MSRoute*>::iterator it =
myCachedRoutes.begin();
261 it->second->release();
266 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
277 if (routingAlgorithm ==
"dijkstra") {
280 }
else if (routingAlgorithm ==
"astar") {
284 throw ProcessError(
"Unknown routing Algorithm '" + routingAlgorithm +
"'!");