21 #include "OSInstance.h"
22 #include "OSParameters.h"
26 #include "OSInstance.h"
34 #include "OSInstance.h"
49 #include "IpIpoptApplication.hpp"
72 virtual bool get_nlp_info(Ipopt::Index&
n, Ipopt::Index&
m, Ipopt::Index& nnz_jac_g,
73 Ipopt::Index& nnz_h_lag, IndexStyleEnum& index_style);
76 virtual bool get_bounds_info(Ipopt::Index
n, Ipopt::Number* x_l, Ipopt::Number* x_u,
77 Ipopt::Index
m, Ipopt::Number* g_l, Ipopt::Number* g_u);
81 bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
82 Ipopt::Index
m,
bool init_lambda,
83 Ipopt::Number* lambda);
86 virtual bool eval_f(Ipopt::Index
n,
const Ipopt::Number*
x,
bool new_x, Ipopt::Number& obj_value);
89 virtual bool eval_grad_f(Ipopt::Index
n,
const Ipopt::Number*
x,
bool new_x, Ipopt::Number* grad_f);
92 virtual bool eval_g(Ipopt::Index
n,
const Ipopt::Number*
x,
bool new_x, Ipopt::Index
m, Ipopt::Number*
g);
98 virtual bool eval_jac_g(Ipopt::Index
n,
const Ipopt::Number*
x,
bool new_x,
99 Ipopt::Index
m, Ipopt::Index nele_jac, Ipopt::Index* iRow, Ipopt::Index *jCol,
106 virtual bool eval_h(Ipopt::Index
n,
const Ipopt::Number*
x,
bool new_x,
107 Ipopt::Number obj_factor, Ipopt::Index
m,
const Ipopt::Number* lambda,
108 bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index* iRow,
109 Ipopt::Index* jCol, Ipopt::Number*
values);
115 bool& use_x_scaling, Ipopt::Index
n,
116 Ipopt::Number* x_scaling,
117 bool& use_g_scaling, Ipopt::Index
m,
118 Ipopt::Number* g_scaling);
124 Ipopt::Index
n,
const Ipopt::Number*
x,
const Ipopt::Number* z_L,
const Ipopt::Number* z_U,
125 Ipopt::Index
m,
const Ipopt::Number*
g,
const Ipopt::Number* lambda,
126 Ipopt::Number obj_value,
127 const Ipopt::IpoptData* ip_data,
128 Ipopt::IpoptCalculatedQuantities* ip_cq);
185 #if __cplusplus < 201100
196 #if __cplusplus < 201100
206 #if __cplusplus < 201100
Ipopt::SmartPtr< Ipopt::TNLP > nlp
This file defines the OSnLNode class along with its derived classes.
OSiLReader * m_osilreader
m_osilreader is an OSiLReader object used to create an osinstance from an osil string if needed ...
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.
~IpoptSolver()
the IpoptSolver class destructor
std::string * ipoptErrorMsg
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.
Take an OSResult object and write a string that validates against OSrL.
virtual void solve()
solve results in an instance being read into the Ipopt data structures and optimize ...
The IpoptSolver class solves problems using Ipopt.
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.
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.
IpoptProblem & operator=(const IpoptProblem &)
Used to read an OSiL string.
IpoptSolver()
the IpoptSolver class constructor
OSoLReader * m_osolreader
m_osolreader is an OSoLReader object used to create an osoption from an osol string if needed ...
virtual void setSolverOptions()
The implementation of the virtual functions.
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...
The Default Solver Class.
void dataEchoCheck()
use this for debugging, print out the instance that the solver thinks it has and compare this with th...
virtual bool get_scaling_parameters(Ipopt::Number &obj_scaling, bool &use_x_scaling, Ipopt::Index n, Ipopt::Number *x_scaling, bool &use_g_scaling, Ipopt::Index m, Ipopt::Number *g_scaling)
Used to read an OSoL string.
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...
Ipopt::SmartPtr< Ipopt::IpoptApplication > app
void fint fint fint real fint real real real real real real * g
IpoptProblem(OSInstance *osinstance_, OSOption *osoption_, OSResult *osresult_, std::string *ipoptErrorMsg_)
the IpoptProblemclass constructor
The in-memory representation of an OSiL instance..
virtual bool get_nlp_info(Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, IndexStyleEnum &index_style)
IPOpt specific methods for defining the nlp problem.
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...
virtual ~IpoptProblem()
the IpoptProblem class destructor
used for throwing exceptions.
virtual bool eval_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value)
Method to return the objective value.
std::string * ipoptErrorMsg
virtual void buildSolverInstance()
The implementation of the virtual functions.
void fint fint fint real fint real * x