(svn r26646) -Fix [FS#6041]: Save locations instead of distances in link graphs to reduce size.

This commit is contained in:
fonsinchen
2014-06-14 13:35:39 +00:00
parent e8e5cdde03
commit 957f5ca117
7 changed files with 71 additions and 52 deletions

View File

@@ -210,7 +210,8 @@ void DemandCalculator::CalcDemand(LinkGraphJob &job, Tscaler scaler)
/* Scale the distance by mod_dist around max_distance */
int32 distance = this->max_distance - (this->max_distance -
(int32)job[from_id][to_id].Distance()) * this->mod_dist / 100;
(int32)DistanceMaxPlusManhattan(job[from_id].XY(), job[to_id].XY())) *
this->mod_dist / 100;
/* Scale the accuracy by distance around accuracy / 2 */
int32 divisor = this->accuracy * (this->mod_dist - 50) / 100 +