vtra.failure package

Submodules

vtra.failure.economic_failure_combine_national module

Combine national-scale macroeconomic loss estimates with rerouting losses

main()[source]

Process results

vtra.failure.failure_estimation_national module

Failure analysis of national-scale networks For transport modes at national scale:

  • road
  • rail

Input data requirements

  1. Correct paths to all files and correct input parameters

  2. Excel sheets with results of flow mapping based on MIN-MAX generalised costs estimates:

    • origin - String node ID of Origin
    • destination - String node ID of Destination
    • o_region - String name of Province of Origin node ID
    • d_region - String name of Province of Destination node ID
    • min_edge_path - List of string of edge ID’s for paths with minimum generalised cost flows
    • max_edge_path - List of string of edge ID’s for paths with maximum generalised cost flows
    • min_distance - Float values of estimated distance for paths with minimum generalised cost flows
    • max_distance - Float values of estimated distance for paths with maximum generalised cost flows
    • min_time - Float values of estimated time for paths with minimum generalised cost flows
    • max_time - Float values of estimated time for paths with maximum generalised cost flows
    • min_gcost - Float values of estimated generalised cost for paths with minimum generalised cost flows
    • max_gcost - Float values of estimated generalised cost for paths with maximum generalised cost flows
    • min_vehicle_nums - Float values of estimated vehicle numbers for paths with minimum generalised cost flows
    • max_vehicle_nums - Float values of estimated vehicle numbers for paths with maximum generalised cost flows
    • industry_columns - All daily tonnages of industry columns given in the OD matrix data
  3. Shapefiles

    • edge_id - String/Integer/Float Edge ID
    • geometry - Shapely LineString geomtry of edges

Results

Csv sheets with results of failure analysis:

  1. All failure scenarios

    • edge_id - String name or list of failed edges
    • origin - String node ID of Origin of disrupted OD flow
    • destination - String node ID of Destination of disrupted OD flow
    • o_region - String name of Province of Origin node ID of disrupted OD flow
    • d_region - String name of Province of Destination node ID of disrupted OD flow
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_distance - Float value of estimated distance of OD journey before disruption
    • min/max_time - Float value of estimated time of OD journey before disruption
    • min/max_gcost - Float value of estimated travel cost of OD journey before disruption
    • min/max_vehicle_nums - Float value of estimated vehicles of OD journey before disruption
    • new_cost - Float value of estimated cost of OD journey after disruption
    • new_distance - Float value of estimated distance of OD journey after disruption
    • new_path - List of string edge ID’s of estimated new route of OD journey after disruption
    • new_time - Float value of estimated time of OD journey after disruption
    • dist_diff - Float value of Post disruption minus per-disruption distance
    • time_diff - Float value Post disruption minus per-disruption timee
    • min/max_tr_loss - Float value of estimated change in rerouting cost
    • industry_columns - Float values of all daily tonnages of industry columns along disrupted OD pairs
    • min/max_tons - Float values of total daily tonnages along disrupted OD pairs
  2. Isolated OD scenarios - OD flows with no rerouting options

    • edge_id - String name or list of failed edges
    • o_region - String name of Province of Origin node ID of disrupted OD flow
    • d_region - String name of Province of Destination node ID of disrupted OD flow
    • industry_columns - Float values of all daily tonnages of industry columns along disrupted OD pairs
    • min/max_tons - Float values of total daily tonnages along disrupted OD pairs
  3. Rerouting scenarios - OD flows with rerouting options

    • edge_id - String name or list of failed edges
    • o_region - String name of Province of Origin node ID of disrupted OD flow
    • d_region - String name of Province of Destination node ID of disrupted OD flow
    • min/max_tr_loss - Float value of change in rerouting cost
    • min/max_tons - Float values of total daily tonnages along disrupted OD pairs
  4. Min-max combined scenarios - Combined min-max results along each edge

    • edge_id - String name or list of failed edges
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_tr_loss - Float values of change in rerouting cost
    • min/max_tons - Float values of total daily tonnages affted by disrupted edge
  5. Shapefile Min-max combined scenarios - Combined min-max reults along each edge
    • edge_id - String name or list of failed edges
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_tr_loss - Float values of change in rerouting cost
    • min/max_tons - Float values of total daily tonnages affted by disrupted edge
    • geometry - Shapely LineString geomtry of edges
