43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
71 oc.
addSynonyme(
"device.rerouting.probability",
"device.routing.probability",
true);
72 oc.
addDescription(
"device.rerouting.probability",
"Routing",
"The probability for a vehicle to have a routing device");
75 oc.
addSynonyme(
"device.rerouting.explicit",
"device.routing.knownveh",
true);
76 oc.
addDescription(
"device.rerouting.explicit",
"Routing",
"Assign a device to named vehicles");
79 oc.
addSynonyme(
"device.rerouting.deterministic",
"device.routing.deterministic",
true);
80 oc.
addDescription(
"device.rerouting.deterministic",
"Routing",
"The devices are set deterministic using a fraction of 1000");
83 oc.
addSynonyme(
"device.rerouting.period",
"device.routing.period",
true);
84 oc.
addDescription(
"device.rerouting.period",
"Routing",
"The period with which the vehicle shall be rerouted");
87 oc.
addSynonyme(
"device.rerouting.pre-period",
"device.routing.pre-period",
true);
88 oc.
addDescription(
"device.rerouting.pre-period",
"Routing",
"The rerouting period before depart");
91 oc.
addSynonyme(
"device.rerouting.adaptation-weight",
"device.routing.adaptation-weight",
true);
92 oc.
addDescription(
"device.rerouting.adaptation-weight",
"Routing",
"The weight of prior edge weights.");
95 oc.
addSynonyme(
"device.rerouting.adaptation-interval",
"device.routing.adaptation-interval",
true);
96 oc.
addDescription(
"device.rerouting.adaptation-interval",
"Routing",
"The interval for updating the edge weights.");
99 oc.
addSynonyme(
"device.rerouting.with-taz",
"device.routing.with-taz",
true);
100 oc.
addDescription(
"device.rerouting.with-taz",
"Routing",
"Use zones (districts) as routing end points");
111 if (!needRerouting && oc.
getFloat(
"device.rerouting.probability") == 0 && !oc.
isSet(
"device.rerouting.explicit")) {
116 bool haveByNumber =
false;
117 if (oc.
getBool(
"device.rerouting.deterministic")) {
124 if (needRerouting || haveByNumber || haveByName) {
129 into.push_back(device);
133 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {
164 :
MSDevice(holder, id), myPeriod(period), myPreInsertionPeriod(preInsertionPeriod), myRerouteCommand(0) {
210 if (source && dest) {
211 const std::pair<const MSEdge*, const MSEdge*> key = std::make_pair(source, dest);
246 std::map<std::pair<const MSEdge*, const MSEdge*>,
const MSRoute*>::iterator it =
myCachedRoutes.begin();
248 it->second->release();
253 for (std::vector<MSEdge*>::const_iterator i = edges.begin(); i != edges.end(); ++i) {