Skip to content

exanauts/SqpSolver.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SqpSolver.jl

Run tests codecov

This is a Julia package that implements sequantial quadratic programming algorithms for continuous nonlinear optimization.

Installation

]add SqpSolver

Example

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 SqpSolver, JuMP
using Ipopt # can be any QP solver

# Number of variables
n = 1

# Build nonlinear problem model via JuMP
model = Model(optimizer_with_attributes(
    SqpSolver.Optimizer, 
    "external_optimizer" => Ipopt.Optimizer,
))
@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)

Acknowledgements

This material is based upon work supported by the U.S. Department of Energy, Office of Science, under contract number DE-AC02-06CH11357.

About

A sequential quadratic programming solver in Julia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages