Julia is working beautifully on an LP problem on my mac.
My optimisation problem is structured with inequality constraints and the sense vector:
sol = linprog(-f,A,sense,b,lb,ub,ClpSolver())
For some reason running the same code on Windows 10, I get an error:
ClpSolver is no longer supported. If you are using JuMP, upgrade to the latest version and use Clp.Optimizer instead. If you are using MathProgBase (e.g., via lingprog), you will need to upgrade to MathOptInterface (https://github.com/JuliaOpt/MathOptInterface.jl).
Is there a simple way to take these matrices and get them to work under either of the options referred to in the error, using the matrices and vectors I have already created. I have spent the entire morning reading docs for this and am just confused. Some don’t use the sense vector, others I just don’t understand.
There must be a simple way to “upgrade” this previously working code, keeping it simple?
The support for MathProgBase was just dropped in v0.8 that was released 16 hours ago. I guess you were using Clp.jl v0.7.2 on your mac.
The recommendation is to use JuMP now instead of linprog. From the input of linprog, you can do
using JuMP, Clp
model = Model(Clp.Optimizer)
@variable(model, lb[i] <= x[i=1:length(lb)] <= ub[i])
@objective(model, Max, f'x)
# Depending on the `sense` vector, you may need to split it into `<=` and `>=` constraints too
@constraint(model, A * x .== b)
optimize!(model)