I’m trying to do a MIP-start on a multicommodity capacitated fixed-charge network design problem using JuMP 0.19 and CPLEX 12.8 with the set_start_value function, but I keep getting the following error : MathOptInterface.UnsupportedAttribute{MathOptInterface.VariablePrimalStart}: Attribute MathOptInterface.VariablePrimalStart() is not supported by the model.

Here is a made up example that produces the error:

using JuMP
using CPLEX
model = Model(with_optimizer(CPLEX.Optimizer))
@variable(model,0<= x[1:10] <= 12)
@variable(model, y[1:5],Bin)
@constraint(model, x[3] == 4y[2])
@constraint(model, con, sum(y->1-y,y)>=3)
@objective(model,Max, sum(x)+15*sum(y))
optimize!(model)#1
for i in y
set_start_value(i,0)
end
optimize!(model)#2

If I remove #1, the error becomes a warning saying that MathOptInterface.VariablePrimalStart() is not supported by MathOptInterface.Bridges.LazyBridgeOptimizer and that the information will be discarded.

Since I am rather new to Julia, I would like to understand whether the error is caused by a mistake or misunderstanding of the documentation on my part or by a known problem in MOI or JuMP and how I should go about fixing it.
It would also be nice to know why the error sometimes becomes a warning.

Since I am rather new to Julia, I would like to understand whether the error is caused by a mistake or misunderstanding of the documentation on my part or by a known problem in MOI or JuMP and how I should go about fixing it.

Since the transition to MOI, some things are still a little rough around the edges. Part of the problem is that MOI keeps getting new things added to it, and the solver wrappers haven’t always kept up. (I don’t have, or use CPLEX for example, so it isn’t a priority for me.)

We’re in the process of finishing up a new release of MOI, which addresses a number of issues, but it means that all of the solver wrappers will have to updated (yet again). However, we’re taking advantage of this change to re-write the wrappers to simplify them and ensure that they code to the full MOI API (see, e.g., Gurobi and GLPK).

If you’re interested (and have a few days spare), it would be great to re-write the CPLEX wrapper. It might seem daunting at first, but it shouldn’t be too hard, because you can copy-and-paste the Gurobi.jl wrapper, and then it’s mostly some function re-naming. It’s more tedious if anything. Let me know, and we can point you in the right direction.

Unfortunately, I will not be able to help with the Cplex wrapper and the project will have to migrate to C++. Thank you very much for your answer. I hope I will be able to contribute in the future.

I have the same issue here. I try a very simple problem (see the code below). Note that the initial solution is actually one of the optimal solution. However, I got “Warning, invalid warm-start basis discarded”. When I use Cbc, I got the same warning.
I am not sure what I did wrong and how to fix it.