Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trade flow routing on multi-modal networks #187

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

thomas-fred
Copy link
Contributor

@thomas-fred thomas-fred commented Sep 12, 2024

Merge in work from World Bank project to open-gira.

Main features:

  • Allocation of flows from a trade OD matrix across multi-modal network. Flows are between target country road nodes and partner countries. Trade flows have a volume (tonnes) and a monetary value ($).
  • Disruption of network due to generic hazard raster (value exceeding configurable threshold). Can then allocate flows on the degraded network for comparison.

@tomalrussell
Copy link
Member

Thanks for preparing this to merge. Are the following inputs everything that is not (yet) produced by other rules? (i.e. everything in "{OUTPUT_DIR}/input/..." should be provided.

# Maritime network
# workflow/transport/maritime/maritime.smk
        nodes = "{OUTPUT_DIR}/input/networks/maritime/nodes.gpq",
        edges_no_geom = "{OUTPUT_DIR}/input/networks/maritime/edges_by_cargo/maritime_base_network_general_cargo.pq",
        edges_visualisation = "{OUTPUT_DIR}/input/networks/maritime/edges.gpq",

# Project-specific road and rail network, hazard footprint
# workflow/transport/multi-modal/multi_modal.smk
        road_network_nodes = "{OUTPUT_DIR}/input/networks/road/{PROJECT_SLUG}/nodes.gpq",
        road_network_edges = "{OUTPUT_DIR}/input/networks/road/{PROJECT_SLUG}/edges.gpq",
        rail_network_nodes = "{OUTPUT_DIR}/input/networks/rail/{PROJECT_SLUG}/nodes.gpq",
        rail_network_edges = "{OUTPUT_DIR}/input/networks/rail/{PROJECT_SLUG}/edges.gpq",

        raster = "{OUTPUT_DIR}/hazard/{HAZARD_SLUG}.tif",

# Trade OD (nodes to partner country)
# workflow/transport/flow_allocation/allocate.smk
        od = "{OUTPUT_DIR}/input/trade_matrix/{PROJECT_SLUG}/trade_nodes_total.parquet",

@thomas-fred
Copy link
Contributor Author

The road and rail edges can be prepared by other rules, but they will need to be moved/copied to the input paths you list to be used as inputs for the new rules. I will document this briefly.

@thomas-fred
Copy link
Contributor Author

@tomalrussell I've added some docs. I'll merge this now. Once you've incorporated your OD generation we can release again for a DOI and let Tim know.

@thomas-fred thomas-fred merged commit 0be7229 into main Sep 16, 2024
1 check passed
@thomas-fred thomas-fred deleted the feature/trade_flow_routing branch September 16, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants