proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
proxsuite::nlp Namespace Reference

Namespaces

namespace  autodiff
 Automatic differentiation utilities.
 
namespace  context
 
namespace  helpers
 Helper functions and structs.
 
namespace  linalg
 Specific linear algebra routines.
 
namespace  math
 Math utilities.
 
namespace  python
 Python bindings.
 

Classes

struct  ALMeritFunctionTpl
 Primal-dual augmented Lagrangian-type merit function. More...
 
class  ArmijoLinesearch
 Basic backtracking Armijo line-search strategy. More...
 
struct  BaseFunctionTpl
 Base function type. More...
 
struct  BaseLogger
 A logging utility. More...
 
struct  BCLParamsTpl
 
struct  BoxConstraintTpl
 Box constraint set \(z \in [z_\min, z_\max]\). More...
 
struct  C1FunctionTpl
 Differentiable function, with method for the Jacobian. More...
 
struct  C2FunctionTpl
 Twice-differentiable function, with method Jacobian and vector-hessian product evaluation. More...
 
struct  CartesianProductTpl
 The cartesian product of two or more manifolds. More...
 
struct  ComposeFunctionTpl
 Composition of two functions \(f \circ g\). More...
 
struct  ComputeSignatureVisitor
 
struct  ConstraintObjectTpl
 Packs a ConstraintSetTpl and C2FunctionTpl together. More...
 
struct  ConstraintSetProductTpl
 Cartesian product of multiple constraint sets. This class makes computing multipliers and Jacobian matrix projections more convenient. More...
 
struct  ConstraintSetTpl
 Base constraint set type. More...
 
struct  CostFunctionBaseTpl
 Base class for differentiable cost functions. More...
 
struct  CostSumTpl
 Defines the sum of one or more cost functions \(c_1 + c_2 + \cdots\). More...
 
struct  EqualityConstraintTpl
 Equality constraints \(c(x) = 0\). More...
 
struct  func_to_cost
 
struct  LinearFunctionDifferenceToPoint
 Linear function of difference vector on a manifold, of the form \( r(x) = A(x \ominus \bar{x}) + b \). More...
 
struct  LinearFunctionTpl
 Linear residuals \(r(x) = Ax + b\). More...
 
class  Linesearch
 Base linesearch class. Design pattern inspired by Google Ceres-Solver. More...
 
struct  LogRecord
 
struct  ManifoldAbstractTpl
 
struct  ManifoldDifferenceToPoint
 
struct  math_types
 Typedefs for math (Eigen vectors, matrices) depending on scalar type. More...
 
struct  MultibodyConfiguration
 Multibody configuration group \(\mathcal{Q}\), defined using the Pinocchio library. More...
 
struct  MultibodyPhaseSpace
 The tangent bundle of a multibody configuration group. More...
 
struct  NegativeOrthantTpl
 Negative orthant, for constraints \(h(x)\leq 0\). More...
 
struct  NonsmoothPenaltyL1Tpl
 Composite \(\ell_1\)-penalty function \( \|c(x)\|_1 \). More...
 
struct  PinocchioLieGroup
 Wrap a Pinocchio Lie group into a ManifoldAbstractTpl object. More...
 
struct  PolynomialTpl
 Polynomials represented by their coefficients in decreasing order of degree. More...
 
struct  ProblemTpl
 
class  ProxNLPSolverTpl
 
struct  QuadraticDistanceCostTpl
 Weighted quadratic distance \(\frac{1}{2}\|x\ominus \bar{x}\|^2_W\) on a space. More...
 
struct  QuadraticResidualCostTpl
 Quadratic function \(\frac{1}{2} r^\top Qr + b^\top r + c\) of a residual. More...
 
struct  ResultsTpl
 Results struct, holding the returned data from the solver. More...
 
struct  RigidTransformationPointActionTpl
 
class  RuntimeError
 
struct  TangentBundleTpl
 Tangent bundle of a base manifold M. More...
 
struct  VectorSpaceTpl
 Standard Euclidean vector space. More...
 
struct  WorkspaceTpl
 

Typedefs

template<typename Scalar , class MatrixType = typename math_types<Scalar>::MatrixXs>
using LDLTVariant
 
template<typename T , typename T2 = void>
using enable_if_eigen_dense = std::enable_if_t<is_eigen_dense_type<T>, T2>
 
template<int D, typename Scalar >
using SETpl
 
