Traffic flow recovery#
Description
This analysis computes the damage to bridges, first calling the bridge damage analysis. It then uses nodes and links in traffic flow path and Average Daily Traffic (ADT) data of bridges to calculate a traffic flow network post-disaster recovery. Additionally, the analysis can be used in stochastic calculations with an integer value being imported to seed the random number generator.
The output of this analysis is a CSV file with recovery trajectory timelines and data.
Input Parameters
key name |
type |
name |
description |
---|---|---|---|
|
|
Performance metrics |
Name of the result dataset. |
|
|
Population number |
An initial population number. |
|
|
Population size |
A population size. |
|
|
Number generation |
Number of iterations per scenario. |
|
|
Mutation rate |
Mutation rate for the NSGA-II algorithm used for recovery rate. |
|
|
Crossover rate |
Crossover rate for the NSGA-II algorithm used for recovery rate. |
|
|
Number of CPUs |
Number of CPUs used for parallel computations. |
Input Datasets
key name |
type |
name |
description |
---|---|---|---|
|
Bridge dataset |
A bridge dataset. |
|
|
Rad nodes |
A road network dataset. |
|
|
Road links |
A road network dataset. |
|
|
Bridge damages |
A bridge dataset. |
|
|
Unrepaired bridges |
An unrepaired bridge dataset. |
|
|
Bridge traffic |
A dataset of daily traffic. |
Output Datasets
key name |
type |
name |
description |
---|---|---|---|
|
Repair schedule |
A dataset containing results (format: CSV). |
|
|
Recovery trajectory |
A dataset containing results (format: CSV). |
(* required)
Execution
code snippet:
# Create traffic flow recovery instance
traffic_flow_recovery = TrafficFlowRecovery(client)
# Load input datasets
traffic_flow_recovery.load_remote_input_dataset("nodes", nodes)
traffic_flow_recovery.load_remote_input_dataset("links", links)
traffic_flow_recovery.load_remote_input_dataset('bridges', bridges)
traffic_flow_recovery.load_remote_input_dataset('bridge_damage_value', bridge_damage)
traffic_flow_recovery.load_remote_input_dataset('unrepaired_bridge', unrepaired)
traffic_flow_recovery.load_remote_input_dataset('ADT', ADT_data)
# Set analysis parameters
traffic_flow_recovery.set_parameter("num_cpu", 4)
traffic_flow_recovery.set_parameter("pm", 1)
traffic_flow_recovery.set_parameter('ini_num_population', 5)
traffic_flow_recovery.set_parameter("population_size", 3)
traffic_flow_recovery.set_parameter("num_generation", 2)
traffic_flow_recovery.set_parameter("mutation_rate", 0.1)
traffic_flow_recovery.set_parameter("crossover_rate", 1.0)
# Run traffic flow recovery analysis
traffic_flow_recovery.run_analysis()
full analysis: traffic_flow_recovery.ipynb