main()[source]

Estimate failures

Specify the paths from where you want to read and write:

  1. Input data
  2. Intermediate calcuations data
  3. Output results

Supply input data and parameters

  1. Names of modes
    List of strings
  2. Unit weight of vehicle assumed for each mode
    List of float types
  3. Range of usage factors for each mode to represent uncertainty in cost estimations
    List of tuples of float types
  4. Min-max names of names of different types of attributes - paths, distance, time, cost, vehicles, tons
    List of string types
  5. Names of commodity/industry columns for which min-max tonnage column names already exist
    List of string types
  6. Percentage of OD flows that are assumed disrupted
    List of float type
  7. Condition on whether analysis is single failure or multiple failure
    Boolean condition True or False

Give the paths to the input data files:

  1. Network edges Excel and shapefiles
  2. OD flows Excel file
  3. Costs of modes Excel file
  4. Road properties Excel file
  5. Failure scenarios Excel file

Specify the output files and paths to be created

vtra.failure.failure_estimation_provinces module

Failure analysis of province-scale road networks To estimate changing accessibility to commune points

Input data requirements

  1. Correct paths to all files and correct input parameters

  2. Excel sheets with results of flow mapping based on MIN-MAX generalised costs estimates

    • origin - String node ID of Origin
    • destination - String node ID of Destination
    • min_edge_path - List of string of edge ID’s for paths with minimum generalised cost flows
    • max_edge_path - List of string of edge ID’s for paths with maximum generalised cost flows
    • min_distance - Float values of estimated distance for paths with minimum generalised cost flows
    • max_distance - Float values of estimated distance for paths with maximum generalised cost flows
    • min_time - Float values of estimated time for paths with minimum generalised cost flows
    • max_time - Float values of estimated time for paths with maximum generalised cost flows
    • min_gcost - Float values of estimated generalised cost for paths with minimum generalised cost flows
    • max_gcost - Float values of estimated generalised cost for paths with maximum generalised cost flows
    • min_vehicle_nums - Float values of estimated vehicle numbers for paths with minimum generalised cost flows
    • max_vehicle_nums - Float values of estimated vehicle numbers for paths with maximum generalised cost flows
    • industry_columns - All daily tonnages of industry columns given in the OD matrix data
  3. Shapefiles

    • edge_id - String/Integer/Float Edge ID
    • geometry - Shapely LineString geomtry of edges

Results

Csv sheets with results of failure analysis

  1. All failure scenarios

    • edge_id - String name or list of failed edges
    • origin - String node ID of Origin of disrupted OD flow
    • destination - String node ID of Destination of disrupted OD flow
    • o_region - String name of Province of Origin node ID of disrupted OD flow
    • d_region - String name of Province of Destination node ID of disrupted OD flow
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_distance - Float value of estimated distance of OD journey before disruption
    • min/max_time - Float value of estimated time of OD journey before disruption
    • min/max_gcost - Float value of estimated travel cost of OD journey before disruption
    • min/max_vehicle_nums - Float value of estimated vehicles of OD journey before disruption
    • new_cost - Float value of estimated cost of OD journey after disruption
    • new_distance - Float value of estimated distance of OD journey after disruption
    • new_path - List of string edge ID’s of estimated new route of OD journey after disruption
    • new_time - Float value of estimated time of OD journey after disruption
    • dist_diff - Float value of Post disruption minus per-disruption distance
    • time_diff - Float value Post disruption minus per-disruption timee
    • min/max_tr_loss - Float value of estimated change in rerouting cost
    • min/max_netrev - Float values of total daily net revenues along disrupted OD pairs
    • min/max_tons - Float values of total daily crop tonnages along disrupted OD pairs
    • min_max_econ_impact - Float values of total daily economic impact of disrupted OD pairs
  2. Min-max combined scenarios - Combined min-max results of total network impacts of each edge

    • edge_id - String name or list of failed edges
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_tr_loss - Float values of estimated change in rerouting cost
    • min/max_tons - Float values of total daily tonnages along edge
    • min/max_netrev - Float values of total daily net revenues along edge
    • min/max_econ_impact - Float value of total daily economic impact of edge
  3. Shapefiles - Combined min-max reults of total network impacts of each edge

    • edge_id - String name or list of failed edges
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_tr_loss - Float values of estimated change in rerouting cost
    • min/max_tons - Float values of total daily tonnages along edge
    • min/max_netrev - Float values of total daily net revenues along edge
    • min/max_econ_impact - Float value of total daily economic impact of edge
    • geometry - Shapely LineString geomtry of edges
