Public Member Functions | List of all members
corbo::HyperGraphOptimizationProblemEdgeBased Class Reference

#include <hyper_graph_optimization_problem_edge_based.h>

Inheritance diagram for corbo::HyperGraphOptimizationProblemEdgeBased:
Inheritance graph
[legend]

Public Member Functions

void computeCombinedSparseJacobian (Eigen::SparseMatrix< double > &jacobian, bool objective_lsq, bool equality, bool inequality, bool finite_combined_bounds, bool active_ineq=false, double weight_eq=1.0, double weight_ineq=1.0, double weight_bounds=1.0, const Eigen::VectorXd *values=nullptr, const Eigen::VectorXi *col_nnz=nullptr) override
 
int computeCombinedSparseJacobiansNNZ (bool objective_lsq=true, bool equality=true, bool inequality=true) override
 
void computeCombinedSparseJacobiansStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool objective_lsq=true, bool equality=true, bool inequality=true) override
 
void computeCombinedSparseJacobiansValues (Eigen::Ref< Eigen::VectorXd > values, bool objective_lsq=true, bool equality=true, bool inequality=true, const double *multipliers_obj=nullptr, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr) override
 
void computeDenseHessianObjective (Eigen::Ref< Eigen::MatrixXd > hessian, double multiplier=1.0) override
 
void computeDenseJacobianActiveInequalities (Eigen::Ref< Eigen::MatrixXd > jacobian, double weight=1.0) override
 Compute the Jacobian Jc(x) with non-zeros for active constraints c(x)>= 0 and zeros for inactive ones. More...
 
void computeDenseJacobianEqualities (Eigen::Ref< Eigen::MatrixXd > jacobian, const double *multipliers=nullptr) override
 Compute the equality constraint Jacobian Jceq(x) for the current parameter set. More...
 
void computeDenseJacobianInequalities (Eigen::Ref< Eigen::MatrixXd > jacobian, const double *multipliers=nullptr) override
 Compute the inequality constraint Jacobian Jc(x) for the current parameter set. More...
 
void computeDenseJacobianLsqObjective (Eigen::Ref< Eigen::MatrixXd > jacobian, const double *multipliers=nullptr) override
 Compute the objective Jacobian Jf(x) for the current parameter set. More...
 
void computeDenseJacobians (Eigen::Ref< Eigen::VectorXd > gradient_non_lsq_obj, Eigen::Ref< Eigen::MatrixXd > jacobian_lsq_obj, Eigen::Ref< Eigen::MatrixXd > jacobian_eq, Eigen::Ref< Eigen::MatrixXd > jacobian_ineq, const double *multipliers_lsq_obj=nullptr, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, bool active_ineq=false, double active_ineq_weight=1.0) override
 Compute the objective and constraint Jacobians at once. More...
 
void computeGradientNonLsqObjective (Eigen::Ref< Eigen::VectorXd > gradient) override
 
void computeGradientObjective (Eigen::Ref< Eigen::VectorXd > gradient) override
 
void computeGradientObjectiveAndCombinedSparseJacobiansValues (Eigen::Ref< Eigen::VectorXd > gradient, Eigen::Ref< Eigen::VectorXd > jac_values, bool equality=true, bool inequality=true, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr) override
 
int computeSparseHessianEqualitiesNNZ (bool lower_part_only=false) override
 
void computeSparseHessianEqualitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool lower_part_only=false) override
 
void computeSparseHessianEqualitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr, bool lower_part_only=false) override
 
int computeSparseHessianInequalitiesNNZ (bool lower_part_only=false) override
 
void computeSparseHessianInequalitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool lower_part_only=false) override
 
void computeSparseHessianInequalitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr, bool lower_part_only=false) override
 
void computeSparseHessianLagrangian (Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &H, const double *multipliers_eq, const double *multipliers_ineq, const Eigen::VectorXi *col_nnz=nullptr, bool upper_part_only=false) override
 Compute the hessian of the lagrangian L(x) = f(x) + lambda1 * c(x) + lambda2 * ceq(x) More...
 
void computeSparseHessianLagrangianNNZperCol (Eigen::Ref< Eigen::VectorXi > col_nnz, bool upper_part_only=false) override
 
void computeSparseHessianObjectiveLL (Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &H, const Eigen::VectorXi *col_nnz=nullptr, bool upper_part_only=false) override
 
