25 #ifndef IPOPT_PROBLEM_H
26 #define IPOPT_PROBLEM_H
28 #include <coin/IpTNLP.hpp>
29 #include "../../population.h"
30 #include "../../types.h"
31 #include "boost/array.hpp"
36 class ipopt_problem :
public Ipopt::TNLP
43 virtual ~ipopt_problem();
48 virtual bool get_nlp_info(Ipopt::Index& n, Ipopt::Index& m, Ipopt::Index& nnz_jac_g,
49 Ipopt::Index& nnz_h_lag, IndexStyleEnum& index_style);
52 virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number* x_l, Ipopt::Number* x_u,
53 Ipopt::Index m, Ipopt::Number* g_l, Ipopt::Number* g_u);
56 virtual bool get_starting_point(Ipopt::Index n,
bool init_x, Ipopt::Number* x,
57 bool init_z, Ipopt::Number* z_L, Ipopt::Number* z_U,
58 Ipopt::Index m,
bool init_lambda,
59 Ipopt::Number* lambda);
62 virtual bool eval_f(Ipopt::Index n,
const Ipopt::Number* x,
bool new_x, Ipopt::Number& obj_value);
65 virtual bool eval_grad_f(Ipopt::Index n,
const Ipopt::Number* x,
bool new_x, Ipopt::Number* grad_f);
68 virtual bool eval_g(Ipopt::Index n,
const Ipopt::Number* x,
bool new_x, Ipopt::Index m, Ipopt::Number* g);
74 virtual bool eval_jac_g(Ipopt::Index n,
const Ipopt::Number* x,
bool new_x,
75 Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index* iRow, Ipopt::Index *jCol,
76 Ipopt::Number* values);
83 virtual void finalize_solution(Ipopt::SolverReturn status,
84 Ipopt::Index n,
const Ipopt::Number* x,
const Ipopt::Number* z_L,
const Ipopt::Number* z_U,
85 Ipopt::Index m,
const Ipopt::Number* g,
const Ipopt::Number* lambda,
86 Ipopt::Number obj_value,
87 const Ipopt::IpoptData* ip_data,
88 Ipopt::IpoptCalculatedQuantities* ip_cq);
96 ipopt_problem(
const ipopt_problem&);
97 ipopt_problem& operator=(
const ipopt_problem&);
102 ::Ipopt::Index len_jac;
104 std::vector< ::Ipopt::Index> iJfun,jJvar;
106 std::vector< ::Ipopt::Index> affects_obj;
108 static bool cache_efficiency_criterion(boost::array<int,2>,boost::array<int,2>);
std::vector< double > decision_vector
Decision vector type.
std::vector< double > fitness_vector
Fitness vector type.
std::vector< double > constraint_vector
Constraint vector type.