Skip to content

A C++ library for solving constrained optimization problems using an SQP algorithm. Uses OSQP for solving the quadratic subproblems.

Notifications You must be signed in to change notification settings

evan-el/optimization_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

optimization_cpp

A C++17 library for solving constrained optimization problems.

This project currently implements a Sequential Quadratic Programming (SQP) method for solving nonlinear programs (NLP's). On each iteration of the SQP solver, the optimization problem is approximated with a quadratic cost and linear constraints. This quadratic subproblem is then passed to a QP solver which solves for the next step in the decision variables. This is repeated until the convergence criteria are met. OSQP is used to solve the quadratic subproblems in this project using the osqp-cpp interface.

The interface is defined in opt_problem.hpp in the SqpProblem class. Override the functions in this class to implement your own objective and constraint functions and their hessian and gradients. Examples of this are given in example_prob.hpp/.cpp.

Build

From the root directory of this project:

mkdir build cd build cmake .. make 

To run the examples (from the build directory):

./run_examples 

References

Cornell University Computational Optimization Open Textbook

https://en.wikipedia.org/wiki/Sequential_quadratic_programming

https://github.com/osqp/osqp

https://github.com/google/osqp-cpp

About

A C++ library for solving constrained optimization problems using an SQP algorithm. Uses OSQP for solving the quadratic subproblems.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published