Skip to content

Commit

Permalink
ILP solver seems o be sensible to cost scaling #21
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Jan 6, 2025
1 parent a1068c5 commit 6266712
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Retrying in 1 seconds

Run dispatcher
New reservations: ['0']
Expand All @@ -11,7 +12,7 @@ New reservations: ['1', '2', '3']
Pending reservations: []
Solve DARP with exhaustive_search
Solve ILP
Dispatch: taxiA_0y_2y_3y_1y_3z_0z_1z_2z
Dispatch: taxiA_0y_2y_3y_3z_1y_0z_1z_2z

Run dispatcher
New reservations: ['4', '5', '6']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Retrying in 1 seconds

Run dispatcher
New reservations: ['0']
Expand All @@ -17,15 +18,15 @@ New reservations: ['4', '5', '6']
Pending reservations: ['0']
Solve DARP with exhaustive_search
Solve ILP
Dispatch: taxiA_6y_6z
Dispatch: taxiB_4y_5y_4z_5z
Dispatch: taxiA_4y_5y_4z_5z
Dispatch: taxiB_6y_6z

Run dispatcher
New reservations: ['7', '8', '9']
Pending reservations: ['0']
Solve DARP with exhaustive_search
Solve ILP
Dispatch: taxiA_6y_7y_7z_6z
Dispatch: taxiB_6y_7y_7z_6z
Dispatch: taxiC_3y_8y_3z_8z_2z

Run dispatcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ New reservations: ['4', '5', '6']
Pending reservations: ['0']
Solve DARP with simple_rerouting
Solve ILP
Dispatch: taxiA_6y_6z
Dispatch: taxiB_4y_5y_4z_5z
Dispatch: taxiA_4y_5y_4z_5z
Dispatch: taxiB_6y_6z

Run dispatcher
New reservations: ['7', '8', '9']
Pending reservations: ['0']
Solve DARP with simple_rerouting
Solve ILP
Dispatch: taxiA_6y_7y_7z_6z
Dispatch: taxiB_6y_7y_7z_6z

Run dispatcher
Pending reservations: ['0', '8', '9']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Retrying in 1 seconds

Run dispatcher
New reservations: ['0']
Expand All @@ -12,7 +13,7 @@ Pending reservations: []
Solve DARP with exhaustive_search
Solve ILP
Dispatch: taxiA_0y_2y_0z_2z
Dispatch: taxiB_1y_3y_3z_1z
Dispatch: taxiB_3y_1y_3z_1z

Run dispatcher
New reservations: ['4', '5', '6']
Expand Down Expand Up @@ -63,13 +64,11 @@ Pending reservations: ['4', '5', '7', '8']
Solve DARP with exhaustive_search
Reservation 4 (person ('4',)) cannot be served
Reservation 5 (person ('5',)) cannot be served
Solve ILP

Run dispatcher
Pending reservations: ['7', '8']
Solve DARP with exhaustive_search
Reservation 7 (person ('7',)) cannot be served
Solve ILP

Run dispatcher
Pending reservations: ['8']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ New reservations: ['1', '2', '3']
Pending reservations: []
Solve DARP with simple_rerouting
Solve ILP
Dispatch: taxiB_1y_3y_3z_1z
Dispatch: taxiB_3y_1y_3z_1z

Run dispatcher
New reservations: ['4', '5', '6']
Expand All @@ -27,48 +27,40 @@ Solve DARP with simple_rerouting
Run dispatcher
Pending reservations: ['2', '4', '5', '6', '7', '8', '9']
Solve DARP with simple_rerouting
Solve ILP

Run dispatcher
Pending reservations: ['2', '4', '5', '6', '7', '8', '9']
Solve DARP with simple_rerouting
Solve ILP

Run dispatcher
Pending reservations: ['2', '4', '5', '6', '7', '8', '9']
Solve DARP with simple_rerouting
Solve ILP

Run dispatcher
Pending reservations: ['2', '4', '5', '6', '7', '8', '9']
Solve DARP with simple_rerouting
Solve ILP

Run dispatcher
Pending reservations: ['2', '4', '5', '6', '7', '8', '9']
Solve DARP with simple_rerouting
Solve ILP

Run dispatcher
Pending reservations: ['2', '4', '5', '6', '7', '8', '9']
Solve DARP with simple_rerouting
Reservation 2 (person ('2',)) cannot be served
Reservation 6 (person ('6',)) cannot be served
Solve ILP

Run dispatcher
Pending reservations: ['4', '5', '7', '8', '9']
Solve DARP with simple_rerouting
Reservation 4 (person ('4',)) cannot be served
Reservation 5 (person ('5',)) cannot be served
Solve ILP

Run dispatcher
Pending reservations: ['7', '8', '9']
Solve DARP with simple_rerouting
Reservation 7 (person ('7',)) cannot be served
Reservation 9 (person ('9',)) cannot be served
Solve ILP

Run dispatcher
Pending reservations: ['8']
Expand Down
2 changes: 1 addition & 1 deletion tools/drt/drtOnline.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def main():
# TODO specific cost for vehicle can be consider here
bonus_cost = (sum(routes[trip_id][2]) + 1) * options.cost_per_trip
# generate dict with costs
costs.update({idx: routes[trip_id][0] + bonus_cost})
costs.update({idx: 10 * (routes[trip_id][0] + bonus_cost)})
# generate dict with vehicle used in the trip
veh_constraints.update({idx: routes[trip_id][1]})
# generate dict with served reservations in the trip
Expand Down

0 comments on commit 6266712

Please sign in to comment.