# Basic usage of MultiJuMP

**URL:** <https://discourse.julialang.org/t/basic-usage-of-multijump/21542>\
**Category:** Optimization (Mathematical)\
**Tags:** jump, optimization\
**Created:** [March 6, 2019, 3:36pm UTC](https://discourse.julialang.org/t/basic-usage-of-multijump/21542 "2019-03-06T15:36:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![orhan\_abar](https://avatars.discourse-cdn.com/v4/letter/o/e5b9ba/32.png) [@orhan\_abar](https://discourse.julialang.org/u/orhan_abar)\
**Post date:** [March 6, 2019, 3:36pm UTC](https://discourse.julialang.org/t/basic-usage-of-multijump/21542/1 "2019-03-06T15:36:37Z")

</div>

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?

```julia
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 :

```julia
UndefVarError: multi_model not defined

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

```

---

<div class="post-metadata">

**Author:** ![orhan\_abar](https://avatars.discourse-cdn.com/v4/letter/o/e5b9ba/32.png) [@orhan\_abar](https://discourse.julialang.org/u/orhan_abar)\
**Post date:** [March 23, 2019, 6:25pm UTC](https://discourse.julialang.org/t/basic-usage-of-multijump/21542/2 "2019-03-23T18:25:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [March 23, 2019, 10:52pm UTC](https://discourse.julialang.org/t/basic-usage-of-multijump/21542/3 "2019-03-23T22:52:09Z")

</div>

x-ref: [https://github.com/anriseth/MultiJuMP.jl/issues/35](https://github.com/anriseth/MultiJuMP.jl/issues/35)
