SkimMatrixFreightMultiKey¶
-
public class
SkimMatrixFreightMultiKey
implements SkimMatrixFreight¶ Skim matrix for storing inter-zonal travel times or costs (for freight vehicles).
Author: Milan Lovric
Constructors¶
Methods¶
getAbsoluteDifference¶
-
public double
getAbsoluteDifference
(SkimMatrixFreight other)¶ Gets sum of absolute differences between elements of two matrices.
Parameters: - other – The other matrix.
Returns: Sum of absolute differences.
getAverageCost¶
-
public double
getAverageCost
()¶ Gets average OD cost (ignores empty matrix cells).
Returns: Average cost.
getAverageCost¶
-
public double
getAverageCost
(FreightMatrix flows)¶ Gets average OD cost weighted by demand.
Parameters: - flows – The demand as an origin-destination matrix.
Returns: Average cost.
getCost¶
-
public double
getCost
(int originZone, int destinationZone, int vehicleType)¶ Gets cost for a given origin-destination pair and a vehicle type.
Parameters: - originZone – Origin zone.
- destinationZone – Destination zone.
- vehicleType – Vehicle type.
Returns: Origin-destination cost.