8#include <fmt/ostream.h>
13template <
typename Scalar>
17 for (std::size_t i = 0; i < nduals.size(); ++i)
27 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
126 numdual(prob.getTotalConstraintDim()),
187 for (std::size_t i = 0; i <
numblocks; i++) {
202template <
typename Scalar>
203struct fmt::formatter<
proxsuite::nlp::WorkspaceTpl<Scalar>>
204 : fmt::ostream_formatter {};
206#ifdef PROXSUITE_NLP_ENABLE_TEMPLATE_INSTANTIATION
207#include "proxsuite-nlp/workspace.txx"
Utility function to allocate an LDLT solver for the Newton iterations.
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
void allocateMultipliersOrResiduals(const ProblemTpl< Scalar > &prob, typename math_types< Scalar >::VectorXs &data, typename math_types< Scalar >::VectorOfRef &out)
Allocate a set of multipliers (or residuals) for a given problem instance.
LDLTVariant< Scalar > allocate_ldlt_from_sizes(const std::vector< isize > &nprims, const std::vector< isize > &nduals, LDLTChoice choice)
boost::variant< linalg::DenseLDLT< Scalar >, linalg::BlockLDLT< Scalar >, Eigen::LDLT< MatrixType >, Eigen::BunchKaufman< MatrixType > > LDLTVariant
auto allocate_ldlt_from_problem(const ProblemTpl< Scalar > &prob, LDLTChoice choice)
@ DENSE
Use our dense LDLT.
std::size_t getNumConstraints() const
Get the number of constraint blocks.
int getConstraintDim(std::size_t i) const
Get dimension of constraint i.
int getIndex(std::size_t i) const
MatrixXs data_jacobians_proj
VectorXs data_shift_cstr_values
std::vector< VectorRef > shift_cstr_pdal
void init(const Problem &prob)
Scalar objective_value
Objective value.
VectorXs dual_residual
Residuals.
VectorXs data_lams_plus_reproj
WorkspaceTpl(const Problem &prob, LDLTChoice ldlt_choice=LDLTChoice::DENSE)
VectorXs merit_dual_gradient
Merit function gradient in the dual variables (if applicable)
VectorXs data_lams_pdal_reproj
VectorXs data_cstr_values
std::vector< Scalar > ls_values
std::vector< VectorRef > lams_plus
First-order multipliers .
VectorXs pd_step
Primal-dual step .
std::vector< VectorRef > cstr_values
Values of each constraint.
MatrixXs kkt_matrix
KKT iteration matrix.
VectorXs merit_gradient
Merit function gradient.
std::vector< VectorRef > lams_pdal_reproj
std::vector< Scalar > ls_alphas
Scalar dmerit_dir
Merit function derivative in descent direction.
VectorXs kkt_rhs
KKT iteration right-hand side.
VectorXs kkt_rhs_corr
Correction for the kkt matrix.
std::vector< VectorRef > lams_plus_reproj
Product of the projector Jacobians with the first-order multipliers.
VectorXs objective_gradient
Objective function gradient.
Scalar alpha_opt
Optimal linesearch .
Eigen::VectorXi signature
Signature of the KKT matrix.
std::vector< VectorRef > lams_pdal
Primal-dual multiplier estimates (from the pdBCL algorithm)
long nx
Newton iteration variables.
MatrixXs objective_hessian
Objective function Hessian.
std::vector< MatrixRef > cstr_jacobians_proj
VectorXs data_shift_cstr_pdal
std::vector< MatrixRef > cstr_jacobians
VectorXs kkt_err
KKT linear system error (for refinement)
std::vector< VectorRef > shift_cstr_values
Buffer for shifted constraints.
std::vector< MatrixRef > cstr_vector_hessian_prod
LDLTVariant< Scalar > ldlt_
LDLT storage.