jump-dev / HiGHS.jl

A Julia interface to the HiGHS solver
https://highs.dev
MIT License
108 stars 15 forks source link

Termination status when hitting a solution number limit #143

Closed ccoffrin closed 1 year ago

ccoffrin commented 1 year ago

When using the option, mip_max_improving_sols the termination_status is ITERATION_LIMIT but based on the status code documentation I think SOLUTION_LIMIT would be more suitable.

MWE

using JuMP, HiGHS

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

n = 10

v = rand(n)
w = rand(n)

@variable(model, 0 <= x[1:n] <= 10, Int)

@objective(model, Max, sum(v[i]*x[i] for i=1:n))

@constraint(model, sum(w[i]*x[i] for i=1:n) <= 10)

optimize!(model)

println(termination_status(model))
println(primal_status(model))
println(objective_value(model))
println(value.(x))

CC @robbybp

odow commented 1 year ago

Closing because we're just reporting what upstream tells us. I've reopened the upstream issue.