template<int D, typename Scalar >
using SOTpl
 

Enumerations

enum  VerboseLevel { QUIET = 0 , VERBOSE = 1 , VERYVERBOSE = 2 }
 Verbosity level. More...
 
enum class  LDLTChoice {
  DENSE , BUNCHKAUFMAN , BLOCKSPARSE , EIGEN ,
  PROXSUITE
}
 
enum class  LinesearchStrategy { ARMIJO , WOLFE }
 
enum class  LSInterpolation { BISECTION , QUADRATIC , CUBIC }
 
enum class  MultiplierUpdateMode { NEWTON , PRIMAL , PRIMAL_DUAL }
 
enum class  HessianApprox { EXACT , GAUSS_NEWTON }
 
enum  InertiaFlag { INERTIA_OK = 0 , INERTIA_BAD = 1 , INERTIA_HAS_ZEROS = 2 }
 
enum  KktSystem { KKT_CLASSIC , KKT_PRIMAL_DUAL }
 
enum  ConvergenceFlag { UNINIT = -1 , SUCCESS = 0 , MAX_ITERS_REACHED = 1 }
 

Functions

template<typename Scalar >
auto downcast_function_to_cost (const shared_ptr< C2FunctionTpl< Scalar > > &func) -> shared_ptr< CostFunctionBaseTpl< Scalar > >
 
template<typename Scalar >
auto compose (const shared_ptr< C2FunctionTpl< Scalar > > &left, const shared_ptr< C2FunctionTpl< Scalar > > &right)
 Compose two function objects.
 
linalg::SymbolicBlockMatrix create_default_block_structure (const std::vector< isize > &dims_primal, const std::vector< isize > &dims_dual)
 
isize get_total_dim_helper (const std::vector< isize > &nprims, const std::vector< isize > &nduals)
 
template<typename Scalar >
LDLTVariant< Scalar > allocate_ldlt_from_sizes (const std::vector< isize > &nprims, const std::vector< isize > &nduals, LDLTChoice choice)
 
std::array< int, 3 > computeInertiaTuple (const Eigen::Ref< Eigen::VectorXi const > &signature)
 
template<typename Derived >
auto blockMatrixGetRow (const Eigen::MatrixBase< Derived > &matrix, const std::vector< Eigen::Index > &rowBlockSizes, std::size_t rowIdx)
 
template<typename Derived >
auto blockVectorGetRow (const Eigen::MatrixBase< Derived > &matrix, const std::vector< Eigen::Index > &blockSizes, std::size_t blockIdx)
 
template<typename T >
auto operator* (const polymorphic< ManifoldAbstractTpl< T > > &left, const polymorphic< ManifoldAbstractTpl< T > > &right)
 
template<typename T >
auto operator* (const CartesianProductTpl< T > &left, const polymorphic< ManifoldAbstractTpl< T > > &right)
 
template<typename T >
auto operator* (const polymorphic< ManifoldAbstractTpl< T > > &left, const CartesianProductTpl< T > &right)
 
template<typename T >
auto operator* (const CartesianProductTpl< T > &left, const CartesianProductTpl< T > &right)
 
InertiaFlag checkInertia (const int ndx, const int nc, const Eigen::VectorXi &signature)
 Check the matrix has the desired inertia.
 
auto format_as (ConvergenceFlag fl)
 
std::string printVersion (const std::string &delimiter=".")
 Pretty-print the package version number.
 
template<typename Scalar >
auto allocate_ldlt_from_problem (const ProblemTpl< Scalar > &prob, LDLTChoice choice)
 

Variables

constexpr int NUM_KEYS = 10
 
const std::array< std::string, NUM_KEYSBASIC_KEYS
 
constexpr char int_format [] = "{: >{}d}"
 
constexpr char sci_format [] = "{: > {}.{}e}"
 
constexpr char dbl_format [] = "{: > {}.{}g}"
 
template<typename T >
constexpr bool is_eigen_dense_type
 
template<typename T >
constexpr bool is_eigen_matrix_type
 

Typedef Documentation

◆ LDLTVariant

template<typename Scalar , class MatrixType = typename math_types<Scalar>::MatrixXs>
using proxsuite::nlp::LDLTVariant
Initial value:
boost::variant<linalg::DenseLDLT<Scalar>, linalg::BlockLDLT<Scalar>,
Eigen::LDLT<MatrixType>, Eigen::BunchKaufman<MatrixType>
>

