correctly handle trips with no stop times, fixes #46
This commit is contained in:
parent
45f508bf34
commit
33a92077df
3 changed files with 41 additions and 20 deletions
|
|
@ -776,6 +776,7 @@ EdgeCandMap ShapeBuilder::getECM(
|
|||
double avgChildT = 0;
|
||||
if (chldTrNd.trips) avgChildT = chldTrNd.accTime / chldTrNd.trips;
|
||||
|
||||
|
||||
double timeDiff = avgChildT - avgT;
|
||||
if (timeDiff < 0) timeDiff = 0;
|
||||
|
||||
|
|
@ -812,7 +813,7 @@ double ShapeBuilder::timePen(int candTime, int schedTime) const {
|
|||
|
||||
int diff = abs(candTime - schedTime);
|
||||
|
||||
double cNorm = (diff) / standarddev;
|
||||
double cNorm = diff / standarddev;
|
||||
return cNorm * cNorm;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue