-
Notifications
You must be signed in to change notification settings - Fork 2
Rjf/omf config and metadata #103
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
base: main
Are you sure you want to change the base?
Changes from all commits
792017d
8641d6c
3eaad85
a015ab0
63f708e
0a326fb
5e20039
aac3261
a1842c3
3665096
a61ff76
56d623a
f2e7613
4bb8989
89ee90b
1f5e8fd
ecec21e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,269 @@ | ||||||||||
| [graph] | ||||||||||
| edge_list = [ | ||||||||||
| { input_file = "data/walk/edges-compass.csv.gz" }, | ||||||||||
| { input_file = "data/bike/edges-compass.csv.gz" }, | ||||||||||
| { input_file = "data/drive/edges-compass.csv.gz" }, | ||||||||||
| ] | ||||||||||
| vertex_list_input_file = "data/vertices-compass.csv.gz" | ||||||||||
|
|
||||||||||
| [mapping] | ||||||||||
| type = "edge" | ||||||||||
| geometry = [ | ||||||||||
| { type = "from_linestrings", geometry_input_file = "data/walk/edges-geometries-enumerated.txt.gz" }, | ||||||||||
| { type = "from_linestrings", geometry_input_file = "data/bike/edges-geometries-enumerated.txt.gz" }, | ||||||||||
| { type = "from_linestrings", geometry_input_file = "data/drive/edges-geometries-enumerated.txt.gz" }, | ||||||||||
| ] | ||||||||||
| tolerance.distance = 15.0 | ||||||||||
| tolerance.unit = "meters" | ||||||||||
| queries_without_destinations = false | ||||||||||
| matching_type = ["point", "vertex_id", "edge_id"] | ||||||||||
|
|
||||||||||
| [algorithm] | ||||||||||
| type = "a*" | ||||||||||
|
|
||||||||||
| # cut off searches that exceed these termination policies. | ||||||||||
| [termination] | ||||||||||
| type = "solution_size" | ||||||||||
| limit = 1_000_000 | ||||||||||
|
|
||||||||||
| # use a time-optimal routing strategy | ||||||||||
| [cost] | ||||||||||
| weights.trip_time = 1.0 | ||||||||||
| vehicle_rates.trip_time.type = "raw" | ||||||||||
|
|
||||||||||
| ### | ||||||||||
| ### WALK TOPOLOGY | ||||||||||
| ### | ||||||||||
| [[search]] | ||||||||||
| traversal.type = "combined" | ||||||||||
| traversal.models = [ | ||||||||||
| { type = "distance", distance_unit = "miles" }, | ||||||||||
| { type = "fixed_speed", name = "walk", speed = 5.0, speed_unit = "kph" }, | ||||||||||
| { type = "time", time_unit = "minutes" }, | ||||||||||
| { type = "multimodal", this_mode = "walk", available_modes = ["walk", "bike", "drive"], available_route_ids = [], use_route_ids = false, max_trip_legs = 5 } | ||||||||||
| ] | ||||||||||
|
|
||||||||||
| frontier.type = "combined" | ||||||||||
| frontier.models = [ | ||||||||||
| { type = "time_limit", time_limit = { time = 40.0, time_unit = "minutes" }}, | ||||||||||
| { type = "multimodal", mode = "walk", constraints = [], available_modes = ["walk", "bike", "drive"], available_route_ids = [], use_route_ids = false, max_trip_legs = 5 } | ||||||||||
|
||||||||||
| { type = "multimodal", mode = "walk", constraints = [], available_modes = ["walk", "bike", "drive"], available_route_ids = [], use_route_ids = false, max_trip_legs = 5 } | |
| { type = "multimodal", this_mode = "walk", constraints = [], available_modes = ["walk", "bike", "drive"], available_route_ids = [], use_route_ids = false, max_trip_legs = 5 } |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue for the multimodal frontier config: available_route_ids/use_route_ids aren’t fields on MultimodalFrontierConfig (it uses route_ids_input_file). These unknown keys will cause deserialization errors; remove them and use route_ids_input_file if needed.
| { type = "multimodal", mode = "walk", constraints = [], available_modes = ["walk", "bike", "drive"], available_route_ids = [], use_route_ids = false, max_trip_legs = 5 } | |
| { type = "multimodal", mode = "walk", constraints = [], available_modes = ["walk", "bike", "drive"], max_trip_legs = 5 } |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same deserialization issue here: the multimodal frontier model config key should be this_mode, not mode, to match MultimodalFrontierConfig in rust/bambam/src/model/frontier/multimodal/config.rs.
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same unit mismatch here: speed_table_input_file is edges-speeds-mph-enumerated.txt.gz (mph values), but speed_unit is set to kph, which will cause incorrect travel times/costs. Align speed_unit with the table contents (likely mph).
| { type = "speed", name = "drive", speed_unit = "kph", speed_table_input_file = "data/drive/edges-speeds-mph-enumerated.txt.gz" }, | |
| { type = "speed", name = "drive", speed_unit = "mph", speed_table_input_file = "data/drive/edges-speeds-mph-enumerated.txt.gz" }, |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same deserialization issue here: the multimodal frontier model config key should be this_mode, not mode, to match MultimodalFrontierConfig.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,7 @@ use crate::{ | |||||
| OvertureMapsCollectorConfig, ReleaseVersion, SegmentAccessRestrictionWhen, | ||||||
| TransportationCollection, | ||||||
| }, | ||||||
| graph::OmfGraphVectorized, | ||||||
| graph::{OmfGraphSource, OmfGraphStats, OmfGraphSummary, OmfGraphVectorized}, | ||||||
| util, | ||||||
| }; | ||||||
|
|
||||||
|
|
@@ -43,6 +43,7 @@ pub struct IslandDetectionAlgorithmConfiguration { | |||||
|
|
||||||
| /// runs an OMF network import using the provided configuration. | ||||||
| pub fn run( | ||||||
| name: &str, | ||||||
| bbox: Option<&CliBoundingBox>, | ||||||
| modes: &[NetworkEdgeListConfiguration], | ||||||
| output_directory: &Path, | ||||||
|
|
@@ -62,7 +63,17 @@ pub fn run( | |||||
|
|
||||||
| let vectorized_graph = | ||||||
| OmfGraphVectorized::new(&collection, modes, island_detection_configuration)?; | ||||||
| vectorized_graph.write_compass(output_directory, true)?; | ||||||
|
|
||||||
| // summarize imported graph | ||||||
| let release = match local_source { | ||||||
| Some(local) => format!("file://{}", local.to_str().unwrap_or_default()), | ||||||
|
||||||
| Some(local) => format!("file://{}", local.to_str().unwrap_or_default()), | |
| Some(local) => format!("file://{}", local.to_string_lossy()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This multimodal traversal config includes
available_route_idsanduse_route_ids, but the traversal config struct usesroute_ids_input_fileand does not accept these fields. As written, this TOML will fail to deserialize into the traversal model config. Remove these keys and useroute_ids_input_file(or omit it) instead; same issue repeats in the bike/drive sections.