public LandmarkStorage setMaximumWeight(double maxWeight) {
        if (maxWeight > 0) {
            this.factor = maxWeight / PRECISION;
            if (Double.isInfinite(factor) || Double.isNaN(factor))
                throw new IllegalStateException("Illegal factor " + factor + " calculated from maximum weight " + maxWeight);
        }
        return this;
    }
public LandmarkStorage setMaximumWeight ( double maxWeight ) { if ( maxWeight > 0 ) { this . factor = maxWeight / PRECISION ; if ( Double . isInfinite ( factor ) || Double . isNaN ( factor ) ) throw new IllegalStateException ( "Illegal factor " + factor + " calculated from maximum weight " + maxWeight ) ; } return this ; }
Specify the maximum possible value for your used area. With this maximum weight value you can influence the storage
precision for your weights that help A* finding its way to the goal. The same value is used for all subnetworks.
Note, if you pick this value too big then too similar weights are stored
(some bits of the storage capability will be left unused) which could lead to suboptimal routes.
If too low then far away values will have the same maximum value associated ("maxed out") leading to bad performance.

@param maxWeight use a negative value to automatically determine this value.