First time using Jump

Hello all,
I am new to JuMP and Julia.
I am getting this error:
LoadError: UndefVarError: @optimize! not defined
in expression starting at c:\Users\alex-\Documents\OR Lab\Introduction to Julia JuMP.jl:49

After @optimize!(model)

Could you help me out?

When running the following code. I have already installed JuMP and Highs with Pkg.add(" "):

using JuMP
using HiGHS


Methods/ dir()


Declare Solver

using GLPK

Define the Model

model = Model(HiGHS.Optimizer)

Create Variables



Specify constraint

@constraint(model, y<=5)


Define Objective Function

@objective(model, Max,5x + 6y)


@show model

Solving/ Optimizing


1 Like

I think you need optimize!(model) not @optim...


Heres a tutorial to get started

Thank, that solved the problem!

1 Like