Skip to content
Snippets Groups Projects
Unverified Commit f311a829 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Return sequence even if cost function is still fractionally decreasing

parent 8a875db7
No related branches found
No related tags found
1 merge request!7Add variables as properties
Pipeline #25448 failed
......@@ -116,10 +116,10 @@ function optimise_with_cost_func(jump_model::Model, cost_func, n_attempts)
end
optimize!(jump_model)
if termination_status(jump_model) in (LOCALLY_SOLVED, OPTIMAL)
if objective_value(jump_model) < min_objective
min_objective = objective_value(jump_model)
elseif isapprox(min_objective, objective_value(jump_model), rtol=1e-6)
if isapprox(min_objective, objective_value(jump_model), rtol=1e-6)
break
elseif objective_value(jump_model) < min_objective
min_objective = objective_value(jump_model)
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment