Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repetiton parameter should not be ignored! and multitrips expand recursion fix #36

Merged
merged 2 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/v01/vrp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ def self.vrp_request_resolution(this)
this.optional(:several_solutions, type: Integer, allow_blank: false, default: 1, desc: 'Return several solution computed with different matrices')
this.optional(:batch_heuristic, type: Boolean, default: OptimizerWrapper.config[:debug][:batch_heuristic], desc: 'Compute each heuristic solution')
this.optional(:variation_ratio, type: Integer, desc: 'Value of the ratio that will change the matrice')
this.optional(:repetition, type: Integer, documentation: { hidden: true }, desc: 'Number of times the optimization process is going to be repeated. Only the best solution is returned.')
this.at_least_one_of :duration, :iterations, :iterations_without_improvment, :stable_iterations, :stable_coefficient, :initial_time_out, :minimum_duration
this.mutually_exclusive :initial_time_out, :minimum_duration
end
Expand Down
1 change: 1 addition & 0 deletions lib/interpreters/multi_trips.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def expand(vrp)
(0..vehicle.trips - 1).collect{ |index|
new_vehicle = Marshal.load(Marshal.dump(vehicle))
new_vehicle.id += "_trip_#{index}"
new_vehicle.trips = 1
new_vehicle
}
else
Expand Down