How to programmatically check optimisation status in JuMP >= 0.19

Which is the equivalent of status=solve(model); if status == :Optimal in JuMP >= 0.19 ?

optimize!(model); if termination_status(model) == ????

1 Like

got it:

termination_status(model) == MOI.OPTIMAL

a bit more complicated :wink:

Here are the relevant docs: Query Solutions · JuMP

1 Like