main()[source]

Estimate provincial road failures

Specify the paths from where you want to read and write:

  1. Input data
  2. Intermediate calcuations data
  3. Output results

Supply input data and parameters

  1. Names of Provinces
    List of strings
  2. Unit weight of vehicle assumed for each mode
    List of float types
  3. Min-max names of names of different types of attributes - paths, distance, time, cost, vehicles, tons, revenue
    List of string types
  4. Percentage of OD flows that are assumed disrupted
    List of float type
  5. Condition on whether analysis is single failure or multiple failure
    Boolean condition True or False

Give the paths to the input data files: 1. Network edges Excel and shapefiles 2. OD flows Excel file 3. Failure scenarios Excel file

Specify the output files and paths to be created

vtra.failure.failure_multi_modal_options module

Failure analysis of national-scale networks For transport modes at national scale:

  • road
  • rail

Input data requirements

  1. Correct paths to all files and correct input parameters
  2. Excel sheets with results of flow mapping based on MIN-MAX generalised costs estimates:
    • origin - String node ID of Origin
    • destination - String node ID of Destination
    • o_region - String name of Province of Origin node ID
    • d_region - String name of Province of Destination node ID
    • min_edge_path - List of string of edge ID’s for paths with minimum generalised cost flows
    • max_edge_path - List of string of edge ID’s for paths with maximum generalised cost flows
    • min_distance - Float values of estimated distance for paths with minimum generalised cost flows
    • max_distance - Float values of estimated distance for paths with maximum generalised cost flows
    • min_time - Float values of estimated time for paths with minimum generalised cost flows
    • max_time - Float values of estimated time for paths with maximum generalised cost flows
    • min_gcost - Float values of estimated generalised cost for paths with minimum generalised cost flows
    • max_gcost - Float values of estimated generalised cost for paths with maximum generalised cost flows
    • min_vehicle_nums - Float values of estimated vehicle numbers for paths with minimum generalised cost flows
    • max_vehicle_nums - Float values of estimated vehicle numbers for paths with maximum generalised cost flows
    • industry_columns - All daily tonnages of industry columns given in the OD matrix data
  3. Shapefiles
    • edge_id - String/Integer/Float Edge ID
    • geometry - Shapely LineString geomtry of edges

Results

