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

BF: allow tiny leeway in previous cost functions to improve robustness

parent b85a9aae
No related branches found
No related tags found
1 merge request!8Make optimisation more robust
Pipeline #25452 failed
...@@ -78,7 +78,7 @@ function build_sequence(f::Function, scanner::Union{Nothing, Scanner}, model::Tu ...@@ -78,7 +78,7 @@ function build_sequence(f::Function, scanner::Union{Nothing, Scanner}, model::Tu
prev_cost_func = nothing prev_cost_func = nothing
for cost_func in iterate_cost() for cost_func in iterate_cost()
if !isnothing(prev_cost_func) if !isnothing(prev_cost_func)
@constraint jump_model prev_cost_func == objective_value(jump_model) @constraint jump_model prev_cost_func <= objective_value(jump_model) + (1 + 1e-12)
end end
optimise_with_cost_func(jump_model, cost_func, n_attempts) optimise_with_cost_func(jump_model, cost_func, n_attempts)
prev_cost_func = cost_func prev_cost_func = cost_func
......
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