ServiceTripEnds#
- class caf.van.service_segment.ServiceTripEnds(household_paths, employment_paths, service_trips, scale_factor, model_zones, zone_name)[source]#
Functionality for generating the LGV service segment trip ends.
- Parameters:
household_paths (LFT.data_utils.DataPaths) – Paths to the CSVs containing the household projections data and the relevant zone correspondence.
employment_paths (EmploymentPaths) – Paths to the CSVs containing the BRES data and the relevant zone correpondence.
service_trips (Path) – Path to Excel workbook containing ‘Annual Service Trips’ sheet which should contain column names as defined in SERVICE_TRIPS_HEADER and segments contained in SERVICE_TRIPS_SEGMENTS.
scale_factor (float) – Factor for scaling the service trips to the model year.
model_zones (pd.Series) – Full list of model zones.
zone_name (str)
- Raises:
ValueError – If scale_factor isn’t a positive numeric value.
Attributes
Summary table of class input parameters.
Productions and Attractions trip ends (columns) for all zones (index).
Proportion of input data for each zone, with zone number as index (Zone) and columns Households, Office (employees) and Other (employees).
Number of trips for each zone (index) and each of the segments (columns) Residential, Office and Other.
Methods
__init__(household_paths, employment_paths, ...)Initialise class by checking input files exist and are expected type.
read()Read the input data and perform any necessary conversions.
Attributes Documentation
- EMPLOYMENT_AGGREGATION = {'Office': [9, 10, 11, 12, 13, 14, 15, 16], 'Other': [1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 21]}#
- SERVICE_TRIPS_HEADER = {'Annual Service Trips': <class 'int'>, 'Segment': <class 'str'>}#
- SERVICE_TRIPS_SEGMENTS = ('Residential', 'Office', 'All Other')#
- SERVICE_TRIPS_SHEET = 'Annual Service Trips'#
- inputs_summary#
Summary table of class input parameters.
- Type:
pd.DataFrame
- trip_ends#
Productions and Attractions trip ends (columns) for all zones (index).
- Type:
pd.DataFrame
- trip_proportions#
Proportion of input data for each zone, with zone number as index (Zone) and columns Households, Office (employees) and Other (employees). Each column sums to 1.
- Type:
pd.DataFrame
- trips#
Number of trips for each zone (index) and each of the segments (columns) Residential, Office and Other.
- Type:
pd.DataFrame