Tie routing documentation to user and developer workflows
This commit is contained in:
parent
2d77877fff
commit
2c7a7ea90a
1 changed files with 309 additions and 148 deletions
|
|
@ -29,13 +29,12 @@ def main() -> None:
|
|||
congestion=CongestionOptions(warm_start_enabled=False, max_iterations=1),
|
||||
)
|
||||
|
||||
print("Routing with a deliberately tiny node budget (should return a partial path)...")
|
||||
print(f"Routing with a node limit of {options.search.node_limit} per search.")
|
||||
run = route(problem, options=options)
|
||||
result = run.results_by_net["budget_limited_net"]
|
||||
if not result.reached_target:
|
||||
print(f"Target not reached as expected. Partial path length: {len(result.path)} segments.")
|
||||
else:
|
||||
print("The route unexpectedly reached the target. Increase difficulty or reduce the node budget further.")
|
||||
print(f"Outcome: {result.outcome}")
|
||||
if result.outcome == "partial":
|
||||
print(f"Partial path contains {len(result.path)} segments.")
|
||||
|
||||
fig, _ax = plot_routing_results(
|
||||
run.results_by_net,
|
||||
|
|
|
|||
Loading…
Reference in a new issue