Csv sheets with results of failure analysis:

  1. All failure scenarios
    • edge_id - String name or list of failed edges
    • origin - String node ID of Origin of disrupted OD flow
    • destination - String node ID of Destination of disrupted OD flow
    • o_region - String name of Province of Origin node ID of disrupted OD flow
    • d_region - String name of Province of Destination node ID of disrupted OD flow
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_distance - Float value of estimated distance of OD journey before disruption
    • min/max_time - Float value of estimated time of OD journey before disruption
    • min/max_gcost - Float value of estimated travel cost of OD journey before disruption
    • min/max_vehicle_nums - Float value of estimated vehicles of OD journey before disruption
    • new_cost - Float value of estimated cost of OD journey after disruption
    • new_distance - Float value of estimated distance of OD journey after disruption
    • new_path - List of string edge ID’s of estimated new route of OD journey after disruption
    • new_time - Float value of estimated time of OD journey after disruption
    • dist_diff - Float value of Post disruption minus per-disruption distance
    • time_diff - Float value Post disruption minus per-disruption timee
    • min/max_tr_loss - Float value of estimated change in rerouting cost
    • industry_columns - Float values of all daily tonnages of industry columns along disrupted OD pairs
    • min/max_tons - Float values of total daily tonnages along disrupted OD pairs
  2. Isolated OD scenarios - OD flows with no rerouting options
    • edge_id - String name or list of failed edges
    • o_region - String name of Province of Origin node ID of disrupted OD flow
    • d_region - String name of Province of Destination node ID of disrupted OD flow
    • industry_columns - Float values of all daily tonnages of industry columns along disrupted OD pairs
    • min/max_tons - Float values of total daily tonnages along disrupted OD pairs
  3. Rerouting scenarios - OD flows with rerouting options
    • edge_id - String name or list of failed edges
    • o_region - String name of Province of Origin node ID of disrupted OD flow
    • d_region - String name of Province of Destination node ID of disrupted OD flow
    • min/max_tr_loss - Float value of change in rerouting cost
    • min/max_tons - Float values of total daily tonnages along disrupted OD pairs
  4. Min-max combined scenarios - Combined min-max results along each edge
    • edge_id - String name or list of failed edges
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_tr_loss - Float values of change in rerouting cost
    • min/max_tons - Float values of total daily tonnages affted by disrupted edge
  5. Shapefile Min-max combined scenarios - Combined min-max reults along each edge
    • edge_id - String name or list of failed edges
    • no_access - Boolean 1 (no reroutng) or 0 (rerouting)
    • min/max_tr_loss - Float values of change in rerouting cost
    • min/max_tons - Float values of total daily tonnages affted by disrupted edge
    • geometry - Shapely LineString geomtry of edges
main()[source]

Estimate multi-model failures

Specify the paths from where you want to read and write:

  1. Input data
  2. Intermediate calcuations data
  3. Output results

Supply input data and parameters

  1. Names of modes
    List of strings
  2. Unit weight of vehicle assumed for each mode
    List of float types
  3. Range of usage factors for each mode to represent uncertainty in cost estimations
    List of tuples of float types
  4. Min-max names of names of different types of attributes - paths, distance, time, cost, vehicles, tons
    List of string types
  5. Names of commodity/industry columns for which min-max tonnage column names already exist
    List of string types
  6. Percentage of OD flows that are assumed disrupted
    List of float type
  7. Condition on whether analysis is single failure or multiple failure
    Boolean condition True or False

Give the paths to the input data files:

  1. Network edges Excel and shapefiles
  2. OD flows Excel file
  3. Costs of modes Excel file
  4. Road properties Excel file
  5. Failure scenarios Excel file

vtra.failure.national_failure_transfers module

Estimate tonnage shifts from one mode onto others

main()[source]

Estimate modal shifts

Specify the paths from where you want to read and write:

  1. Input data
  2. Intermediate calcuations data
  3. Output results

Supply input data and parameters

  1. Names of modes
    List of strings
  2. Unit weight of vehicle assumed for each mode
    List of float types
  3. Range of usage factors for each mode to represent uncertainty in cost estimations
    List of tuples of float types
  4. Min-max names of names of different types of attributes - paths, distance, time, cost, vehicles, tons
    List of string types
  5. Names of commodity/industry columns for which min-max tonnage column names already exist
    List of string types
  6. Percentage of OD flows that are assumed disrupted
    List of float type
  7. Condition on whether analysis is single failure or multiple failure
    Boolean condition True or False

Give the paths to the input data files:

  1. Network edges Excel and shapefiles
  2. OD flows Excel file
  3. Costs of modes Excel file
  4. Road properties Excel file
  5. Failure scenarios Excel file

vtra.failure.transfer_costs_modes module

Combine economic impacts of partial multi-modal rerouting split

main()[source]

Combine economic impacts of partial multi-modal rerouting split