diff --git a/api/v01/vrp.rb b/api/v01/vrp.rb index cb11eda33..b8f119236 100644 --- a/api/v01/vrp.rb +++ b/api/v01/vrp.rb @@ -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 diff --git a/lib/interpreters/multi_trips.rb b/lib/interpreters/multi_trips.rb index d47856b4d..01799c1fc 100644 --- a/lib/interpreters/multi_trips.rb +++ b/lib/interpreters/multi_trips.rb @@ -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