JuMP: http://www.juliaopt.org/JuMP.jl/stable/index.html
IpOpt: https://ipoptjl.readthedocs.io/en/latest/ipopt.html
VERSION
using JuMP using Ipopt
m = Model(solver = IpoptSolver()) @variable(m, x, start = 0.0) @variable(m, y, start = 0.0) @NLobjective(m, Min, (1-x)^2 + 100(y-x^2)^2) solve(m) println("x = ", getvalue(x), " y = ", getvalue(y))
# adding a (linear) constraint @constraint(m, x + y == 10) solve(m) println("x = ", getvalue(x), " y = ", getvalue(y))
using Ipopt m = Model(solver=IpoptSolver()) @variable(m, 0 <= x <= 2 ) @variable(m, 0 <= y <= 30 ) @objective(m, Min, x*x+ 2x*y + y*y ) @constraint(m, x + y >= 1 ) print(m) status = solve(m)
print(status)
println("x = ", getvalue(x), "and y = ", getvalue(y))