fix for solve_in_loop script

This commit is contained in:
Marek Kaluba 2023-04-13 01:00:22 +02:00
parent 9afbccda15
commit ed832d69fb
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
1 changed files with 4 additions and 5 deletions

View File

@ -81,14 +81,13 @@ function solve_in_loop(model::JuMP.Model, args...; logdir, optimizer, data)
abs(certified_λ - old_lambda) /
(abs(certified_λ) + abs(old_lambda))
@info "Certification failed with λ = " certified_λ rel_change status
if rel_change < 1e-9
@info "No progress detected, breaking" certified_λ rel_change status
break
end
end
old_lambda = certified_λ
if rel_change < 1e-9
@info "No progress detected, breaking" certified_λ rel_change status
break
end
end
return status == JuMP.OPTIMAL ? old_lambda : NaN