diff options
Diffstat (limited to 'src/linkgraph/demands.cpp')
-rw-r--r-- | src/linkgraph/demands.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/linkgraph/demands.cpp b/src/linkgraph/demands.cpp index c16288123..2c88778ab 100644 --- a/src/linkgraph/demands.cpp +++ b/src/linkgraph/demands.cpp @@ -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 + |