Skip to content

Commit ec103d5

Browse files
committed
Fix service duration
1 parent 8a8ed8b commit ec103d5

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.nextmv/golden/python-pyvroom-routing/inputs/no-matrix.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"defaults": {
3+
"stops": {
4+
"duration": 300
5+
}
6+
},
27
"vehicles": [
38
{
49
"id": "vehicle-1",

.nextmv/golden/python-pyvroom-routing/inputs/no-matrix.json.golden

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
{
3434
"arrival": 1112,
3535
"duration": 1112,
36-
"service": 0,
36+
"service": 300,
3737
"setup": 0,
3838
"stop": {
39+
"duration": 300,
3940
"id": "stop-1",
4041
"location": {
4142
"lat": 51.9622,
@@ -47,11 +48,12 @@
4748
"waiting_time": 0
4849
},
4950
{
50-
"arrival": 2224,
51+
"arrival": 2524,
5152
"duration": 2224,
52-
"service": 0,
53+
"service": 300,
5354
"setup": 0,
5455
"stop": {
56+
"duration": 300,
5557
"id": "stop-2",
5658
"location": {
5759
"lat": 51.9722,
@@ -63,11 +65,12 @@
6365
"waiting_time": 0
6466
},
6567
{
66-
"arrival": 3336,
68+
"arrival": 3936,
6769
"duration": 3336,
68-
"service": 0,
70+
"service": 300,
6971
"setup": 0,
7072
"stop": {
73+
"duration": 300,
7174
"id": "stop-3",
7275
"location": {
7376
"lat": 51.9822,
@@ -79,7 +82,7 @@
7982
"waiting_time": 0
8083
},
8184
{
82-
"arrival": 4448,
85+
"arrival": 5348,
8386
"duration": 4448,
8487
"service": 0,
8588
"setup": 0,

python-pyvroom-routing/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def solve(self, input: nextmv.Input) -> nextmv.Output:
8585
vroom.Job(
8686
id=i,
8787
location=i,
88-
service_per_type={str(i): durations[i] for i in range(len(durations))},
88+
default_service=durations[i],
8989
delivery=[-quantities[i]],
9090
pickup=[quantities[i]],
9191
)

0 commit comments

Comments
 (0)