Null space algorithm for nonlinear constrained optimization
Project description
Null space optimizer
nullspace_optimizer
is a package implementing the null space algorithm for nonlinear constrained
optimization.
Please cite the following references when using this source:
Feppon F., Allaire G. and Dapogny C. Null space gradient flows for constrained optimization with applications to shape optimization. 2020. ESAIM: COCV, 26 90 doi:10.1051/cocv/2020015 (Open Access). HAL preprint hal-01972915.
Feppon, F. Shape and topology optimization of multiphysics systems. 2019. Université Paris-Saclay. Thèse préparée à l'École polytechnique.
Installation
With pip
# Minimal version (no extra dependencies)
pip install nullspace_optimizer
# All extra dependencies including alternate QP solver, colored output and plotting features
pip install nullspace_optimizer[osqp,colored,matplotlib]
Manual installation
Add the package to the PYTHONPATH
environment variable.
Running examples
A few examples of 2-d inequality constrained optimization are available in the `examples' folder. They can be run from command line with
python -m nullspace_optimizer.examples.ex0
python -m nullspace_optimizer.examples.ex1
python -m nullspace_optimizer.examples.ex2
and so on. All the examples can be run at once with
python -m nullspace_optimizer.examples.test_all
For instance, example ex1
solves the following optimization problem:
\newcommand{\<}{\leq}
\begin{aligned} \min_{(x_0,x_1)\in\mathbb{R}^2} & \quad (x_0+1)^2+(x_1+1)^2 \\
s.t. &\quad \left\{ \begin{aligned} x_0^2+x_1^2-1 & \< 0\\
x_0+x_1-1 & \< 0 \\
-x_1-0.7 & \<0.
\end{aligned}\right.
\end{aligned}
Running python -m nullspace_optimizer.examples.ex1
should produce the following figure:
Requirements
Runs with python 3.6 and the following libraries:
- numpy (>=1.12.1)
- scipy (>=0.19.1)
- cvxopt (>=1.2.1)
Optional dependencies:
- osqp (>=0.6.1) (for an alternate QP solver instead of CVXOPT)
- colored (>=1.3.93) (for colored output)
- matplotlib (>=2.0.2) (for displaying figures while running examples)
Detailed documentation
A more detailed documentation is available on the DOC.md file of the git repository.
The full documentation of classes and methods is available in the python docstring of the source code.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for nullspace_optimizer-1.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 648e9f81ee71216c9afb3748e9ab1b92d0e6b45499c53488f852ead8953553cd |
|
MD5 | 2b5ffcb929cdfbf9bc39220993ed962f |
|
BLAKE2b-256 | 2cb705fb891d9566f3ca6fc808c3071cc92bf186292988f829ef5575f8982a45 |