int computeSparseHessianObjectiveNNZ (bool lower_part_only=false) override
 
void computeSparseHessianObjectiveNNZperCol (Eigen::Ref< Eigen::VectorXi > col_nnz, bool upper_part_only=false) override
 
void computeSparseHessianObjectiveStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool lower_part_only=false) override
 
void computeSparseHessianObjectiveValues (Eigen::Ref< Eigen::VectorXd > values, double multiplier=1.0, bool lower_part_only=false) override
 
void computeSparseHessiansNNZ (int &nnz_obj, int &nnz_eq, int &nnz_ineq, bool lower_part_only=false) override
 
void computeSparseHessiansStructure (Eigen::Ref< Eigen::VectorXi > i_row_obj, Eigen::Ref< Eigen::VectorXi > j_col_obj, Eigen::Ref< Eigen::VectorXi > i_row_eq, Eigen::Ref< Eigen::VectorXi > j_col_eq, Eigen::Ref< Eigen::VectorXi > i_row_ineq, Eigen::Ref< Eigen::VectorXi > j_col_ineq, bool lower_part_only=false) override
 
void computeSparseHessiansValues (Eigen::Ref< Eigen::VectorXd > values_obj, Eigen::Ref< Eigen::VectorXd > values_eq, Eigen::Ref< Eigen::VectorXd > values_ineq, double multiplier_obj=1.0, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, bool lower_part_only=false) override
 
void computeSparseJacobianActiveInequalitiesValues (Eigen::Ref< Eigen::VectorXd > values, double weight=1.0) override
 
int computeSparseJacobianEqualitiesNNZ () override
 
void computeSparseJacobianEqualitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) override
 
void computeSparseJacobianEqualitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr) override
 
int computeSparseJacobianInequalitiesNNZ () override
 
void computeSparseJacobianInequalitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) override
 
void computeSparseJacobianInequalitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr) override
 
int computeSparseJacobianLsqObjectiveNNZ () override
 
void computeSparseJacobianLsqObjectiveStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) override
 
void computeSparseJacobianLsqObjectiveValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr) override
 
void computeSparseJacobiansValues (Eigen::Ref< Eigen::VectorXd > values_obj, Eigen::Ref< Eigen::VectorXd > values_eq, Eigen::Ref< Eigen::VectorXd > values_ineq, const double *multipliers_obj=nullptr, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, bool active_ineq=false, double active_ineq_weight=1.0) override
 
void computeSparseJacobianTwoSideBoundedLinearForm (Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &A, bool include_finite_bounds, const Eigen::VectorXi *col_nnz=nullptr) override
 Compute the jacobian A for the linear form lbA <= A x <= lbB. More...
 
void computeSparseJacobianTwoSideBoundedLinearFormAndHessianLagrangian (Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &H, const double *multipliers_eq, const double *multipliers_ineq, Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &A, bool include_finite_bounds, const Eigen::VectorXi *col_nnz_H, const Eigen::VectorXi *col_nnz_A, bool upper_part_only_H) override
 Compute the Jacobian and Hessian of the lagrangian. More...
 
void computeSparseJacobianTwoSideBoundedLinearFormAndHessianObjective (Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &H, Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &A, bool include_finite_bounds, const Eigen::VectorXi *col_nnz_H, const Eigen::VectorXi *col_nnz_A, bool upper_part_only_H) override
 
int computeSparseJacobianTwoSideBoundedLinearFormNNZ (bool include_finite_bounds) override
 
void computeSparseJacobianTwoSideBoundedLinearFormNNZPerColumn (Eigen::Ref< Eigen::VectorXi > col_nnz, bool include_finite_bounds) override
 
void computeSparseJacobianTwoSideBoundedLinearFormStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool include_finite_bounds) override
 
void computeSparseJacobianTwoSideBoundedLinearFormValues (Eigen::Ref< Eigen::VectorXd > values, bool include_finite_bounds) override
 
BaseHyperGraphOptimizationProblem::Ptr getInstance () const override
 
 HyperGraphOptimizationProblemEdgeBased ()=default
 
 HyperGraphOptimizationProblemEdgeBased (OptimizationEdgeSet::Ptr edges, VertexSetInterface::Ptr vertices)
 
- Public Member Functions inherited from corbo::BaseHyperGraphOptimizationProblem
 BaseHyperGraphOptimizationProblem ()=default
 
 BaseHyperGraphOptimizationProblem (OptimizationEdgeSet::Ptr edges, VertexSetInterface::Ptr vertices)
 
