SkimMatrixMultiKey¶
-
public class
SkimMatrixMultiKey
implements SkimMatrix¶ Skim matrix for storing inter-zonal travel times or costs (for passenger vehicles).
Author: Milan Lovric
Methods¶
getAbsoluteDifference¶
-
public double
getAbsoluteDifference
(SkimMatrix 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
(ODMatrixMultiKey flows)¶ Gets average OD cost weighted by demand.
Parameters: - flows – The demand as an origin-destination matrix.
Returns: Average cost.
getAverageZonalCosts¶
getAverageZonalCosts¶
-
public HashMap<String, Double>
getAverageZonalCosts
(List<String> zones, ODMatrixMultiKey flows)¶ Gets average zonal cost weighted by demand (used for the rail model).
Parameters: - zones – Zones for which zonal costs are required.
- flows – The demand as an origin-destination matrix.
Returns: Map of average zonal costs.
getCost¶
getCost¶
-
public double
getCost
(int originZoneID, int destinationZoneID)¶ Gets cost for a given origin-destination pair.
Parameters: - originZone – Origin zone ID.
- destinationZone – Destination zone ID.
Returns: Origin-destination cost.
getSortedDestinations¶
getSortedOrigins¶
getSumOfCosts¶
-
public double
getSumOfCosts
(ODMatrixMultiKey flows)¶ Gets sum of costs multiplied by demand flows.
Parameters: - flows – The demand as an origin-destination matrix.
Returns: Sum of costs.