Stop Criteria using JuMP with HiGHS when find the first feasible solution

I have a MILP problem, which is feasible, and I would like to stop the model run when the solver find the first feasible solution. Is it possible to use a stop criteria like that?
I can only find one about time limit

You can use a Feasibility objective, as described in this section:

something like:

@objective(model, MOI.FEASIBILITY_SENSE, 0)

Hi @grem, welcome to the forum.

You could try setting the mip_max_improving_sols option:

using JuMP, HiGHS
model = Model(HiGHS.Optimizer)
set_attribute(model, "mip_max_improving_sols", 1)

Thank you @odow, it works! The exact syntax is:

using JuMP, HiGHS
model = Model(HiGHS.Optimizer)
set_optimizer_attribute(model, "mip_max_improving_sols", 1)

Thank you for your help @Dan. I don’t understand exactly what is suppose to do this option but it looks that it is going through all solutions to identify the feasible ones. It doesn’t stop at the first feasible one.