Go to the documentation of this file.
17 #ifndef __IpoptRNLP_HPP__
18 #define __IpoptRNLP_HPP__
26 #include <R_ext/Utils.h>
void set_R_eval_jac_g(SEXP g)
Class to organize all the data required by the algorithm.
virtual bool eval_g(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Number *g)
Method to return the constraint residuals.
void set_R_eval_h(SEXP h)
void set_hessian_approximation(bool b)
virtual void finalize_solution(Ipopt::SolverReturn status, Ipopt::Index n, const Ipopt::Number *x, const Ipopt::Number *z_L, const Ipopt::Number *z_U, Ipopt::Index m, const Ipopt::Number *g, const Ipopt::Number *lambda, Ipopt::Number obj_value, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq)
This method is called when the algorithm is complete so the TNLP can store/write the solution.
IpoptRNLP(const IpoptRNLP &)
void set_R_lower_bounds(SEXP lb)
void set_R_eval_f(SEXP f)
Class for all IPOPT specific calculated quantities.
void set_R_eval_jac_g_structure(SEXP s)
void set_R_environment(SEXP env)
virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt::Number *x_u, Ipopt::Index m, Ipopt::Number *g_l, Ipopt::Number *g_u)
Method to return the bounds for my problem.
virtual ~IpoptRNLP()
default destructor
double Number
Type of all numbers.
virtual bool get_nlp_info(Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, IndexStyleEnum &Index_style)
Method to return some info about the nlp.
void set_R_eval_g(SEXP g)
void set_R_constraint_upper_bounds(SEXP ub)
bool d_hessian_approximation
Number * x
Input: Starting point Output: Optimal solution.
virtual bool eval_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value)
Method to return the objective value.
Number Number Index Number Number Index Index nele_hess
Number of non-zero elements in Hessian of Lagrangian.
Number Number Index Number Number Index nele_jac
Number of non-zero elements in constraint Jacobian.
int Index
Type of all indices of vectors, matrices etc.
SEXP R_eval_jac_g_structure
void set_R_constraint_lower_bounds(SEXP lb)
SEXP R_constraint_lower_bounds
void set_R_init_values(SEXP x0)
int d_num_protected_members
SEXP R_constraint_upper_bounds
IpoptRNLP()
default constructor
virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
Method to return: 1) The structure of the jacobian (if "values" is NULL) 2) The values of the jacobia...
virtual bool eval_h(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number *lambda, bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
Method to return: 1) The structure of the hessian of the lagrangian (if "values" is NULL) 2) The valu...
Base class for all NLP's that use standard triplet matrix form and dense vectors.
void set_R_eval_h_structure(SEXP s)
void set_R_upper_bounds(SEXP ub)
Number Number * g
Values of constraint at final point (output only - ignored if set to NULL)
IndexStyleEnum
overload this method to return the number of variables and constraints, and the number of non-zeros i...
void set_R_eval_grad_f(SEXP f)
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number *grad_f)
Method to return the gradient of the objective.
IpoptRNLP & operator=(const IpoptRNLP &)
virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number *x, bool init_z, Ipopt::Number *z_L, Ipopt::Number *z_U, Ipopt::Index m, bool init_lambda, Ipopt::Number *lambda)
Method to return the starting point for the algorithm.
Number Number Index m
Number of constraints.