#include <bonmin_nlp.hpp>
Definition at line 46 of file bonmin_nlp.hpp.
Public Member Functions | |
BonminUserClass (const BonminInterface &bonminInterface, BonminMemory *mem) | |
~BonminUserClass () override | |
bool | get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, TNLP::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 (TMINLP::SolverReturn status, Index n, const Number *x, Number obj_value) override |
virtual Index | get_number_of_nonlinear_variables () |
virtual bool | get_list_of_nonlinear_variables (Index num_nonlin_vars, Index *pos_nonlin_vars) |
virtual 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) |
bool | get_variables_types (Index n, VariableType *var_types) override |
bool | get_variables_linearity (Index n, Ipopt::TNLP::LinearityType *var_types) override |
bool | get_constraints_linearity (Index m, Ipopt::TNLP::LinearityType *const_types) override |
const SosInfo * | sosConstraints () const override |
const BranchingInfo * | branchingInfo () const override |
casadi::BonminUserClass::BonminUserClass | ( | const BonminInterface & | bonminInterface, |
BonminMemory * | mem | ||
) |
Definition at line 32 of file bonmin_nlp.cpp.
References casadi::Nlpsol::ng_, and casadi::Nlpsol::nx_.
|
override |
Definition at line 38 of file bonmin_nlp.cpp.
|
inlineoverride |
Definition at line 119 of file bonmin_nlp.hpp.
|
override |
Method to return the objective value
Definition at line 71 of file bonmin_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 108 of file bonmin_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 89 of file bonmin_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 165 of file bonmin_nlp.cpp.
References casadi::OracleMemory::arg, casadi::OracleFunction::calc_function(), casadi::Sparsity::colind(), casadi::NlpsolMemory::d_nlp, casadi::BonminInterface::hesslag_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 |
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 126 of file bonmin_nlp.cpp.
References casadi::OracleMemory::arg, casadi::OracleFunction::calc_function(), casadi::Sparsity::colind(), casadi::NlpsolMemory::d_nlp, casadi::BonminInterface::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 |
This method is called when the algorithm is complete so the TNLP can store/write the solution
Definition at line 204 of file bonmin_nlp.cpp.
References casadi::BonminInterface::finalize_solution().
|
override |
Method to return the bounds for my problem
Definition at line 53 of file bonmin_nlp.cpp.
References casadi::BonminInterface::get_bounds_info(), casadi::Nlpsol::ng_, and casadi::Nlpsol::nx_.
|
override |
|
virtual |
Specify which variables that appear in the Hessian
Definition at line 237 of file bonmin_nlp.cpp.
References casadi::BonminInterface::get_list_of_nonlinear_variables().
|
override |
Method to return some info about the nlp
Definition at line 42 of file bonmin_nlp.cpp.
References casadi::BonminInterface::get_nlp_info().
|
virtual |
Specify the number of variables that appear in the Hessian
Definition at line 233 of file bonmin_nlp.cpp.
References casadi::BonminInterface::get_number_of_nonlinear_variables().
|
override |
Method to return the starting point for the algorithm
Definition at line 61 of file bonmin_nlp.cpp.
References casadi::BonminInterface::get_starting_point(), casadi::Nlpsol::ng_, and casadi::Nlpsol::nx_.
|
override |
|
override |
Definition at line 242 of file bonmin_nlp.cpp.
References casadi::CONTINUOUS, casadi::Nlpsol::discrete_, and casadi::INTEGER.
|
virtual |
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 210 of file bonmin_nlp.cpp.
References casadi::Nlpsol::callback_step_, and casadi::BonminInterface::intermediate_callback().
|
override |
Definition at line 268 of file bonmin_nlp.cpp.
References casadi::BonminInterface::sosConstraints().