Compare commits
No commits in common. "7df4ab1c56e60a582abc039e9cb000ed3d574b2a" and "06f8039f4029d25208f8bab2fe3c61f416ceceaa" have entirely different histories.
7df4ab1c56
...
06f8039f40
@ -28,7 +28,10 @@ module VNS
|
||||
@best_solution = @initial_solution
|
||||
@best_score = @target_function.call(@best_solution)
|
||||
|
||||
puts "Initial score: #{@best_score.to_f}"
|
||||
|
||||
self.class.sequence(@perturbations).each do |perturbation|
|
||||
puts "Running perturbation: #{perturbation.name}"
|
||||
optimize(perturbation.new(@best_solution))
|
||||
end
|
||||
|
||||
@ -45,6 +48,8 @@ module VNS
|
||||
@best_solution = alternative_solution.deep_dup
|
||||
@best_score = score
|
||||
|
||||
puts "New lowest score: #{@best_score.to_f}"
|
||||
|
||||
return optimize(perturbation.class.new(@best_solution))
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user