Skip to content

Commit

Permalink
[drtORTools] fixing tests, ref. #11429
Browse files Browse the repository at this point in the history
  • Loading branch information
rummel123 committed May 2, 2023
1 parent 5d76d08 commit 594246d
Show file tree
Hide file tree
Showing 14 changed files with 555 additions and 326 deletions.
15 changes: 7 additions & 8 deletions tests/tools/drt/drtOR-Tools/direct_route_factor_1/output.tools
@@ -1,4 +1,3 @@
Retrying in 1 seconds
Simulation parameters:
end: 600.0
interval: 30
Expand All @@ -23,21 +22,21 @@ Start solving the problem.
Register distance callback.
Add distance constraints...
Add pickup and delivery constraints...
pickup/dropoff indexes (nodes): 0/2 (1/3)
pickup/dropoff nodes: 1/3
allow to reject new reservation 0
pickup/dropoff indexes (nodes): 1/3 (2/4)
pickup/dropoff nodes: 2/4
allow to reject new reservation 1
Add direct route factor constraints...
reservation 0 with direct route cost 680 * drf 1.0 = max cost 680
reservation 1 with direct route cost 385 * drf 1.0 = max cost 385
Add dropoff constraints...
Add capacity constraints...
Add time windows constraints...
window for index(node) 0(1): [1, 600]
window for index(node) 1(2): [1, 600]
window for index(node) 2(3): [1, 600]
window for index(node) 3(4): [1, 600]
window for index(node) 4(5): [1, 600]
window for node 1: [1, 600]
window for node 2: [1, 600]
window for node 3: [1, 600]
window for node 4: [1, 600]
window for node 5: [1, 600]
## Done
Set solution heuristic...
Start solving the problem.
Expand Down
15 changes: 7 additions & 8 deletions tests/tools/drt/drtOR-Tools/direct_route_factor_3/output.tools
@@ -1,4 +1,3 @@
Retrying in 1 seconds
Simulation parameters:
end: 600.0
interval: 30
Expand All @@ -23,21 +22,21 @@ Start solving the problem.
Register distance callback.
Add distance constraints...
Add pickup and delivery constraints...
pickup/dropoff indexes (nodes): 0/2 (1/3)
pickup/dropoff nodes: 1/3
allow to reject new reservation 0
pickup/dropoff indexes (nodes): 1/3 (2/4)
pickup/dropoff nodes: 2/4
allow to reject new reservation 1
Add direct route factor constraints...
reservation 0 with direct route cost 680 * drf 3.0 = max cost 2040
reservation 1 with direct route cost 385 * drf 3.0 = max cost 1155
Add dropoff constraints...
Add capacity constraints...
Add time windows constraints...
window for index(node) 0(1): [1, 600]
window for index(node) 1(2): [1, 600]
window for index(node) 2(3): [1, 600]
window for index(node) 3(4): [1, 600]
window for index(node) 4(5): [1, 600]
window for node 1: [1, 600]
window for node 2: [1, 600]
window for node 3: [1, 600]
window for node 4: [1, 600]
window for node 5: [1, 600]
## Done
Set solution heuristic...
Start solving the problem.
Expand Down
37 changes: 32 additions & 5 deletions tests/tools/drt/drtOR-Tools/oneTaxi_addNewReq/output.tools
@@ -1,3 +1,10 @@
Simulation parameters:
end: 600.0
interval: 30
time_limit: 10
cost_type: CostType.DISTANCE
drf: -1.0
fix_allocation: False
timestep: 0.0
Reservations waiting: ['0', '1']
Taxis empty: ('v0',)
Expand All @@ -9,24 +16,35 @@ Reservation 0 starts at edge B0C0
Reservation 1 starts at edge C0D0
Reservation 0 ends at edge C1D1
Reservation 1 ends at edge D0D1
Reservation 0 has direct route costs 680
Reservation 1 has direct route costs 385
Start solving the problem.
Register distance callback.
Add distance constraints...
Add pickup and delivery constraints...
pickup/dropoff nodes: 1/3
allow to reject new reservation 0
pickup/dropoff nodes: 2/4
allow to reject new reservation 1
Add dropoff constraints...
Add capacity constraints...
Add time windows constraints...
window for node 1: [1, 600]
window for node 2: [1, 600]
window for node 3: [1, 600]
window for node 4: [1, 600]
window for node 5: [1, 600]
## Done
Set solution heuristic...
Start solving the problem.
Objective: 225735
Objective: 2235
Route for vehicle 0:
5 (L: 0, C: 0, T: (1,310))
-> 1 (L: 1, C: 588, T: (43,352))
-> 2 (L: 2, C: 1174, T: (85,394))
-> 4 (L: 1, C: 1559, T: (176,485))
-> 3 (L: 0, C: 2235, T: (291,600))
-> 0 (L: 0, C: 2235, T: (291,1972))
-> 0 (L: 0, C: 2235, T: (291,600))
Costs of the route: 2235

