Simple optimization problem formulation. More...
#include <simple_optimization_problem.h>
Public Member Functions | |
SimpleOptimizationProblem () | |
SimpleOptimizationProblem (int parameter_dim) | |
Specify the dimension of the optimization problem | |
int | getNonLsqObjectiveDimension () override=0 |
Total dimension of objective function terms. More... | |
int | getLsqObjectiveDimension () override=0 |
Total dimension of least-squares objective function terms. More... | |
int | getObjectiveDimension () override=0 |
Get dimension of the objective (should be zero or one, includes Lsq objectives if present) More... | |
int | getEqualityDimension () override=0 |
Total dimension of equality constraints. More... | |
int | getInequalityDimension () override=0 |
Total dimension of general inequality constraints. More... | |
Specify main equations of the optimization problem | |
void | computeValuesLsqObjective (Eigen::Ref< Eigen::VectorXd > values) override=0 |
Compute the objective function values f(x) for the current parameter set. More... | |
double | computeValueNonLsqObjective () override=0 |
void | computeValuesEquality (Eigen::Ref< Eigen::VectorXd > values) override=0 |
Compute the equality constraint values ceq(x) for the current parameter set. More... | |
void | computeValuesInequality (Eigen::Ref< Eigen::VectorXd > values) override=0 |
Compute the inequality constraint values c(x) for the current parameter set. More... | |
Configure parameter vector | |
void | resizeParameterVector (int parameter_dim) |
Resize the dimension of the parameter vector. More... | |
Access parameter vector and bounds | |
void | setX (const Eigen::Ref< const Eigen::VectorXd > &x) |
Eigen::VectorXd & | getXRef () |
const Eigen::VectorXd & | getX () const |
void | setLowerBounds (const Eigen::Ref< const Eigen::VectorXd > &lb) |
Eigen::VectorXd & | getLowerBoundsRef () |
const Eigen::VectorXd & | getLowerBounds () const |
void | setUpperBounds (const Eigen::Ref< const Eigen::VectorXd > &ub) |
Eigen::VectorXd & | getUpperBoundsRef () |
const Eigen::VectorXd & | getUpperBounds () const |
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 | 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... | |
void | getParameterVector (Eigen::Ref< Eigen::VectorXd > x) override |
Same as getX() but less efficient (overrides interface method, but here x must not be pre-allocated) More... | |
void | setParameterVector (const Eigen::Ref< const Eigen::VectorXd > &x) override |
Same as setX() (overrides interface method) More... | |
Interface implementations | |
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 |
Specify properties of the optimization problem | |
bool | isLeastSquaresProblem () const override=0 |
Check if the underlying problem is defined in the least squares form. More... | |
![]() | |
virtual 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... | |
virtual void | clear () |
virtual 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) |
virtual int | computeCombinedSparseJacobiansNNZ (bool objective_lsq=true, bool equality=true, bool inequality=true) |
virtual void | computeCombinedSparseJacobiansStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool objective_lsq=true, bool equality=true, bool inequality=true) |
virtual 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) |
virtual void | computeDenseHessianEqualities (Eigen::Ref< Eigen::MatrixXd > hessian, const double *multipliers=nullptr) |
virtual void | computeDenseHessianInequalities (Eigen::Ref< Eigen::MatrixXd > hessian, const double *multipliers=nullptr) |
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 | computeDenseHessianObjective (Eigen::Ref< Eigen::MatrixXd > hessian, double multiplier=1.0) |
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 | computeDenseJacobianActiveInequalities (Eigen::Ref< Eigen::MatrixXd > jacobian, double weight=1.0) |
Compute the Jacobian Jc(x) with non-zeros for active constraints c(x)>= 0 and zeros for inactive ones. More... | |
virtual void | computeDenseJacobianEqualities (Eigen::Ref< Eigen::MatrixXd > jacobian, const double *multipliers=nullptr) |
Compute the equality constraint Jacobian Jceq(x) for the current parameter set. More... | |
virtual void | computeDenseJacobianFiniteCombinedBounds (Eigen::Ref< Eigen::MatrixXd > jacobian, double weight=1.0) |
Compute the Jacobian for finite combined bounds. More... | |
virtual void | computeDenseJacobianFiniteCombinedBoundsIdentity (Eigen::Ref< Eigen::MatrixXd > jacobian) |
Compute the Jacobian for finite combined bounds. More... | |
virtual void | computeDenseJacobianInequalities (Eigen::Ref< Eigen::MatrixXd > jacobian, const double *multipliers=nullptr) |
Compute the inequality constraint Jacobian Jc(x) for the current parameter set. More... | |
virtual void | computeDenseJacobianLsqObjective (Eigen::Ref< Eigen::MatrixXd > jacobian, const double *multipliers=nullptr) |
Compute the objective Jacobian Jf(x) for the current parameter set. More... | |
virtual 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) |
Compute the objective and constraint Jacobians at once. More... | |
virtual void | computeDistanceFiniteCombinedBounds (Eigen::Ref< Eigen::VectorXd > values) |
Compute the distance to finite bound values (combined lower and upper) More... | |
virtual void | computeGradientNonLsqObjective (Eigen::Ref< Eigen::VectorXd > gradient) |
virtual void | computeGradientObjective (Eigen::Ref< Eigen::VectorXd > gradient) |
virtual 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) |
virtual void | computeLowerAndUpperBoundDiff (Eigen::Ref< Eigen::VectorXd > lb_minus_x, Eigen::Ref< Eigen::VectorXd > ub_minus_x) |
Compute the distance between parameters and bounds. More... | |
virtual void | computeSparseHessianEqualities (Eigen::SparseMatrix< double > &hessian, const double *multipliers=nullptr) |
virtual int | computeSparseHessianEqualitiesNNZ (bool lower_part_only=false) |
virtual void | computeSparseHessianEqualitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool lower_part_only=false) |
virtual void | computeSparseHessianEqualitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr, bool lower_part_only=false) |
virtual void | computeSparseHessianInequalities (Eigen::SparseMatrix< double > &hessian, const double *multipliers=nullptr) |
virtual int | computeSparseHessianInequalitiesNNZ (bool lower_part_only=false) |
virtual void | computeSparseHessianInequalitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool lower_part_only=false) |
virtual void | computeSparseHessianInequalitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr, bool lower_part_only=false) |
virtual 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) |
Compute the hessian of the lagrangian L(x) = f(x) + lambda1 * c(x) + lambda2 * ceq(x) More... | |
virtual void | computeSparseHessianLagrangianNNZperCol (Eigen::Ref< Eigen::VectorXi > col_nnz, bool upper_part_only) |
virtual void | computeSparseHessianObjective (Eigen::SparseMatrix< double > &hessian, double multiplier=1.0) |
virtual void | computeSparseHessianObjectiveLL (Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &H, const Eigen::VectorXi *col_nnz=nullptr, bool upper_part_only=false) |
virtual int | computeSparseHessianObjectiveNNZ (bool lower_part_only=false) |
virtual void | computeSparseHessianObjectiveNNZperCol (Eigen::Ref< Eigen::VectorXi > col_nnz, bool upper_part_only=false) |
virtual void | computeSparseHessianObjectiveStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool lower_part_only=false) |
virtual void | computeSparseHessianObjectiveValues (Eigen::Ref< Eigen::VectorXd > values, double multiplier=1.0, bool lower_part_only=false) |
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 | computeSparseHessiansNNZ (int &nnz_obj, int &nnz_eq, int &nnz_ineq, bool lower_part_only=false) |
virtual 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) |
virtual 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) |
virtual void | computeSparseJacobianActiveInequalities (Eigen::SparseMatrix< double > &jacobian, double weight=1.0) |
virtual void | computeSparseJacobianActiveInequalitiesValues (Eigen::Ref< Eigen::VectorXd > values, double weight=1.0) |
virtual void | computeSparseJacobianEqualities (Eigen::SparseMatrix< double > &jacobian, const double *multipliers=nullptr) |
virtual int | computeSparseJacobianEqualitiesNNZ () |
virtual void | computeSparseJacobianEqualitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) |
virtual void | computeSparseJacobianEqualitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr) |
virtual void | computeSparseJacobianFiniteCombinedBounds (Eigen::SparseMatrix< double > &jacobian, double weight=1.0) |
virtual int | computeSparseJacobianFiniteCombinedBoundsNNZ () |
virtual void | computeSparseJacobianFiniteCombinedBoundsStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) |
virtual void | computeSparseJacobianFiniteCombinedBoundsValues (Eigen::Ref< Eigen::VectorXd > values, double weight=1.0) |
virtual void | computeSparseJacobianInequalities (Eigen::SparseMatrix< double > &jacobian, const double *multipliers=nullptr) |
virtual int | computeSparseJacobianInequalitiesNNZ () |
virtual void | computeSparseJacobianInequalitiesStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) |
virtual void | computeSparseJacobianInequalitiesValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr) |
virtual void | computeSparseJacobianLsqObjective (Eigen::SparseMatrix< double > &jacobian, const double *multipliers=nullptr) |
virtual int | computeSparseJacobianLsqObjectiveNNZ () |
virtual void | computeSparseJacobianLsqObjectiveStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col) |
virtual void | computeSparseJacobianLsqObjectiveValues (Eigen::Ref< Eigen::VectorXd > values, const double *multipliers=nullptr) |
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 | 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 | 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) |
virtual 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) |
virtual void | computeValuesActiveInequality (Eigen::Ref< Eigen::VectorXd > values, double weight=1.0) |
Compute the values of the active inequality constraints (elementwise max(0, c(x))) More... | |
virtual void | getParametersAndBoundsFinite (Eigen::Ref< Eigen::VectorXd > lb_finite_bounds, Eigen::Ref< Eigen::VectorXd > ub_finite_bounds, Eigen::Ref< Eigen::VectorXd > x_finite_bounds) |
Return bound and parameter vectors only for finite boudns. More... | |
virtual | ~OptimizationProblemInterface () |
virtual double | computeValueObjective () |
virtual 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) |
virtual int | finiteCombinedBoundsDimension () |
Dimension of the set of finite bounds (combined such that each ub and lb component define a single dimension) More... | |
virtual int | finiteBoundsDimension () |
Dimension of the set of finite bounds (individual bounds ub and lb) More... | |
virtual void | computeSparseJacobianTwoSideBoundedLinearForm (Eigen::SparseMatrix< double, Eigen::ColMajor, long long > &A, bool include_finite_bounds, const Eigen::VectorXi *col_nnz=nullptr) |
Compute the jacobian A for the linear form lbA <= A x <= lbB. More... | |
virtual void | computeSparseJacobianTwoSideBoundedLinearFormNNZPerColumn (Eigen::Ref< Eigen::VectorXi > col_nnz, bool include_finite_bounds) |
virtual int | computeSparseJacobianTwoSideBoundedLinearFormNNZ (bool include_finite_bounds) |
virtual void | computeSparseJacobianTwoSideBoundedLinearFormStructure (Eigen::Ref< Eigen::VectorXi > i_row, Eigen::Ref< Eigen::VectorXi > j_col, bool include_finite_bounds) |
virtual void | computeSparseJacobianTwoSideBoundedLinearFormValues (Eigen::Ref< Eigen::VectorXd > values, bool include_finite_bounds) |
virtual 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=nullptr, const Eigen::VectorXi *col_nnz_A=nullptr, bool upper_part_only_H=false) |
Compute the Jacobian and Hessian of the lagrangian. More... | |
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... | |
Private Attributes | |
Eigen::VectorXd | _lb |
Eigen::VectorXd | _ub |
Eigen::VectorXd | _x |
std::vector< Eigen::VectorXd > | _x_backup |
Additional Inherited Members | |
![]() | |
using | Ptr = std::shared_ptr< OptimizationProblemInterface > |
using | UPtr = std::unique_ptr< OptimizationProblemInterface > |
![]() | |
bool | _warn_if_not_specialized = true |
Simple optimization problem formulation.
This class defines a standard optimization problem in which the optimization vector x is represented as a simple vector.
For the mathematical description refer to the OptimizationProblemInterface.
Definition at line 51 of file simple_optimization_problem.h.
|
inline |
Definition at line 54 of file simple_optimization_problem.h.
|
inlineexplicit |
Definition at line 55 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Apply increment to the current parameter set.
Usually solvers determine a new step/increment in each iteration. This method applies the parameter update.
[in] | increment | Parameter update [parameterDimension() x 1] |
Reimplemented from corbo::OptimizationProblemInterface.
Definition at line 151 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Apply increment to the current parameter set (single element overload)
[in] | idx | Value index according vector size [parameterDimension() x 1] |
[in] | increment | Parameter update [parameterDimension() x 1] |
Reimplemented from corbo::OptimizationProblemInterface.
Definition at line 153 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Restore parameter set from the last backup and keep backup if desired.
Implements corbo::OptimizationProblemInterface.
Definition at line 156 of file simple_optimization_problem.h.
|
overridepure virtual |
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
overridepure virtual |
Compute the equality constraint values ceq(x) for the current parameter set.
[out] | values | The resulting value vector [equalityDimension() x 1]. Warning: the size must be pre-allocated! |
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
overridepure virtual |
Compute the inequality constraint values c(x) for the current parameter set.
[out] | values | The resulting value vector [inequalityDimension() x 1]. Warning: the size must be pre-allocated! |
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
overridepure virtual |
Compute the objective function values f(x) for the current parameter set.
[out] | values | The resulting value vector [objectiveDimension() x 1]. Warning: the size must be pre-allocated! |
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
inlineoverridevirtual |
Implements corbo::OptimizationProblemInterface.
Definition at line 160 of file simple_optimization_problem.h.
|
overridevirtual |
Get lower and upper bound vector.
[out] | lb | Lower bounds [parameterDimension() x 1] (must be pre-allocated!) |
[out] | ub | Upper bounds [parameterDimension() x 1] (must be pre-allocated!) |
Reimplemented from corbo::OptimizationProblemInterface.
Definition at line 44 of file simple_optimization_problem.cpp.
|
overridepure virtual |
Total dimension of equality constraints.
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
overridepure virtual |
Total dimension of general inequality constraints.
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
inlineoverridevirtual |
Return specific lower bound value of a parameter.
[in] | idx | Value index according vector size [parameterDimension() x 1] |
Implements corbo::OptimizationProblemInterface.
Definition at line 129 of file simple_optimization_problem.h.
|
inline |
Definition at line 113 of file simple_optimization_problem.h.
|
inline |
Definition at line 112 of file simple_optimization_problem.h.
|
overridepure virtual |
Total dimension of least-squares objective function terms.
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
overridepure virtual |
Total dimension of objective function terms.
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
overridepure virtual |
Get dimension of the objective (should be zero or one, includes Lsq objectives if present)
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
|
inlineoverridevirtual |
Effictive dimension of the optimization parameter set (changeable, non-fixed part)
Implements corbo::OptimizationProblemInterface.
Definition at line 148 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Return specific value of the parameter vector.
[in] | idx | Value index according vector size [parameterDimension() x 1] |
Implements corbo::OptimizationProblemInterface.
Definition at line 120 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Same as getX() but less efficient (overrides interface method, but here x must not be pre-allocated)
Reimplemented from corbo::OptimizationProblemInterface.
Definition at line 138 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Return specific upper bound of a parameter.
[in] | idx | Value index according vector size [parameterDimension() x 1] |
Implements corbo::OptimizationProblemInterface.
Definition at line 131 of file simple_optimization_problem.h.
|
inline |
Definition at line 117 of file simple_optimization_problem.h.
|
inline |
Definition at line 116 of file simple_optimization_problem.h.
|
inline |
Definition at line 109 of file simple_optimization_problem.h.
|
inline |
Definition at line 108 of file simple_optimization_problem.h.
|
overridepure virtual |
Check if the underlying problem is defined in the least squares form.
Least-squares problems are defined as and the function values and Jacobian are computed for
rather than for
. Specialiezed least-squares solvers require the optimization problem to be defined in this particular form.
In summary, the solver computes the squared l2-norm of the objective function value (scalar) if set to true.
Implements corbo::OptimizationProblemInterface.
Implemented in corbo::SimpleOptimizationProblemWithCallbacks.
void corbo::SimpleOptimizationProblem::resizeParameterVector | ( | int | parameter_dim | ) |
Resize the dimension of the parameter vector.
parameter_dim |
Definition at line 29 of file simple_optimization_problem.cpp.
|
overridevirtual |
Discard last backup (or all)
Implements corbo::OptimizationProblemInterface.
Definition at line 37 of file simple_optimization_problem.cpp.
|
overridevirtual |
Set lower and upper bound vector.
[in] | lb | Lower bounds [parameterDimension() x 1] |
[in] | ub | Upper bounds [parameterDimension() x 1] |
Reimplemented from corbo::OptimizationProblemInterface.
Definition at line 50 of file simple_optimization_problem.cpp.
|
inlineoverridevirtual |
Set specific lower bound of a parameter.
[in] | idx | Value index according vector size [parameterDimension() x 1] |
[in] | lb | New lower bound to be set |
Implements corbo::OptimizationProblemInterface.
Definition at line 133 of file simple_optimization_problem.h.
|
inline |
Definition at line 111 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Set specific value of the parameter vector.
[in] | idx | Value index according vector size [parameterDimension() x 1] |
[in] | x | New value to be set |
Implements corbo::OptimizationProblemInterface.
Definition at line 122 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Same as setX() (overrides interface method)
Reimplemented from corbo::OptimizationProblemInterface.
Definition at line 140 of file simple_optimization_problem.h.
|
inlineoverridevirtual |
Set specific upper bound of a parameter.
[in] | idx | Value index according vector size [parameterDimension() x 1] |
[in] | ub | New upper bound to be set |
Implements corbo::OptimizationProblemInterface.
Definition at line 135 of file simple_optimization_problem.h.
|
inline |
Definition at line 115 of file simple_optimization_problem.h.
|
inline |
Definition at line 107 of file simple_optimization_problem.h.
|
private |
Definition at line 181 of file simple_optimization_problem.h.
|
private |
Definition at line 182 of file simple_optimization_problem.h.
|
private |
Definition at line 180 of file simple_optimization_problem.h.
|
private |
Definition at line 184 of file simple_optimization_problem.h.