Skip to content

Commit

Permalink
[OO] Base setup_duration on point_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Graber committed Jul 11, 2022
1 parent a831f59 commit 523e09e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

### Changed

- Base `setup_duration` within optimizer-ortools on `point_id` instead of `matrix_index` [#444] (https://github.com/Mapotempo/optimizer-api/pull/444)

### Removed

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion wrappers/ortools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def solve(vrp, job, thread_proc = nil, &block)
!q.nil? && (q.fill || q.empty)
},
problem_index: service_index,
point_id: service.activity.point_id
)

services = update_services_positions(services, services_positions, service.id,
Expand Down Expand Up @@ -237,6 +238,7 @@ def solve(vrp, job, thread_proc = nil, &block)
!q.nil? && (q.fill || q.empty)
},
problem_index: service_index,
point_id: possible_activity.point_id
)

services = update_services_positions(services, services_positions, service.id,
Expand Down Expand Up @@ -310,7 +312,8 @@ def solve(vrp, job, thread_proc = nil, &block)
max_ride_time: vehicle.maximum_ride_time || 0,
max_ride_distance: vehicle.maximum_ride_distance || 0,
free_approach: vehicle.free_approach || false,
free_return: vehicle.free_return || false
free_return: vehicle.free_return || false,
start_point_id: vehicle.start_point_id.to_s
)
}

Expand Down
2 changes: 2 additions & 0 deletions wrappers/ortools_vrp_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 523e09e

Please sign in to comment.