42 #ifdef CHECK_MEMORY_LEAKS
44 #endif // CHECK_MEMORY_LEAKS
56 currentTimeN(0), meanNTemp(0), myParent(parent) {}
68 travelledDistance = 0;
92 currentTimeN += (
SUMOReal) pow(10., (sn / 10.));
93 sampleSeconds += timeOnLane;
94 travelledDistance += speed * timeOnLane;
100 return vehicleApplies(veh);
108 if (sampleSeconds > myParent->myMinSamples) {
109 SUMOReal traveltime = myParent->myMaxTravelTime;
110 if (travelledDistance > 0.f) {
111 traveltime =
MIN2(traveltime, myLaneLength * sampleSeconds / travelledDistance);
114 }
else if (defaultTravelTime >= 0.) {
116 dev.
writeAttr(
"traveltime", defaultTravelTime);
128 const bool useLanes,
const bool withEmpty,
129 const bool printDefaults,
const bool withInternal,
130 const bool trackVehicles,
132 const std::set<std::string> vTypes)
133 :
MSMeanData(id, dumpBegin, dumpEnd, useLanes, withEmpty, printDefaults,
134 withInternal, trackVehicles, maxTravelTime, minSamples, vTypes) {
150 for (std::vector<std::vector<MeanDataValues*> >::const_iterator i =
myMeasures.begin(); i !=
myMeasures.end(); ++i) {
151 const std::vector<MeanDataValues*>& lm = *i;
152 for (std::vector<MeanDataValues*>::const_iterator j = lm.begin(); j != lm.end(); ++j) {