HiGHS.jl icon indicating copy to clipboard operation
HiGHS.jl copied to clipboard

Support MOI.VariablePrimalStart

Open hannes-uppman opened this issue 3 years ago • 3 comments

The second set_start_value in this example fails with message ERROR: LoadError: MathOptInterface.UnsupportedAttribute{MathOptInterface.VariablePrimalStart}: Attribute MathOptInterface.VariablePrimalStart() is not supported by the model.

using JuMP
using HiGHS

model = Model(HiGHS.Optimizer)
@variable(model, x[i=1:10], Bin)

set_start_value(x[1], 0)
optimize!(model)
set_start_value(x[1], 1)
optimize!(model)

I'm using HiGHS v1.1.4, JuMP v1.1.1, Julia 1.7.3.

hannes-uppman avatar Sep 06 '22 05:09 hannes-uppman

In fact, we don't support start values at all (the first start value is silently ignored by HiGHS). I've updated the title to reflect that.

odow avatar Sep 06 '22 20:09 odow

I talked to @blegat, and we should also look into why MOI threw an error here, instead of ignoring it.

odow avatar Sep 09 '22 02:09 odow

This requires setHotStart to be exposed upstream: https://github.com/ERGO-Code/HiGHS/blob/437c98b08710433d8a2052d341f6250b17a016c5/src/Highs.h#L933-L937

Requires setSolution, which was added https://github.com/ERGO-Code/HiGHS/commit/ecf9b931f8e8604cbe561ac750afeb53e7ad8f7c but isn't in a released version yet.

odow avatar Sep 12 '22 02:09 odow