How to define an optimizer package?

Whenever I try to compile the solver declaration the following error appears

using JuMP, JuMPeR, Cbc, MathOptInterface
ModelD = Model(with_optimizer(Cbc.Optimizer))
Error message: UndefVarError: with_optimizer not defined

I also tried it that way and it didn’t work

ModelD = Model(solver=CbcSolver())

What is your JuMP version? The docs for the latest version do not mention with_optimizer anymore ( Perhaps

julia> model = Model(Cbc.Optimizer);


JuMPeR uses an older version of JuMP (0.18), but it looks like you have a more recent version installed (probably >0.18).
If that’s the case, try pinning JuMP v0.18 and using the corresponding JuMP syntax.

1 Like

Hi @kristoffer.carlsson

I’m using this version v0.18.6
Unfortunately your suggestion didn’t work.

Hi @mtanneau

I’m using this version v0.6.0 of JuMPeR and v0.18.6 of JuMP

Please read the warning at the top of the documentation:

1 Like

Hi @odow
Thanks for the suggestion, but I’m still unable to use the Cbc solver