This is a Julia package that implements active set methods for continuous nonlinear optimization. The package currently implements sequential linear programming methods.
]add https://github.com/exanauts/ActiveSetMethods.jl
Consider the following quadratic optimization problem
min x^2 + x
s.t. x^2 - x = 2
This problem can be solved by the following code snippet:
# Load packages
using ActiveSetMethods, JuMP
using GLPK # can be any LP solver
# Number of variables
n = 1
# Build nonlinear problem model via JuMP
model = Model(optimizer_with_attributes(
ActiveSetMethods.Optimizer,
"external_optimizer" => GLPK.Optimizer,
"algorithm" => "Line Search",
))
@variable(model, x)
@objective(model, Min, x^2 + x)
@NLconstraint(model, x^2 - x == 2)
# Solve optimization problem
JuMP.optimize!(model)
# Retrieve solution
Xsol = JuMP.value.(X)
This material is based upon work supported by the U.S. Department of Energy, Office of Science, under contract number DE-AC02-06CH11357.