From 1c76d10b6b4d9ec2842df7af7e45908e037022b7 Mon Sep 17 00:00:00 2001 From: Michiel Cottaar <MichielCottaar@protonmail.com> Date: Tue, 10 Sep 2024 10:29:47 +0100 Subject: [PATCH] BF: allow tiny leeway in previous cost functions to improve robustness --- src/build_sequences.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build_sequences.jl b/src/build_sequences.jl index c732fd2..19f2d7c 100644 --- a/src/build_sequences.jl +++ b/src/build_sequences.jl @@ -78,7 +78,7 @@ function build_sequence(f::Function, scanner::Union{Nothing, Scanner}, model::Tu prev_cost_func = nothing for cost_func in iterate_cost() 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 optimise_with_cost_func(jump_model, cost_func, n_attempts) prev_cost_func = cost_func -- GitLab