https://github.com/exanauts/activesetmethods
A Julia implementation of active set methods for continuous nonlinear optimization
https://github.com/exanauts/activesetmethods
julia nonlinear-optimization optimization-algorithms
Last synced: over 1 year ago
JSON representation
A Julia implementation of active set methods for continuous nonlinear optimization
- Host: GitHub
- URL: https://github.com/exanauts/activesetmethods
- Owner: exanauts
- License: mit
- Created: 2020-05-21T18:36:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-28T16:17:24.000Z (over 4 years ago)
- Last Synced: 2024-01-24T18:45:24.864Z (over 2 years ago)
- Topics: julia, nonlinear-optimization, optimization-algorithms
- Language: Julia
- Homepage:
- Size: 986 KB
- Stars: 6
- Watchers: 7
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ActiveSetMethods.jl

[](https://codecov.io/gh/exanauts/ActiveSetMethods)
This is a Julia package that implements active set methods for continuous nonlinear optimization.
The package currently implements sequential linear programming methods.
## Installation
```julia
]add https://github.com/exanauts/ActiveSetMethods.jl
```
## 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:
```julia
# 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)
```
## Acknowledgements
This material is based upon work supported by the U.S. Department of Energy, Office of Science, under contract number DE-AC02-06CH11357.