DeliveryTripEnds#

class caf.van.delivery_segment.DeliveryTripEnds(warehouse_paths, employment_paths, household_paths, parameters_path, year, model_zones)[source]#

Functionality for generating the LGV delivery segment trip ends.

Parameters:
  • warehouse_paths (DataPaths) –

    • Path to the CSV containing the warehouse floorspace data.

    • Path to the LSOA zone correspondence file to convert data to model zone system.

  • employment_paths (EmploymentPaths) –

    • Path to the DVector containing the employment data.

    • Path to the zone correspondence CSV for converting the employment data to the model zone system.

  • household_paths (DwellingPaths) –

    • Path to the DVectors(s) containing the Occupied and (optionally) Unoccupied dwelling data.

    • Path to the zone correspondence file to convert household data to the model zone system.

  • parameters_path (Path) – Path to Excel Workbook containing sheet with the delivery segment parameters.

  • year (int) – Model year, should be between 2000 and 2100.

  • model_zones (pd.Series) – Full list of model zones.

Attributes

EMPLOYMENT_AGGREGATION

PARAMETERS_HEADER

PARAMETERS_SHEET

grocery_bush_trip_ends

Trip ends for the grocery bush segment, contains Origins and Destinations (columns) for each Zone (index).

inputs_summary

Summary table of class input parameters.

parcel_bush_trip_ends

Trip ends for the parcel bush segment, contains Origins and Destinations (columns) for each Zone (index).

parcel_proportions

Proportion of delivery trips to be attracted to each zone, calculated as the weighted sum of the Households and Employees proportions.

parcel_stem_trip_ends

Trip ends for the parcel stem segment, contains Productions and Attractions (columns) for each Zone (index).

trip_proportions

Proportion of input data for each zone, with zone number as index (Zone) and columns Depots, Households and Employees.

Methods

__init__(warehouse_paths, employment_paths, ...)

Initialise class by checking inputs files exist and are expected type.

read()

Read the input data and perform any necessary conversions.

read_parameters(path)

Extract expected parameters from the given spreadsheet.

Attributes Documentation

EMPLOYMENT_AGGREGATION = {'Employees': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}#
PARAMETERS_HEADER = {'Parameter': <class 'str'>, 'Value': <class 'str'>}#
PARAMETERS_SHEET = 'Delivery Segment Parameters'#
grocery_bush_trip_ends#

Trip ends for the grocery bush segment, contains Origins and Destinations (columns) for each Zone (index).

Type:

pd.DataFrame

inputs_summary#

Summary table of class input parameters.

Type:

pd.DataFrame

parcel_bush_trip_ends#

Trip ends for the parcel bush segment, contains Origins and Destinations (columns) for each Zone (index).

Type:

pd.DataFrame

parcel_proportions#

Proportion of delivery trips to be attracted to each zone, calculated as the weighted sum of the Households and Employees proportions. The business-to-customer parameter is used as the weighting and the final proportions are normalised.

Type:

pd.DataFrame

parcel_stem_trip_ends#

Trip ends for the parcel stem segment, contains Productions and Attractions (columns) for each Zone (index).

Type:

pd.DataFrame

trip_proportions#

Proportion of input data for each zone, with zone number as index (Zone) and columns Depots, Households and Employees. Each column sums to 1.

Type:

pd.DataFrame