Closed prottay closed 3 years ago
Thanks for checking out Juniper and Julia.
Have you added Juniper, JuMP and Ipopt?
This can be done with
] add Juniper
in the REPL ( same for JuMP and Ipopt of course)
Afterwards you need to include them with
using JuMP, Juniper, Ipopt
Hope this helps you out!
That helps. Thanks. You're a savior.
I am trying to run the basic example provided.
using LinearAlgebra # for the dot product m = Model(optimizer_with_attributes(optimizer, "nl_solver"=>nl_solver))
v = [10,20,12,23,42] w = [12,45,12,22,21] @variable(m, x[1:5], Bin)
@objective(m, Max, dot(v,x))
@NLconstraint(m, sum(w[i]*x[i]^2 for i=1:5) <= 45)
optimize!(m)
println(JuMP.value.(x)) println(JuMP.objective_value(m)) println(JuMP.termination_status(m))
This is the error message I am seeing.
ERROR: LoadError: UndefVarError: optimizer_with_attributes not defined
I am not quite sure how to tackle it, I am new with Julia and Juniper. Any help is appreciated.