Definition at line 37 of file ldlt-allocator.hpp.

◆ enable_if_eigen_dense

template<typename T , typename T2 = void>
using proxsuite::nlp::enable_if_eigen_dense = std::enable_if_t<is_eigen_dense_type<T>, T2>

Definition at line 21 of file math.hpp.

◆ SETpl

template<int D, typename Scalar >
using proxsuite::nlp::SETpl
Initial value:
PinocchioLieGroup<pinocchio::SpecialEuclideanOperationTpl<D, Scalar>>

Definition at line 104 of file pinocchio-groups.hpp.

◆ SOTpl

template<int D, typename Scalar >
using proxsuite::nlp::SOTpl
Initial value:
PinocchioLieGroup<pinocchio::SpecialOrthogonalOperationTpl<D, Scalar>>

Definition at line 108 of file pinocchio-groups.hpp.

Enumeration Type Documentation

◆ VerboseLevel

Verbosity level.

Enumerator
QUIET 
VERBOSE 
VERYVERBOSE 

Definition at line 126 of file fwd.hpp.

◆ LDLTChoice

enum class proxsuite::nlp::LDLTChoice
strong
Enumerator
DENSE 

Use our dense LDLT.

BUNCHKAUFMAN 

Use Bunch-Kaufman factorization.

BLOCKSPARSE 

Use blocked LDLT.

EIGEN 

Use Eigen's implementation.

PROXSUITE 

Use Proxsuite's LDLT.

Definition at line 22 of file ldlt-allocator.hpp.

◆ LinesearchStrategy

Enumerator
ARMIJO 
WOLFE 

Definition at line 11 of file linesearch-base.hpp.

◆ LSInterpolation

Enumerator
BISECTION 
QUADRATIC 
CUBIC 

Definition at line 12 of file linesearch-base.hpp.

◆ MultiplierUpdateMode

Enumerator
NEWTON 
PRIMAL 
PRIMAL_DUAL 

Definition at line 23 of file prox-solver.hpp.

◆ HessianApprox

enum class proxsuite::nlp::HessianApprox
strong
Enumerator
EXACT 

Exact Hessian construction from provided function Hessians.

GAUSS_NEWTON 

Gauss-Newton (or rather SCQP) approximation.

Definition at line 25 of file prox-solver.hpp.

◆ InertiaFlag

Enumerator
INERTIA_OK 
INERTIA_BAD 
INERTIA_HAS_ZEROS 

Definition at line 32 of file prox-solver.hpp.

◆ KktSystem

Enumerator
KKT_CLASSIC 
KKT_PRIMAL_DUAL 

Definition at line 34 of file prox-solver.hpp.

◆ ConvergenceFlag

Enumerator
UNINIT 
SUCCESS 
MAX_ITERS_REACHED 

Definition at line 11 of file results.hpp.

Function Documentation

◆ downcast_function_to_cost()

template<typename Scalar >
auto proxsuite::nlp::downcast_function_to_cost ( const shared_ptr< C2FunctionTpl< Scalar > > & func) -> shared_ptr<CostFunctionBaseTpl<Scalar>>

Definition at line 15 of file cost-function.hpp.

◆ compose()

template<typename Scalar >
auto proxsuite::nlp::compose ( const shared_ptr< C2FunctionTpl< Scalar > > & left,
const shared_ptr< C2FunctionTpl< Scalar > > & right )

Compose two function objects.

Returns
ComposeFunctionTpl object representing the composition of left and right.

Definition at line 56 of file function-ops.hpp.

◆ create_default_block_structure()

linalg::SymbolicBlockMatrix proxsuite::nlp::create_default_block_structure ( const std::vector< isize > & dims_primal,
const std::vector< isize > & dims_dual )
inline

Definition at line 47 of file ldlt-allocator.hpp.

◆ get_total_dim_helper()

isize proxsuite::nlp::get_total_dim_helper ( const std::vector< isize > & nprims,
const std::vector< isize > & nduals )
inline

Definition at line 95 of file ldlt-allocator.hpp.

◆ allocate_ldlt_from_sizes()

template<typename Scalar >
LDLTVariant< Scalar > proxsuite::nlp::allocate_ldlt_from_sizes ( const std::vector< isize > & nprims,
const std::vector< isize > & nduals,
LDLTChoice choice )

Definition at line 102 of file ldlt-allocator.hpp.

◆ computeInertiaTuple()

