Basic usage of MultiJuMP


I am planning to start working on multi objective optimization and found MultiJuMP. But the example on the read me page is throwing an error. It looks like it doesn’t recognize the main function of the optimization. Does anybody know if it is working with newest version of JuMP after they made significant change?

using MultiJuMP, JuMP
using Clp: ClpSolver

const mmodel = multi_model(solver = ClpSolver(), linear = true)
const y = @variable(mmodel, 0 <= y <= 10.0)
const z = @variable(mmodel, 0 <= z <= 10.0)
@constraint(mmodel, y + z <= 15.0)

# objectives
const exp_obj1 = @expression(mmodel, -y +0.05 * z)
const exp_obj2 = @expression(mmodel, 0.05 * y - z)
const obj1 = SingleObjective(exp_obj1)
const obj2 = SingleObjective(exp_obj2)

# setting objectives in the data
const multim = get_multidata(mmodel)
multim.objectives = [obj1, obj2]

solve(mmodel, method = WeightedSum())

# Get the Utopia and Nadir points
utopiapoint = getutopia(multim)
nadirpoint = getnadir(multim)

Error is :

UndefVarError: multi_model not defined

 [1] top-level scope at In[38]:3

Downgrading MultiJuMP solved the issue for now but I think it should be updated to work with the newest version of JuMP.