diff --git a/wrappers/pyvrp.rb b/wrappers/pyvrp.rb index 922cbb88..5cf97c66 100644 --- a/wrappers/pyvrp.rb +++ b/wrappers/pyvrp.rb @@ -314,11 +314,9 @@ def build_vehicles(vrp) vrp.vehicles.map { |veh| capacity_hash = all_units.map{ |id, _unit| [id, MAX_INT64] }.to_h - limit_hash = all_units.map{ |id, _unit| [id, MAX_INT64] }.to_h veh.capacities.each do |capacity| capacity_hash[capacity.unit_id] = (capacity.limit && (capacity.limit * CUSTOM_QUANTITY_BIGNUM).to_i || MAX_INT_UNITS) - limit_hash[capacity.unit_id] = capacity.initial&.to_i || capacity.limit&.to_i || MAX_INT64 end capacity_skills = Array.new(@skills_index_hash.size, 0) diff --git a/wrappers/pyvrp_wrapper.py b/wrappers/pyvrp_wrapper.py index e363b8ed..d84df2fe 100644 --- a/wrappers/pyvrp_wrapper.py +++ b/wrappers/pyvrp_wrapper.py @@ -34,7 +34,7 @@ def main(input_path, output_path, timeout=None): data = ProblemData.from_dict(json_data) m = Model.from_data(data) # Solve the problem - penalty_params = PenaltyParams(min_penalty=1e10, max_penalty=1e10) + penalty_params = PenaltyParams(min_penalty=1e5, max_penalty=1e10) solve_params = SolveParams(penalty=penalty_params) result = m.solve(stop=MaxRuntime(int(timeout)), params=solve_params)