MatrixReport.calc_vehicle_kms#
- MatrixReport.calc_vehicle_kms(cost_matrix, *, sector_zone_lookup=None, zone_column='zone_id', sector_column='sector_id')[source]#
Calculate vehicle kms from the matrix passed on initialisation.
The result is stored within the object which can be accessed using the MatrixReport.vkms property. VKMs are calculated as the sum of the product of the cost matrix and the matrix.
- Parameters:
cost_matrix (pd.DataFrame) – Cost matrix corresponding with the inputted matrix.
sector_zone_lookup (pd.DataFrame | None = None,) – Lookup table to translate zones to sectors to create a sectorised distribution
zone_column (str) – Column in sector_zone_lookup that contains the zone ids, defaults to “zone_id”
sector_column (str = "sector_id",) – Column in sector_zone_lookup that contains the sector ids, defaults to “sector_id”
- Return type:
None