17 #ifndef __IpoptRNLP_HPP__
18 #define __IpoptRNLP_HPP__
26 #include <R_ext/Utils.h>
Number * x
Input: Starting point Output: Optimal solution.
void set_R_lower_bounds(SEXP lb)
Class for all IPOPT specific calculated quantities.
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.
Number Number Index m
Number of constraints.
void set_R_eval_jac_g(SEXP g)
Number Number * g
Values of constraint at final point (output only - ignored if set to NULL)
int d_num_protected_members
double Number
Type of all numbers.
void set_R_eval_f(SEXP f)
bool d_hessian_approximation
void set_R_eval_jac_g_structure(SEXP s)
void set_R_upper_bounds(SEXP ub)
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.
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.
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...
void set_R_eval_grad_f(SEXP f)
SEXP R_constraint_lower_bounds
IpoptRNLP & operator=(const IpoptRNLP &)
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
Number Number Index Number Number Index nele_jac
Number of non-zero elements in constraint Jacobian.
virtual bool eval_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value)
Method to return the objective value.
void set_R_environment(SEXP env)
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)
void set_R_eval_h_structure(SEXP s)
int Index
Type of all indices of vectors, matrices etc.
IpoptRNLP()
default constructor
Number Number Index Number Number Index Index nele_hess
Number of non-zero elements in Hessian of Lagrangian.
SEXP R_constraint_upper_bounds
void set_R_constraint_lower_bounds(SEXP lb)
void set_R_eval_g(SEXP g)
void set_R_constraint_upper_bounds(SEXP ub)
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.
IndexStyleEnum
overload this method to return the number of variables and constraints, and the number of non-zeros i...
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...
Base class for all NLP's that use standard triplet matrix form and dense vectors. ...
virtual ~IpoptRNLP()
default destructor
SEXP R_eval_jac_g_structure
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...
void set_R_init_values(SEXP x0)