HyperGraphgetGraph ()
 
const HyperGraphgetGraph () const
 
virtual void precomputeEdgeQuantities ()
 
virtual void precomputeGraphQuantities ()
 
virtual void precomputeVertexQuantities ()
 
void setGraph (OptimizationEdgeSet::Ptr edges, VertexSetInterface::Ptr vertices)
 
int getNonLsqObjectiveDimension () override
 Total dimension of objective function terms. More...
 
int getLsqObjectiveDimension () override
 Total dimension of least-squares objective function terms. More...
 
int getObjectiveDimension () override
 Get dimension of the objective (should be zero or one, includes Lsq objectives if present) More...
 
int getEqualityDimension () override
 Total dimension of equality constraints. More...
 
int getInequalityDimension () override
 Total dimension of general inequality constraints. More...
 
double computeValueNonLsqObjective () override
 
void computeValuesLsqObjective (Eigen::Ref< Eigen::VectorXd > values) override
 Compute the objective function values f(x) for the current parameter set. More...
 
double computeValueObjective () override
 
void computeValuesEquality (Eigen::Ref< Eigen::VectorXd > values) override
 Compute the equality constraint values ceq(x) for the current parameter set. More...
 
void computeValuesInequality (Eigen::Ref< Eigen::VectorXd > values) override
 Compute the inequality constraint values c(x) for the current parameter set. More...
 
void computeValues (double &non_lsq_obj_value, Eigen::Ref< Eigen::VectorXd > lsq_obj_values, Eigen::Ref< Eigen::VectorXd > eq_values, Eigen::Ref< Eigen::VectorXd > ineq_values) override
 
double getParameterValue (int idx) override
 Return specific value of the parameter vector. More...
 
void setParameterValue (int idx, double x) override
 Set specific value of the parameter vector. More...
 
void getParameterVector (Eigen::Ref< Eigen::VectorXd > x) override
 Return deep copy of the complete parameter vector. More...
 
void setParameterVector (const Eigen::Ref< const Eigen::VectorXd > &x) override
 Set complete parameter vector. More...
 
void getBounds (Eigen::Ref< Eigen::VectorXd > lb, Eigen::Ref< Eigen::VectorXd > ub) override
 Get lower and upper bound vector. More...
 
void setBounds (const Eigen::Ref< const Eigen::VectorXd > &lb, const Eigen::Ref< const Eigen::VectorXd > &ub) override
 Set lower and upper bound vector. More...
 
double getLowerBound (int idx) override
 Return specific lower bound value of a parameter. More...
 
double getUpperBound (int idx) override
 Return specific upper bound of a parameter. More...
 
void setLowerBound (int idx, double lb) override
 Set specific lower bound of a parameter. More...
 
void setUpperBound (int idx, double ub) override
 Set specific upper bound of a parameter. More...
 
int getParameterDimension () override
 Effictive dimension of the optimization parameter set (changeable, non-fixed part) More...
 
void applyIncrement (const Eigen::Ref< const Eigen::VectorXd > &increment) override
 Apply increment to the current parameter set. More...
 
void applyIncrement (int idx, double increment) override
 Apply increment to the current parameter set (single element overload) More...
 
void backupParameters () override
 Restore parameter set from the last backup and keep backup if desired. More...
 
void restoreBackupParameters (bool keep_backup) override
 Discard last backup (or all) More...
 
void discardBackupParameters (bool all=false) override
 
bool isLeastSquaresProblem () const override
 Check if the underlying problem is defined in the least squares form. More...
 
int finiteCombinedBoundsDimension () override
 Dimension of the set of finite bounds (combined such that each ub and lb component define a single dimension) More...
 
int finiteBoundsDimension () override
 Dimension of the set of finite bounds (individual bounds ub and lb) More...
 
void computeValuesActiveInequality (Eigen::Ref< Eigen::VectorXd > values, double weight=1.0) override
 Compute the values of the active inequality constraints (elementwise max(0, c(x))) More...
 
void computeDistanceFiniteCombinedBounds (Eigen::Ref< Eigen::VectorXd > values) override
 Compute the distance to finite bound values (combined lower and upper) More...
 
