OpenTTD Source
12.0-beta2
|
DemandCalculator(LinkGraphJob &job)
Create the DemandCalculator and immediately do the calculation.
int32 accuracy
Accuracy of the calculation.
Stateless, thread safe demand handler.
Class for calculation jobs to be run on link graphs.
virtual void Run(LinkGraphJob &job) const
Call the demand calculator on the given component.
int32 mod_dist
Distance modifier, determines how much demands decrease with distance.
A handler doing "something" on a link graph component.
virtual ~DemandHandler()
Virtual destructor has to be defined because of virtual Run().
int32 max_distance
Maximum distance possible on the map.
void CalcDemand(LinkGraphJob &job, Tscaler scaler)
Do the actual demand calculation, called from constructor.