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