#include <jrl-qp/DualSolver.h>


Classes | |
| struct | StepLength |
Public Member Functions | |
| DualSolver () | |
| DualSolver (int nbVar, int nbCstr, bool useBounds) | |
| virtual | ~DualSolver ()=default |
| void | resize (int nbVar, int nbCstr, bool useBounds) |
| void | options (const SolverOptions &options) |
| WConstVector | solution () const |
| WConstVector | multipliers () const |
| double | objectiveValue () const |
| int | iterations () const |
| const std::vector< ActivationStatus > & | activeSet () const |
| void | resetActiveSet () |
Protected Attributes | |
| SolverOptions | options_ |
| utils::Logger | log_ |
| int | it_ |
| int | nbVar_ |
| internal::ActiveSet | A_ |
| double | f_ |
| internal::Workspace | work_x_ |
| internal::Workspace | work_z_ |
| internal::Workspace | work_u_ |
| internal::Workspace | work_r_ |
| bool | needToExpandMultipliers_ |
Base class for dual QP solver. It implements the general logic of the Goldfarb-Idnani paper, and relies on call to virtual functions to do the actual work, depending on the specificities of the problem.
| jrl::qp::DualSolver::DualSolver | ( | ) |
| jrl::qp::DualSolver::DualSolver | ( | int | nbVar, |
| int | nbCstr, | ||
| bool | useBounds | ||
| ) |
Pre-allocate the data for a problem with nbVar variables, nbCstr (general) constraints, and bounds if useBounds is true.
|
virtualdefault |
| const std::vector< ActivationStatus > & jrl::qp::DualSolver::activeSet | ( | ) | const |
Get the active set at the solution.
The i-th element corresponds to the activation status of the i-th constraint with the general constraints first, followed by the bound constraints.
|
protected |
Add a constraint to the active set and update the computation data accordingly.
|
protectedpure virtual |
Add a constraint to the active set and update the computation data accordingly.
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, and jrl::qp::experimental::BlockGISolver.
|
protected |
Compute a primal step z and dual step r, given n+
|
protectedpure virtual |
Compute a primal step z and dual step r, given n+
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, and jrl::qp::experimental::BlockGISolver.
|
protected |
Compute a step length and update x and u given the data n+, z and r.
|
protectedpure virtual |
Compute a step length and update x and u given the data n+, z and r.
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, and jrl::qp::experimental::BlockGISolver.
|
protectedvirtual |
Compute the dot product between the vector corresponding to sc and z.
|
protectedpure virtual |
Compute the dot product between the vector corresponding to sc and z.
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, and jrl::qp::experimental::BlockGISolver.
|
protected |
Initialize the problem data. In particular compute the initial primal-dual point and perform the initial decompositions.
|
protectedpure virtual |
Compute the initial iterate, the corresponding objective value and initialize any relevant data of the derived class.
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, jrl::qp::experimental::BoxAndSingleConstraintSolver, and jrl::qp::experimental::BlockGISolver.
| int jrl::qp::DualSolver::iterations | ( | ) | const |
Get the number of active-set iterations used to find the solution
| WConstVector jrl::qp::DualSolver::multipliers | ( | ) | const |
Get the Lagrange multipliers at the solution.
| double jrl::qp::DualSolver::objectiveValue | ( | ) | const |
Get the objective value at the solution.
| void jrl::qp::DualSolver::options | ( | const SolverOptions & | options | ) |
Specify the solver options.
|
protected |
Remove the l-th active constraint from the active set and update the computation data accordingly.
|
protectedpure virtual |
Remove the l-th active constraint from the active set and update the computation data accordingly.
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, and jrl::qp::experimental::BlockGISolver.
| void jrl::qp::DualSolver::resetActiveSet | ( | ) |
Reset the active set.
| void jrl::qp::DualSolver::resize | ( | int | nbVar, |
| int | nbCstr, | ||
| bool | useBounds | ||
| ) |
Resize the data for a problem with nbVar variables, nbCstr (general) constraints, and bounds if useBounds is true.
|
protectedpure virtual |
Resize the data managed by the derived class.
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, and jrl::qp::experimental::BlockGISolver.
|
protected |
Select a violated constraint and return it as a description of n+.
|
protectedpure virtual |
Select the violated constraint to be considered for the current iteration.
Implemented in jrl::qp::GoldfarbIdnaniSolver, jrl::qp::experimental::GoldfarbIdnaniSolver, and jrl::qp::experimental::BlockGISolver.
| WConstVector jrl::qp::DualSolver::solution | ( | ) | const |
Get the solution.
|
protected |
Call to the solving routines. Need to be initiated by the derived class.
|
protected |
Finalize a function call by logging relevant information.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |