|
Pipal
1.2.0
Penalty Interior-Point ALgorithm
|
Namespace for the Pipal library. More...
Classes | |
| struct | Acceptance |
| Class for managing the acceptance criteria of the solver. More... | |
| struct | Direction |
| Class for managing the current search direction of the solver. More... | |
| struct | Input |
| Input structure holding all the data defining the optimization problem. More... | |
| struct | Iterate |
| Class for managing the current iterate of the solver. More... | |
| class | Output |
| Pretty-printing and timing utilities for solver output. More... | |
| struct | Parameter |
| Internal parameters for the solver algorithm. More... | |
| class | Problem |
| Problem class for the Pipal library. More... | |
| class | ProblemWrapper |
| Wrapper class for the Problem class. More... | |
| class | Solver |
| Solver class for the Pipal library. More... | |
Typedefs | |
| using | Integer = PIPAL_DEFAULT_INTEGER_TYPE |
| The Integer type as used for the API. | |
| template<typename Real> | |
| using | Vector = Eigen::Vector<Real, Eigen::Dynamic> |
| template<typename Real> | |
| using | Matrix = Eigen::Matrix<Real, Eigen::Dynamic, Eigen::Dynamic> |
| template<typename Real> | |
| using | SparseMatrix = Eigen::SparseMatrix<Real> |
| template<typename Real> | |
| using | Array = Eigen::Array<Real, Eigen::Dynamic, 1> |
| using | Indices = Eigen::Array<Integer, Eigen::Dynamic, 1> |
| using | Mask = Eigen::Array<bool, Eigen::Dynamic, 1> |
| using | Algorithm = enum class Algorithm : Integer {CONSERVATIVE = 0, ADAPTIVE = 1} |
| Enumeration for the algorithm choice. | |
| using | Counter |
| Internal counters for solver statistics. | |
Functions | |
| static Indices | find (Mask const &mask) |
| Select elements from a vector based on a boolean mask. | |
| template<typename Real> | |
| static void | insert_block (SparseMatrix< Real > &mat, SparseMatrix< Real > const &blk, Integer const row_offset, Integer const col_offset) |
| Insert a sparse block into a sparse matrix at the specified offsets. | |
| template<typename Real> | |
| static void | insert_block (SparseMatrix< Real > &mat, SparseMatrix< Real > const &blk, Indices const row_index, Indices const col_index, Integer const row_offset, Integer const col_offset) |
| Insert a sparse block into a sparse matrix at the specified offsets. | |
Penalty-interior-point algorithm (Pipal) is a library for nonlinear constrained optimization with inequality constraints (it does not explicitly handle equality constraints). Precisely speaking, it will compute the solution to the optimization problem
\[ \begin{array}{l} \text{minimize} ~ f(\mathbf{x}) \\ \text{subject to} ~ \mathbf{c}(\mathbf{x}) \leq \mathbf{0} \end{array} \text{,} \]
where \(\mathbf{x} \in \mathbb{R}^n\) is the vector of optimization variables, \(f: \mathbb{R}^n \to \mathbb{R}\) is the objective function, and \(\mathbf{c}: \mathbb{R}^n \to \mathbb{R}^m\) are the constraints.
This code is mostly based on the descriptions provided in this reference:
| using Pipal::Algorithm = enum class Algorithm : Integer {CONSERVATIVE = 0, ADAPTIVE = 1} |
The Algorithm enumeration defines the possible algorithm choices for the solver. The options are CONSERVATIVE and ADAPTIVE.
| using Pipal::Array = Eigen::Array<Real, Eigen::Dynamic, 1> |
| using Pipal::Counter |
| using Pipal::Indices = Eigen::Array<Integer, Eigen::Dynamic, 1> |
The Integer type, #define the preprocessor symbol PIPAL_DEFAULT_INTEGER_TYPE. The default value is int.
| using Pipal::Mask = Eigen::Array<bool, Eigen::Dynamic, 1> |
| using Pipal::Matrix = Eigen::Matrix<Real, Eigen::Dynamic, Eigen::Dynamic> |
| using Pipal::SparseMatrix = Eigen::SparseMatrix<Real> |
| using Pipal::Vector = Eigen::Vector<Real, Eigen::Dynamic> |
| [in] | mask | The boolean mask. |
|
static |
| Real | Floating-point type used by the algorithm. |
| CheckZero | Whether to skip zero entries when inserting. |
| [in,out] | mat | Sparse matrix where to insert the block. |
| [in] | blk | Sparse matrix block to insert. |
| [in] | row_index | Row indices in the block matrix. |
| [in] | col_index | Column indices in the block matrix. |
| [in] | row_offset | Row offset in the sparse matrix. |
| [in] | col_offset | Column offset in the sparse matrix. |
|
static |
| Real | Floating-point type used by the algorithm. |
| CheckZero | Whether to skip zero entries when inserting. |
| [in,out] | mat | Sparse matrix where to insert the block. |
| [in] | blk | Sparse matrix block to insert. |
| [in] | row_offset | Row offset in the sparse matrix. |
| [in] | col_offset | Column offset in the sparse matrix. |