void computeLowerAndUpperBoundDiff (Eigen::Ref< Eigen::VectorXd > lb_minus_x, Eigen::Ref< Eigen::VectorXd > ub_minus_x) override
 Compute the distance between parameters and bounds. More...
 
void getParametersAndBoundsFinite (Eigen::Ref< Eigen::VectorXd > lb_finite_bounds, Eigen::Ref< Eigen::VectorXd > ub_finite_bounds, Eigen::Ref< Eigen::VectorXd > x_finite_bounds) override
 Return bound and parameter vectors only for finite boudns. More...
 
void computeDenseJacobianFiniteCombinedBounds (Eigen::Ref< Eigen::MatrixXd > jacobian, double weight=1.0) override
 Compute the Jacobian for finite combined bounds. More...
 
int computeSparseJacobianFiniteCombinedBoundsNNZ () override
 
void computeSparseJacobianFiniteCombinedBoundsStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) override
 
void computeSparseJacobianFiniteCombinedBoundsValues (Eigen::Ref< Eigen::VectorXd > values, double weight=1.0) override
 
void computeDenseJacobianFiniteCombinedBoundsIdentity (Eigen::Ref< Eigen::MatrixXd > jacobian) override
 Compute the Jacobian for finite combined bounds. More...
 
bool checkIfAllUnfixedParam (std::function< bool(double, int)> fun)
 Check if a function taking the parameter value and unfixed-idx is true for all unfixed parameter values. More...
 
void clear () override
 
- Public Member Functions inherited from corbo::OptimizationProblemInterface
virtual ~OptimizationProblemInterface ()
 
virtual void computeSparseJacobianLsqObjective (Eigen::SparseMatrix< double > &jacobian, const double *multipliers=nullptr)
 
virtual void computeSparseJacobianEqualities (Eigen::SparseMatrix< double > &jacobian, const double *multipliers=nullptr)
 
virtual void computeSparseJacobianInequalities (Eigen::SparseMatrix< double > &jacobian, const double *multipliers=nullptr)
 
virtual void computeSparseJacobianActiveInequalities (Eigen::SparseMatrix< double > &jacobian, double weight=1.0)
 
virtual void computeSparseJacobianFiniteCombinedBounds (Eigen::SparseMatrix< double > &jacobian, double weight=1.0)
 
virtual void computeSparseJacobiansNNZ (int &nnz_lsq_obj, int &nnz_eq, int &nnz_ineq)
 
virtual void computeSparseJacobiansStructure (Eigen::Ref< Eigen::VectorXi > i_row_obj, Eigen::Ref< Eigen::VectorXi > j_col_obj, Eigen::Ref< Eigen::VectorXi > i_row_eq, Eigen::Ref< Eigen::VectorXi > j_col_eq, Eigen::Ref< Eigen::VectorXi > i_row_ineq, Eigen::Ref< Eigen::VectorXi > j_col_ineq)
 
virtual void computeSparseJacobians (Eigen::SparseMatrix< double > &jacobian_lsq_obj, Eigen::SparseMatrix< double > &jacobian_eq, Eigen::SparseMatrix< double > &jacobian_ineq, const double *multipliers_lsq_obj=nullptr, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, bool active_ineq=false, double active_ineq_weight=1.0)
 
virtual void computeDenseHessianObjective (const Eigen::Ref< const Eigen::MatrixXd > &jacobian, Eigen::Ref< Eigen::MatrixXd > hessian, const double *multipliers=nullptr, bool jacob_scaled=true)
 Compute the objective Hessian Hf(x) for the current parameter set. More...
 
virtual void computeSparseHessianObjective (Eigen::SparseMatrix< double > &hessian, double multiplier=1.0)
 
virtual void computeDenseHessianEqualities (Eigen::Ref< Eigen::MatrixXd > hessian, const double *multipliers=nullptr)
 
virtual void computeSparseHessianEqualities (Eigen::SparseMatrix< double > &hessian, const double *multipliers=nullptr)
 
virtual void computeDenseHessianInequalities (Eigen::Ref< Eigen::MatrixXd > hessian, const double *multipliers=nullptr)
 
virtual void computeSparseHessianInequalities (Eigen::SparseMatrix< double > &hessian, const double *multipliers=nullptr)
 
virtual void computeDenseHessians (Eigen::Ref< Eigen::MatrixXd > hessian_obj, Eigen::Ref< Eigen::MatrixXd > hessian_eq, Eigen::Ref< Eigen::MatrixXd > hessian_ineq, double multiplier_obj=1.0, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr)
 
