Skip to content

Commit

Permalink
Merge pull request #36 from senhalil/dev
Browse files Browse the repository at this point in the history
repetiton parameter should not be ignored! and multitrips expand recursion fix
  • Loading branch information
fab-girard authored Jul 2, 2020
2 parents 40173a7 + 5d76e2c commit 5a94416
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
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

0 comments on commit 5a94416

Please sign in to comment.