std::array< int, 3 > proxsuite::nlp::computeInertiaTuple ( const Eigen::Ref< Eigen::VectorXi const > & signature)
inline

Definition at line 197 of file ldlt-allocator.hpp.

◆ blockMatrixGetRow()

template<typename Derived >
auto proxsuite::nlp::blockMatrixGetRow ( const Eigen::MatrixBase< Derived > & matrix,
const std::vector< Eigen::Index > & rowBlockSizes,
std::size_t rowIdx )

Definition at line 8 of file constraint-set-product.hpp.

◆ blockVectorGetRow()

template<typename Derived >
auto proxsuite::nlp::blockVectorGetRow ( const Eigen::MatrixBase< Derived > & matrix,
const std::vector< Eigen::Index > & blockSizes,
std::size_t blockIdx )

Definition at line 20 of file constraint-set-product.hpp.

◆ operator*() [1/4]

template<typename T >
auto proxsuite::nlp::operator* ( const polymorphic< ManifoldAbstractTpl< T > > & left,
const polymorphic< ManifoldAbstractTpl< T > > & right )

Definition at line 126 of file cartesian-product.hpp.

◆ operator*() [2/4]

template<typename T >
auto proxsuite::nlp::operator* ( const CartesianProductTpl< T > & left,
const polymorphic< ManifoldAbstractTpl< T > > & right )

Definition at line 132 of file cartesian-product.hpp.

◆ operator*() [3/4]

template<typename T >
auto proxsuite::nlp::operator* ( const polymorphic< ManifoldAbstractTpl< T > > & left,
const CartesianProductTpl< T > & right )

Definition at line 140 of file cartesian-product.hpp.

◆ operator*() [4/4]

template<typename T >
auto proxsuite::nlp::operator* ( const CartesianProductTpl< T > & left,
const CartesianProductTpl< T > & right )

Definition at line 146 of file cartesian-product.hpp.

◆ checkInertia()

InertiaFlag proxsuite::nlp::checkInertia ( const int ndx,
const int nc,
const Eigen::VectorXi & signature )
inline

Check the matrix has the desired inertia.

Parameters
signatureThe computed inertia as a vector of ints valued -1, 0, or 1.
deltaScale factor for the identity matrix to add

◆ format_as()

auto proxsuite::nlp::format_as ( ConvergenceFlag fl)
inline

Definition at line 12 of file results.hpp.

◆ printVersion()

std::string proxsuite::nlp::printVersion ( const std::string & delimiter = ".")
inline

Pretty-print the package version number.

Parameters
delimiterThe delimiter between the major/minor/patch version components.

Definition at line 15 of file version.hpp.

◆ allocate_ldlt_from_problem()

template<typename Scalar >
auto proxsuite::nlp::allocate_ldlt_from_problem ( const ProblemTpl< Scalar > & prob,
LDLTChoice choice )

Definition at line 14 of file workspace.hpp.

Variable Documentation

◆ NUM_KEYS

int proxsuite::nlp::NUM_KEYS = 10
constexpr

Definition at line 13 of file logger.hpp.

◆ BASIC_KEYS

const std::array<std::string, NUM_KEYS> proxsuite::nlp::BASIC_KEYS
Initial value:
= {
"iter", "step_size", "inner_crit", "prim_err", "dual_err",
"xreg", "dphi0", "merit", "dM", "al_iter"}

Definition at line 14 of file logger.hpp.

◆ int_format

char proxsuite::nlp::int_format[] = "{: >{}d}"
constexpr

Definition at line 17 of file logger.hpp.

◆ sci_format

char proxsuite::nlp::sci_format[] = "{: > {}.{}e}"
constexpr

Definition at line 18 of file logger.hpp.

◆ dbl_format

char proxsuite::nlp::dbl_format[] = "{: > {}.{}g}"
constexpr

Definition at line 19 of file logger.hpp.

◆ is_eigen_dense_type

template<typename T >
bool proxsuite::nlp::is_eigen_dense_type
constexpr
Initial value:
=
std::is_base_of<Eigen::DenseBase<T>, T>::value

Definition at line 13 of file math.hpp.

◆ is_eigen_matrix_type

template<typename T >
bool proxsuite::nlp::is_eigen_matrix_type
constexpr
Initial value:
=
std::is_base_of<Eigen::MatrixBase<T>, T>::value

Definition at line 17 of file math.hpp.