virtual void computeSparseHessians (Eigen::SparseMatrix< double > &hessian_obj, Eigen::SparseMatrix< double > &hessian_eq, Eigen::SparseMatrix< double > &hessian_ineq, double multiplier_obj=1.0, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr)
 
virtual void computeBoundsForTwoSideBoundedLinearForm (Eigen::Ref< Eigen::VectorXd > lbA, Eigen::Ref< Eigen::VectorXd > ubA, bool include_finite_bounds)
 Compute lower and upper bounds lbA and ubA for the linear form lbA <= A x <= ubA. More...
 

Additional Inherited Members

- Public Types inherited from corbo::BaseHyperGraphOptimizationProblem
using Ptr = std::shared_ptr< BaseHyperGraphOptimizationProblem >
 
- Public Types inherited from corbo::OptimizationProblemInterface
using Ptr = std::shared_ptr< OptimizationProblemInterface >
 
using UPtr = std::unique_ptr< OptimizationProblemInterface >
 
- Static Public Member Functions inherited from corbo::BaseHyperGraphOptimizationProblem
static Factory< BaseHyperGraphOptimizationProblem > & getFactory ()
 Get access to the accociated factory. More...
 
- Protected Attributes inherited from corbo::BaseHyperGraphOptimizationProblem
HyperGraph _graph
 
bool _graph_precomputed = false
 
int _dim_param = 0
 
int _dim_non_lsq_obj = 0
 
int _dim_lsq_obj = 0
 
int _dim_eq = 0
 
int _dim_ineq = 0
 
- Protected Attributes inherited from corbo::OptimizationProblemInterface
bool _warn_if_not_specialized = true
 

Detailed Description

Definition at line 56 of file hyper_graph_optimization_problem_edge_based.h.

Constructor & Destructor Documentation

◆ HyperGraphOptimizationProblemEdgeBased() [1/2]

corbo::HyperGraphOptimizationProblemEdgeBased::HyperGraphOptimizationProblemEdgeBased ( )
default

◆ HyperGraphOptimizationProblemEdgeBased() [2/2]

corbo::HyperGraphOptimizationProblemEdgeBased::HyperGraphOptimizationProblemEdgeBased ( OptimizationEdgeSet::Ptr  edges,
VertexSetInterface::Ptr  vertices 
)
inline

Member Function Documentation

◆ computeCombinedSparseJacobian()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeCombinedSparseJacobian ( Eigen::SparseMatrix< double > &  jacobian,
bool  objective_lsq,
bool  equality,
bool  inequality,
bool  finite_combined_bounds,
bool  active_ineq = false,
double  weight_eq = 1.0,
double  weight_ineq = 1.0,
double  weight_bounds = 1.0,
const Eigen::VectorXd *  values = nullptr,
const Eigen::VectorXi *  col_nnz = nullptr 
)
overridevirtual

◆ computeCombinedSparseJacobiansNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeCombinedSparseJacobiansNNZ ( bool  objective_lsq = true,
bool  equality = true,
bool  inequality = true 
)
overridevirtual

◆ computeCombinedSparseJacobiansStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeCombinedSparseJacobiansStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col,
bool  objective_lsq = true,
bool  equality = true,
bool  inequality = true 
)
overridevirtual

◆ computeCombinedSparseJacobiansValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeCombinedSparseJacobiansValues ( Eigen::Ref< Eigen::VectorXd >  values,
bool  objective_lsq = true,
bool  equality = true,
bool  inequality = true,
const double *  multipliers_obj = nullptr,
const double *  multipliers_eq = nullptr,
const double *  multipliers_ineq = nullptr 
)
overridevirtual

◆ computeDenseHessianObjective()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeDenseHessianObjective ( Eigen::Ref< Eigen::MatrixXd >  hessian,
double  multiplier = 1.0 
)
overridevirtual

◆ computeDenseJacobianActiveInequalities()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeDenseJacobianActiveInequalities ( Eigen::Ref< Eigen::MatrixXd >  jacobian,
double  weight = 1.0 
)
overridevirtual

Compute the Jacobian Jc(x) with non-zeros for active constraints c(x)>= 0 and zeros for inactive ones.

