#include <ipopt_nlp.hpp>
Definition at line 55 of file ipopt_nlp.hpp.
Public Member Functions | |
IpoptUserClass (const IpoptInterface &solver, IpoptMemory *mem) | |
~IpoptUserClass () override | |
bool | get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style) override |
bool | get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) override |
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 |
bool | eval_f (Index n, const Number *x, bool new_x, Number &obj_value) override |
bool | eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f) override |
bool | eval_g (Index n, const Number *x, bool new_x, Index m, Number *g) override |
bool | eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) override |
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 |
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 |
Index | get_number_of_nonlinear_variables () override |
bool | get_list_of_nonlinear_variables (Index num_nonlin_vars, Index *pos_nonlin_vars) override |
bool | intermediate_callback (AlgorithmMode mode, Index iter, Number obj_value, Number inf_pr, Number inf_du, Number mu, Number d_norm, Number regularization_size, Number alpha_du, Number alpha_pr, Index ls_trials, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) override |
bool | get_var_con_metadata (Index n, StringMetaDataMapType &var_string_md, IntegerMetaDataMapType &var_integer_md, NumericMetaDataMapType &var_numeric_md, Index m, StringMetaDataMapType &con_string_md, IntegerMetaDataMapType &con_integer_md, NumericMetaDataMapType &con_numeric_md) override |
void | finalize_metadata (Index n, const StringMetaDataMapType &var_string_md, const IntegerMetaDataMapType &var_integer_md, const NumericMetaDataMapType &var_numeric_md, Index m, const StringMetaDataMapType &con_string_md, const IntegerMetaDataMapType &con_integer_md, const NumericMetaDataMapType &con_numeric_md) override |
casadi::IpoptUserClass::IpoptUserClass | ( | const IpoptInterface & | solver, |
IpoptMemory * | mem | ||
) |
Definition at line 33 of file ipopt_nlp.cpp.
References casadi::Nlpsol::ng_, and casadi::Nlpsol::nx_.
|
override |
Definition at line 48 of file ipopt_nlp.cpp.
|
override |
Method to return the objective value
Definition at line 88 of file ipopt_nlp.cpp.
References casadi::OracleMemory::arg, casadi::OracleFunction::calc_function(), casadi::NlpsolMemory::d_nlp, casadi_nlpsol_data< T1 >::p, casadi::OracleMemory::res, casadi::OracleFunction::show_eval_warnings_, and casadi::CasadiException::what().
|
override |
Method to return the constraint residuals
Definition at line 125 of file ipopt_nlp.cpp.
References casadi::OracleMemory::arg, casadi::OracleFunction::calc_function(), casadi::NlpsolMemory::d_nlp, casadi_nlpsol_data< T1 >::p, casadi::OracleMemory::res, casadi::OracleFunction::show_eval_warnings_, and casadi::CasadiException::what().
|
override |
Method to return the gradient of the objective
Definition at line 106 of file ipopt_nlp.cpp.
References casadi::OracleMemory::arg, casadi::OracleFunction::calc_function(), casadi::NlpsolMemory::d_nlp, casadi_nlpsol_data< T1 >::p, casadi::OracleMemory::res, casadi::OracleFunction::show_eval_warnings_, and casadi::CasadiException::what().
|
override |
Method to return: 1) The structure of the hessian of the Lagrangian (if "values" is NULL) 2) The values of the hessian of the Lagrangian (if "values" is not NULL)
Definition at line 182 of file ipopt_nlp.cpp.
References casadi::OracleMemory::arg, casadi::OracleFunction::calc_function(), casadi::Sparsity::colind(), casadi::ConvexifyData::config, casadi::IpoptInterface::convexify_, casadi::IpoptInterface::convexify_data_, casadi::NlpsolMemory::d_nlp, casadi::ProtoFunctionMemory::fstats, casadi::IpoptInterface::hesslag_sp_, casadi::OracleMemory::iw, casadi_nlpsol_data< T1 >::p, casadi::OracleMemory::res, casadi::Sparsity::row(), casadi::OracleFunction::show_eval_warnings_, casadi::Sparsity::size2(), casadi::OracleMemory::w, and casadi::CasadiException::what().
|
override |
Method to return: 1) The structure of the Jacobian (if "values" is NULL) 2) The values of the Jacobian (if "values" is not NULL)
Definition at line 143 of file ipopt_nlp.cpp.
References casadi::OracleMemory::arg, casadi::OracleFunction::calc_function(), casadi::Sparsity::colind(), casadi::NlpsolMemory::d_nlp, casadi::IpoptInterface::jacg_sp_, casadi_nlpsol_data< T1 >::p, casadi::OracleMemory::res, casadi::Sparsity::row(), casadi::OracleFunction::show_eval_warnings_, casadi::Sparsity::size2(), and casadi::CasadiException::what().
|
override |
Retrieve information about variables and constraints
Definition at line 342 of file ipopt_nlp.cpp.
References casadi::IpoptMemory::con_integer_md, casadi::IpoptMemory::con_numeric_md, casadi::IpoptMemory::con_string_md, casadi::Nlpsol::ng_, casadi::Nlpsol::nx_, casadi::IpoptMemory::var_integer_md, casadi::IpoptMemory::var_numeric_md, and casadi::IpoptMemory::var_string_md.
|
override |
This method is called when the algorithm is complete so the TNLP can store/write the solution
Definition at line 229 of file ipopt_nlp.cpp.
References casadi::IpoptInterface::finalize_solution(), and casadi::IpoptMemory::iter_count.
|
override |
Method to return the bounds for my problem
Definition at line 70 of file ipopt_nlp.cpp.
References casadi::IpoptInterface::get_bounds_info(), casadi::Nlpsol::ng_, and casadi::Nlpsol::nx_.
|
override |
Specify which variables that appear in the Hessian
Definition at line 326 of file ipopt_nlp.cpp.
References casadi::IpoptInterface::get_list_of_nonlinear_variables().
|
override |
Method to return some info about the nlp
Definition at line 59 of file ipopt_nlp.cpp.
References casadi::IpoptInterface::get_nlp_info().
|
override |
Specify the number of variables that appear in the Hessian
Definition at line 322 of file ipopt_nlp.cpp.
References casadi::IpoptInterface::get_number_of_nonlinear_variables().
|
override |
Method to return the starting point for the algorithm
Definition at line 78 of file ipopt_nlp.cpp.
References casadi::IpoptInterface::get_starting_point(), casadi::Nlpsol::ng_, and casadi::Nlpsol::nx_.
|
override |
Allows setting information about variables and constraints
Definition at line 331 of file ipopt_nlp.cpp.
References casadi::IpoptInterface::get_var_con_metadata().
|
override |
This method is called at every iteration
Code copied from TNLPAdapter::FinalizeSolution See also: http://list.coin-or.org/pipermail/ipopt/2010-July/002078.html
Definition at line 240 of file ipopt_nlp.cpp.
References casadi::Nlpsol::callback_step_, and casadi::IpoptInterface::intermediate_callback().