|
CppAD: A C++ Algorithmic Differentiation Package
20130102
|
Class connects Ipopt to CppAD for derivative and sparsity pattern calculations. More...
Public Member Functions | |
| cppad_ipopt_nlp (size_t n, size_t m, const NumberVector &x_i, const NumberVector &x_l, const NumberVector &x_u, const NumberVector &g_l, const NumberVector &g_u, cppad_ipopt_fg_info *fg_info, cppad_ipopt_solution *solution) | |
| only constructor for cppad_ipopot_nlp | |
| virtual | ~cppad_ipopt_nlp () |
| The destructor takes no special action. | |
| virtual bool | get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style) |
| Return dimension information about optimization problem. | |
| virtual bool | get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) |
| Return bound information about optimization problem. | |
| virtual 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) |
| Return initial x value where optimiation is started. | |
| virtual bool | eval_f (Index n, const Number *x, bool new_x, Number &obj_value) |
| Evaluate the objective fucntion f(x). | |
| virtual bool | eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f) |
| Evaluate the gradient of f(x). | |
| virtual bool | eval_g (Index n, const Number *x, bool new_x, Index m, Number *g) |
| Evaluate the function g(x). | |
| virtual bool | eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) |
| Evaluate the Jacobian of g(x). | |
| virtual 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) |
| Evaluate the Hessian of the Lagragian. | |
| virtual void | finalize_solution (Ipopt::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 Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq) |
| Pass solution information from Ipopt to users solution structure. | |
| virtual bool | intermediate_callback (Ipopt::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 Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq) |
Private Types | |
| typedef Ipopt::Number | Number |
| A Scalar value used by Ipopt. | |
| typedef Ipopt::Index | Index |
| An index value used by Ipopt. | |
| typedef Ipopt::TNLP::IndexStyleEnum | IndexStyleEnum |
| Indexing style used in Ipopt sparsity structure. | |
| typedef CppAD::vectorBool | BoolVector |
| A simple vector of boolean values. | |
| typedef CppAD::vector < CppAD::ADFun< Number > > | ADFunVector |
| A simple vector of AD function objects. | |
| typedef CppAD::vector< BoolVector > | BoolVectorVector |
| A simple vector of simple vectors of boolean values. | |
| typedef CppAD::vector < std::map< size_t, size_t > > | IndexMap |
| A mapping that is dense in i, sparse in j, and maps (i, j) to the corresponding sparsity index in Ipopt. | |
Private Member Functions | |
| cppad_ipopt_nlp (const cppad_ipopt_nlp &) | |
| block the default constructor from use | |
| cppad_ipopt_nlp & | operator= (const cppad_ipopt_nlp &) |
| blocks the assignment operator from use | |
Private Attributes | |
| const size_t | n_ |
| dimension of the domain space for f(x) and g(x) (passed to ctor) | |
| const size_t | m_ |
| dimension of the range space for g(x) (passed to ctor) | |
| const NumberVector | x_i_ |
| dimension of the range space for g(x) (passed to ctor) | |
| const NumberVector | x_l_ |
| lower limit for x (size n_), (passed to ctor) | |
| const NumberVector | x_u_ |
| upper limit for x (size n_) (passed to ctor) | |
| const NumberVector | g_l_ |
| lower limit for g(x) (size m_) (passed to ctor) | |
| const NumberVector | g_u_ |
| upper limit for g(x) (size m_) (passed to ctor) | |
| cppad_ipopt_fg_info *const | fg_info_ |
| pointer to base class version of derived class object used to get information about the user's representation for f(x) and g(x) (passed to ctor) | |
| cppad_ipopt_solution *const | solution_ |
| pointer to object where final results are stored (passed to ctor) | |
| const Number | infinity_ |
| plus infinity as a value of type Number | |
| size_t | K_ |
The value of in the representation. (effectively const) | |
| BoolVector | retape_ |
Does operation sequence for depend on . (size K_) (effectively const) | |
| SizeVector | q_ |
q_[k] is the domain space dimension for (size K_) (effectively const) | |
| SizeVector | p_ |
p_[k] is the range space dimension for (size K_) (effectively const) | |
| SizeVector | L_ |
L_[k] is number of times appears in the representation summation (size K_) (effectively const) | |
| BoolVectorVector | pattern_jac_r_ |
CppAD sparsity patterns for (set by ctor). | |
| BoolVectorVector | pattern_hes_r_ |
CppAD sparsity patterns for (set by ctor). | |
| size_t | nnz_jac_g_ |
| number non-zero is Ipopt sparsity structor for Jacobian of g(x) (effectively const) | |
| SizeVector | iRow_jac_g_ |
| row indices in Ipopt sparsity structor for Jacobian of g(x) (effectively const) | |
| SizeVector | jCol_jac_g_ |
| column indices in Ipopt sparsity structor for Jacobian of g(x) (effectively const) | |
| size_t | nnz_h_lag_ |
| number non-zero is Ipopt sparsity structor for Hessian of Lagragian (effectively const) | |
| SizeVector | iRow_h_lag_ |
| row indices in Ipopt sparsity structor for Hessian of Lagragian (effectively const) | |
| SizeVector | jCol_h_lag_ |
| column indices in Ipopt sparsity structor for Hessian of Lagragian (effectively const) | |
| IndexMap | index_jac_g_ |
| Mapping from (i, j) in Jacobian of g(x) to Ipopt sparsity structure. | |
| IndexMap | index_hes_fg_ |
| Mapping from (i, j) in Hessian of fg(x) to Ipopt sparsity structure. | |
| ADFunVector | r_fun_ |
For k = 0 , ... , K_-1, r_fun_[k] is a the CppAD function object corresponding to . | |
| BoolVector | tape_ok_ |
| Is r_fun[k] OK for current x. | |
| SizeVector | J_ |
work space of size equal maximum of q[k] w.r.t k. | |
| SizeVector | I_ |
work space of size equal maximum of p[k] w.r.t k. | |
Class connects Ipopt to CppAD for derivative and sparsity pattern calculations.
Definition at line 775 of file cppad_ipopt_nlp.hpp.