Parameters
[out]jacobianThe resulting Jacobian matrix [inequalityDimension() x parameterDimension()]. Warning: the matrix must be pre-allocated with ZEROS!
[in]weightOptionally provide a weight factor

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 697 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeDenseJacobianEqualities()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeDenseJacobianEqualities ( Eigen::Ref< Eigen::MatrixXd >  jacobian,
const double *  multipliers = nullptr 
)
overridevirtual

Compute the equality constraint Jacobian Jceq(x) for the current parameter set.

Parameters
[out]jacobianThe resulting Jacobian matrix [equalityDimension() x parameterDimension()]. Warning: the matrix must be pre-allocated with ZEROS!
[in]multipliersOptionally provide a vector of multipliers to scale each cost function term [equalityDimension() x 1]

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 346 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeDenseJacobianInequalities()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeDenseJacobianInequalities ( Eigen::Ref< Eigen::MatrixXd >  jacobian,
const double *  multipliers = nullptr 
)
overridevirtual

Compute the inequality constraint Jacobian Jc(x) for the current parameter set.

Parameters
[out]jacobianThe resulting Jacobian matrix [inequalityDimension() x parameterDimension()]. Warning: the matrix must be pre-allocated with ZEROS!
[in]multipliersOptionally provide a vector of multipliers to scale each cost function term [inequalityDimension() x 1]

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 521 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeDenseJacobianLsqObjective()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeDenseJacobianLsqObjective ( Eigen::Ref< Eigen::MatrixXd >  jacobian,
const double *  multipliers = nullptr 
)
overridevirtual

Compute the objective Jacobian Jf(x) for the current parameter set.

Parameters
[out]jacobianThe resulting Jacobian matrix [objectiveDimension() x parameterDimension()]. Warning: the matrix must be pre-allocated with ZEROS!
[in]multipliersOptionally provide a vector of multipliers to scale each cost function term [objectiveDimension() x 1]

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 172 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeDenseJacobians()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeDenseJacobians ( Eigen::Ref< Eigen::VectorXd >  gradient_non_lsq_obj,
Eigen::Ref< Eigen::MatrixXd >  jacobian_lsq_obj,
Eigen::Ref< Eigen::MatrixXd >  jacobian_eq,
Eigen::Ref< Eigen::MatrixXd >  jacobian_ineq,
const double *  multipliers_lsq_obj = nullptr,
const double *  multipliers_eq = nullptr,
const double *  multipliers_ineq = nullptr,
bool  active_ineq = false,
double  active_ineq_weight = 1.0 
)
overridevirtual

Compute the objective and constraint Jacobians at once.

Use this method to speed up Jacobian computation if possible. The default implementation just calls the individual Jacobian computations.

Remarks
This method does not compute Jacobians for bounds due to their simplicity, compute them manually.
Parameters
[out]jacobian_objThe resulting objective Jacobian matrix [objectiveDimension() x parameterDimension()]. Warning: the matrix must be pre-allocated with ZEROS!
[out]jacobian_eqThe resulting equality constraint Jacobian matrix [equalityDimension() x parameterDimension()]. Warning: the matrix must be pre-allocated with ZEROS!
[out]jacobian_ineqThe resulting inequality constraint Jacobian matrix [inequalityDimension() x parameterDimension()]. Warning: the matrix must be pre-allocated with ZEROS!
[in]multipliersOptionally provide a vector of multipliers to scale each cost function term [objectiveDimension() + equalityDimension() + inequalityDimension() x 1]

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 863 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeGradientNonLsqObjective()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeGradientNonLsqObjective ( Eigen::Ref< Eigen::VectorXd >  gradient)
overridevirtual

◆ computeGradientObjective()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeGradientObjective ( Eigen::Ref< Eigen::VectorXd >  gradient)
overridevirtual

◆ computeGradientObjectiveAndCombinedSparseJacobiansValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeGradientObjectiveAndCombinedSparseJacobiansValues ( Eigen::Ref< Eigen::VectorXd >  gradient,
Eigen::Ref< Eigen::VectorXd >  jac_values,
bool  equality = true,
bool  inequality = true,
const double *  multipliers_eq = nullptr,
const double *  multipliers_ineq = nullptr 
)
overridevirtual

◆ computeSparseHessianEqualitiesNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianEqualitiesNNZ ( bool  lower_part_only = false)
overridevirtual

◆ computeSparseHessianEqualitiesStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianEqualitiesStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessianEqualitiesValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianEqualitiesValues ( Eigen::Ref< Eigen::VectorXd >  values,
const double *  multipliers = nullptr,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessianInequalitiesNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianInequalitiesNNZ ( bool  lower_part_only = false)
overridevirtual

◆ computeSparseHessianInequalitiesStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianInequalitiesStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessianInequalitiesValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianInequalitiesValues ( Eigen::Ref< Eigen::VectorXd >  values,
const double *  multipliers = nullptr,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessianLagrangian()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianLagrangian ( Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &  H,
const double *  multipliers_eq,
const double *  multipliers_ineq,
const Eigen::VectorXi *  col_nnz = nullptr,
bool  upper_part_only = false 
)
overridevirtual

Compute the hessian of the lagrangian L(x) = f(x) + lambda1 * c(x) + lambda2 * ceq(x)

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 4044 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeSparseHessianLagrangianNNZperCol()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianLagrangianNNZperCol ( Eigen::Ref< Eigen::VectorXi >  col_nnz,
bool  upper_part_only = false 
)
overridevirtual

◆ computeSparseHessianObjectiveLL()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianObjectiveLL ( Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &  H,
const Eigen::VectorXi *  col_nnz = nullptr,
bool  upper_part_only = false 
)
overridevirtual

◆ computeSparseHessianObjectiveNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianObjectiveNNZ ( bool  lower_part_only = false)
overridevirtual

◆ computeSparseHessianObjectiveNNZperCol()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianObjectiveNNZperCol ( Eigen::Ref< Eigen::VectorXi >  col_nnz,
bool  upper_part_only = false 
)
overridevirtual

◆ computeSparseHessianObjectiveStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianObjectiveStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessianObjectiveValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessianObjectiveValues ( Eigen::Ref< Eigen::VectorXd >  values,
double  multiplier = 1.0,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessiansNNZ()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessiansNNZ ( int nnz_obj,
int nnz_eq,
int nnz_ineq,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessiansStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessiansStructure ( Eigen::Ref< Eigen::VectorXi >  i_row_obj,
Eigen::Ref< Eigen::VectorXi >  j_col_obj,
Eigen::Ref< Eigen::VectorXi >  i_row_eq,
Eigen::Ref< Eigen::VectorXi >  j_col_eq,
Eigen::Ref< Eigen::VectorXi >  i_row_ineq,
Eigen::Ref< Eigen::VectorXi >  j_col_ineq,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseHessiansValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseHessiansValues ( Eigen::Ref< Eigen::VectorXd >  values_obj,
Eigen::Ref< Eigen::VectorXd >  values_eq,
Eigen::Ref< Eigen::VectorXd >  values_ineq,
double  multiplier_obj = 1.0,
const double *  multipliers_eq = nullptr,
const double *  multipliers_ineq = nullptr,
bool  lower_part_only = false 
)
overridevirtual

◆ computeSparseJacobianActiveInequalitiesValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianActiveInequalitiesValues ( Eigen::Ref< Eigen::VectorXd >  values,
double  weight = 1.0 
)
overridevirtual

◆ computeSparseJacobianEqualitiesNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianEqualitiesNNZ ( )
overridevirtual

◆ computeSparseJacobianEqualitiesStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianEqualitiesStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col 
)
overridevirtual

◆ computeSparseJacobianEqualitiesValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianEqualitiesValues ( Eigen::Ref< Eigen::VectorXd >  values,
const double *  multipliers = nullptr 
)
overridevirtual

◆ computeSparseJacobianInequalitiesNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianInequalitiesNNZ ( )
overridevirtual

◆ computeSparseJacobianInequalitiesStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianInequalitiesStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col 
)
overridevirtual

◆ computeSparseJacobianInequalitiesValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianInequalitiesValues ( Eigen::Ref< Eigen::VectorXd >  values,
const double *  multipliers = nullptr 
)
overridevirtual

◆ computeSparseJacobianLsqObjectiveNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianLsqObjectiveNNZ ( )
overridevirtual

◆ computeSparseJacobianLsqObjectiveStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianLsqObjectiveStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col 
)
overridevirtual

◆ computeSparseJacobianLsqObjectiveValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianLsqObjectiveValues ( Eigen::Ref< Eigen::VectorXd >  values,
const double *  multipliers = nullptr 
)
overridevirtual

◆ computeSparseJacobiansValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobiansValues ( Eigen::Ref< Eigen::VectorXd >  values_obj,
Eigen::Ref< Eigen::VectorXd >  values_eq,
Eigen::Ref< Eigen::VectorXd >  values_ineq,
const double *  multipliers_obj = nullptr,
const double *  multipliers_eq = nullptr,
const double *  multipliers_ineq = nullptr,
bool  active_ineq = false,
double  active_ineq_weight = 1.0 
)
overridevirtual

◆ computeSparseJacobianTwoSideBoundedLinearForm()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianTwoSideBoundedLinearForm ( Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &  A,
bool  include_finite_bounds,
const Eigen::VectorXi *  col_nnz = nullptr 
)
overridevirtual

Compute the jacobian A for the linear form lbA <= A x <= lbB.

Especially some QP solvers require either

 lbA <= A x<= ubA

or

lbA <= A x <= ubA lb <= x <= ub

The first formulatin includes bounds and hence the bottom rows of A are the identity. However, in case lb and ub are infinity, A might have obsolete rows.

If parameter include_bounds is true: only finite bounds are considered and matrix A is of size [getEqualityDimension() + getInequalityDimension() + finiteCombinedBounds() x parameterDimension()].

If parameter include_bounds is false: the size of matrix A is [getEqualityDimension() + getInequalityDimension() x parameterDimension()].

Remarks
this version defines the sparse matrix with long long indices (since it is required by osqp for example)
Parameters
[out]ACombined jacobian (see description above)
[in]include_finite_boundsSpecify whether bounds should be included in A (check dimension of A as descirbed above)
[in]col_nnzEstimate for number of nnz per column to speed up insertion

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 4593 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeSparseJacobianTwoSideBoundedLinearFormAndHessianLagrangian()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianTwoSideBoundedLinearFormAndHessianLagrangian ( Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &  H,
const double *  multipliers_eq,
const double *  multipliers_ineq,
Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &  A,
bool  include_finite_bounds,
const Eigen::VectorXi *  col_nnz_H,
const Eigen::VectorXi *  col_nnz_A,
bool  upper_part_only_H 
)
overridevirtual

Compute the Jacobian and Hessian of the lagrangian.

This method combines computeSparseJacobianTwoSideBoundedLinearForm() and computeSparseHessianLagrangian() in order to speed up computation. Often, Hessian computations rely on first order derivatives and so we do not need to compute the Jacobian twice.

Reimplemented from corbo::OptimizationProblemInterface.

Definition at line 4991 of file hyper_graph_optimization_problem_edge_based.cpp.

◆ computeSparseJacobianTwoSideBoundedLinearFormAndHessianObjective()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianTwoSideBoundedLinearFormAndHessianObjective ( Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &  H,
Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &  A,
bool  include_finite_bounds,
const Eigen::VectorXi *  col_nnz_H,
const Eigen::VectorXi *  col_nnz_A,
bool  upper_part_only_H 
)
overridevirtual

◆ computeSparseJacobianTwoSideBoundedLinearFormNNZ()

int corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianTwoSideBoundedLinearFormNNZ ( bool  include_finite_bounds)
overridevirtual

◆ computeSparseJacobianTwoSideBoundedLinearFormNNZPerColumn()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianTwoSideBoundedLinearFormNNZPerColumn ( Eigen::Ref< Eigen::VectorXi >  col_nnz,
bool  include_finite_bounds 
)
overridevirtual

◆ computeSparseJacobianTwoSideBoundedLinearFormStructure()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianTwoSideBoundedLinearFormStructure ( Eigen::Ref< Eigen::VectorXi >  i_row,
Eigen::Ref< Eigen::VectorXi >  j_col,
bool  include_finite_bounds 
)
overridevirtual

◆ computeSparseJacobianTwoSideBoundedLinearFormValues()

void corbo::HyperGraphOptimizationProblemEdgeBased::computeSparseJacobianTwoSideBoundedLinearFormValues ( Eigen::Ref< Eigen::VectorXd >  values,
bool  include_finite_bounds 
)
overridevirtual

◆ getInstance()

BaseHyperGraphOptimizationProblem::Ptr corbo::HyperGraphOptimizationProblemEdgeBased::getInstance ( ) const
inlineoverridevirtual

The documentation for this class was generated from the following files:


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:07:20