Total cost of the routes: 2235
Expand Down Expand Up @@ -62,24 +80,33 @@ do reservations: ['0']
Reservation 2 starts at edge C2C1
Reservation 2 ends at edge D1D2
Drop-off of reservation 0 at edge C1D1
Reservation 2 has direct route costs 485
Start solving the problem.
Register distance callback.
Add distance constraints...
Add pickup and delivery constraints...
pickup/dropoff nodes: 1/2
allow to reject new reservation 2
Add dropoff constraints...
reservation 0 in veh v0 (0)
reservation 0 in veh v0(0), droppoff node: 3
Add capacity constraints...
Add time windows constraints...
window for node 1: [180, 600]
window for node 2: [180, 600]
window for node 3: [180, 600]
window for node 4: [180, 600]
## Done
Set solution heuristic...
Start solving the problem.
Objective: 125240
Initial solution:
veh 0: [3]
Objective: 1240
Route for vehicle 0:
4 (L: 1, C: 0, T: (180,380))
-> 1 (L: 2, C: 470, T: (219,419))
-> 3 (L: 1, C: 855, T: (310,510))
-> 2 (L: 0, C: 1240, T: (400,600))
-> 0 (L: 0, C: 1240, T: (400,897))
-> 0 (L: 0, C: 1240, T: (400,600))
Costs of the route: 1240

Total cost of the routes: 1240
Expand Down
15 changes: 7 additions & 8 deletions tests/tools/drt/drtOR-Tools/time_window1/output.tools
@@ -1,4 +1,3 @@
Retrying in 1 seconds
Simulation parameters:
end: 600.0
interval: 30
Expand All @@ -23,21 +22,21 @@ Start solving the problem.
Register distance callback.
Add distance constraints...
Add pickup and delivery constraints...
pickup/dropoff indexes (nodes): 0/2 (1/3)
pickup/dropoff nodes: 1/3
allow to reject new reservation 0
pickup/dropoff indexes (nodes): 1/3 (2/4)
pickup/dropoff nodes: 2/4
allow to reject new reservation 1
Add direct route factor constraints...
reservation 0 with direct route cost 680 * drf 1.5 = max cost 1020
reservation 1 with direct route cost 385 * drf 1.5 = max cost 578
Add dropoff constraints...
Add capacity constraints...
Add time windows constraints...
window for index(node) 0(1): [200, 600]
window for index(node) 1(2): [1, 600]
window for index(node) 2(3): [1, 600]
window for index(node) 3(4): [1, 190]
window for index(node) 4(5): [1, 600]
window for node 1: [200, 600]
window for node 2: [1, 600]
window for node 3: [1, 600]
window for node 4: [1, 190]
window for node 5: [1, 600]
## Done
Set solution heuristic...
Start solving the problem.
Expand Down
15 changes: 7 additions & 8 deletions tests/tools/drt/drtOR-Tools/time_window2/output.tools
@@ -1,4 +1,3 @@
Retrying in 1 seconds
Simulation parameters:
end: 600.0
interval: 30
Expand All @@ -23,21 +22,21 @@ Start solving the problem.
Register distance callback.
Add distance constraints...
Add pickup and delivery constraints...
pickup/dropoff indexes (nodes): 0/2 (1/3)
pickup/dropoff nodes: 1/3
allow to reject new reservation 0
pickup/dropoff indexes (nodes): 1/3 (2/4)
pickup/dropoff nodes: 2/4
allow to reject new reservation 1
Add direct route factor constraints...
reservation 0 with direct route cost 680 * drf 1.5 = max cost 1020
reservation 1 with direct route cost 385 * drf 1.5 = max cost 578
Add dropoff constraints...
Add capacity constraints...
Add time windows constraints...
window for index(node) 0(1): [1, 600]
window for index(node) 1(2): [200, 600]
window for index(node) 2(3): [1, 190]
window for index(node) 3(4): [1, 600]
window for index(node) 4(5): [1, 600]
window for node 1: [1, 600]
window for node 2: [200, 600]
window for node 3: [1, 190]
window for node 4: [1, 600]
window for node 5: [1, 600]
## Done
Set solution heuristic...
Start solving the problem.
Expand Down

0 comments on commit 594246d

Please sign in to comment.