caf.van.lgv_model#
Module for running the LGV model.
Module Attributes
Name of sheet in trip distributions file for each segment. |
|
List of matrices which are in PA format and will be converted to OD. |
|
NTEM purpose to hb/nhb correspondence. |
|
Time periods to aggregate NHB together. |
|
Names and dtypes of the columns expected in the trip distributions input. |
|
Labels for the cost functions in the gravity model. |
|
Tolerance for difference in productions and attractions. |
|
Label to use when no category is given for the zones/tlds for the gravity model. |
Functions
|
Convert annual PA matrix to OD by adding on the transpose after factoring to totals. |
|
Balance variable column to control column within the regions. |
|
Calculates the LGV trip ends for all segments. |
|
Summarise number of trips and vehicle kilometres by internal/external. |
|
Extracts the cost function parameters from a tuple. |
|
Factor the given axis of matrix to match total. |
|
Factor column/row total arrays so they have the same total. |
Creates ArgumentParser for the LGV model. |
|
|
Read the LGV Parameters sheet from the Excel workbook. |
|
Runs the LGV model. |
|
Converts all matrices to time periods based on factors in factors_path. |
|
Produces annual LGV matrices for all segments. |
|
Produces LGV personal matrix by factoring NorMITs car other demand. |
|
Read time period factors from Excel Worksheet. |
|
Run the gravity model calibration for each segment. |
Classes
|
Functionality for generating the LGV commuting segment trip productions and attractions. |
|
Dataclass for storing path to data source and zone correspondence. |
|
Functionality for generating the LGV delivery segment trip ends. |
|
Defines the input paths and parameters for the gravity model. |
|
Dataclass storing paths to all the input files for the LGV model. |
|
Dataclass to store the trip matrices for all segments. |
|
Dataclass to store the trip end data for all segments. |
|
Class for rezoning a matrix when given a lookup with splitting factors. |
|
Functionality for generating the LGV service segment trip ends. |
|
Results from a run of the gravity model. |
Attributes Documentation
- caf.van.lgv_model.TRIP_DISTRIBUTION_SHEETS = {'commuting_drivers': 'Commuting', 'commuting_skilled_trades': 'Commuting', 'delivery_grocery': 'Delivery Bush', 'delivery_parcel_bush': 'Delivery Bush', 'delivery_parcel_stem': 'Delivery', 'service': 'Service'}#
Name of sheet in trip distributions file for each segment.
- caf.van.lgv_model.PA_MATRICES = ['service', 'delivery_parcel_stem', 'commuting_drivers', 'commuting_skilled_trades']#
List of matrices which are in PA format and will be converted to OD.
- caf.van.lgv_model.NTEM_PURPOSES = {'hb': [1, 2, 3, 4, 5, 6, 7, 8], 'nhb': [12, 13, 14, 15, 16, 18]}#
NTEM purpose to hb/nhb correspondence.
- caf.van.lgv_model.PERSONAL_TIME_PERIODS = [1, 2, 3, 4]#
Time periods to aggregate NHB together.
- caf.van.lgv_model.TRIP_DISTRIBUTION_COLS = {'average': <class 'float'>, 'end': <class 'float'>, 'observed proportions': <class 'float'>, 'start': <class 'float'>}#
Names and dtypes of the columns expected in the trip distributions input.
- caf.van.lgv_model.FUNCTION_LABELS = {'log_normal': 'Log Normal: $\\sigma={:.1e}$, $\\mu={:.1e}$', 'tanner': 'Tanner: $\\alpha={:.1e}$, $\\beta={:.1e}$'}#
Labels for the cost functions in the gravity model.
- caf.van.lgv_model.PA_DIFFERENCE_TOL = 0.001#
Tolerance for difference in productions and attractions.
- caf.van.lgv_model.DUMMY_CAT = 1#
Label to use when no category is given for the zones/tlds for the gravity model.