Go to the documentation of this file.
52 nnz_jac_g =
_solver->_nnz_jac_constraints;
54 if (
_solver->_cache_first_order_derivatives)
57 _solver->_jac_constr_cache.resize(nnz_jac_g);
64 nnz_h_lag =
_solver->_nnz_h_lagrangian;
67 index_style = TNLP::C_STYLE;
104 assert(init_x ==
true);
113 lambda_map =
_solver->_lambda_cache;
162 if (
_solver->_cache_first_order_derivatives)
163 grad_f_map =
_solver->_grad_f_cache;
196 assert(nele_jac ==
_solver->_nnz_jac_constraints);
219 if (
_solver->_cache_first_order_derivatives)
220 values_map =
_solver->_jac_constr_cache;
235 assert(nele_hess ==
_solver->_nnz_h_lagrangian);
279 const Number* lambda, Number obj_value,
const IpoptData* ip_data, IpoptCalculatedQuantities* ip_cq)
284 _solver->_last_obj_value = obj_value;
287 _solver->_lambda_cache = lambda_map;
OptimizationProblemInterface * _problem
void precompute1stOrderDerivatives()
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)
bool eval_g(Index n, const Number *x, bool new_x, Index m, Number *g) override
bool eval_f(Index n, const Number *x, bool new_x, Number &obj_value) override
bool get_bounds_info(Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) override
virtual double computeValueObjective()
virtual int getInequalityDimension()=0
Total dimension of general inequality constraints.
constexpr const double CORBO_INF_DBL
Representation for infinity (double version)
bool get_starting_point(Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda) override
virtual void computeValuesEquality(Eigen::Ref< Eigen::VectorXd > values)=0
Compute the equality constraint values ceq(x) for the current parameter set.
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 getBounds(Eigen::Ref< Eigen::VectorXd > lb, Eigen::Ref< Eigen::VectorXd > ub)
Get lower and upper bound vector.
virtual int getEqualityDimension()=0
Total dimension of equality constraints.
virtual void computeValuesInequality(Eigen::Ref< Eigen::VectorXd > values)=0
Compute the inequality constraint values c(x) for the current parameter set.
virtual void setParameterVector(const Eigen::Ref< const Eigen::VectorXd > &x)
Set complete parameter vector.
bool eval_jac_g(Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) override
A matrix or vector expression mapping an existing array of data.
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)
bool eval_h(Index n, const Number *x, bool new_x, Number obj_factor, Index m, const Number *lambda, bool new_lambda, Index nele_hess, Index *iRow, Index *jCol, Number *values) override
virtual void getParameterVector(Eigen::Ref< Eigen::VectorXd > x)
Return deep copy of the complete parameter vector.
void finalize_solution(SolverReturn status, Index n, const Number *x, const Number *z_L, const Number *z_U, Index m, const Number *g, const Number *lambda, Number obj_value, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) override
bool get_nlp_info(Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style) override
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 computeGradientObjective(Eigen::Ref< Eigen::VectorXd > gradient)
IpoptWrapper(SolverIpopt *solver)
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 int getParameterDimension()=0
Effictive dimension of the optimization parameter set (changeable, non-fixed part)
bool eval_grad_f(Index n, const Number *x, bool new_x, Number *grad_f) override
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:58