Skip to content

Commit

Permalink
Fix labels of skipped shipments imported from the local plan.
Browse files Browse the repository at this point in the history
Bonus change: in the local plan, provision one vehicle per shipment by
default; this is the most conservative option that always provides
enough vehicles, as long as the shipments fit into the load limits while
delivering from a parking location.
  • Loading branch information
ondrasej committed Sep 14, 2023
1 parent 6520672 commit 95d8db5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/two_step_routing/two_step_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class Options:
local_model_vehicle_per_hour_cost: float = 300
local_model_vehicle_per_km_cost: float = 60

min_average_shipments_per_round: int = 4
min_average_shipments_per_round: int = 1
max_round_duration: str = "7200s"


Expand Down Expand Up @@ -961,7 +961,7 @@ def add_merged_transition(transition: Transition):
merged_skipped_shipments = []
for local_skipped_shipment in local_response.get("skippedShipments", ()):
shipment_index, label = local_skipped_shipment["label"].split(
": ", maxsplit=1
" ", maxsplit=1
)
merged_skipped_shipments.append({
"index": int(shipment_index),
Expand Down

0 comments on commit 95d8db5

Please sign in to comment.