12 #include <Eigen/Dense> 21 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
28 virtual void getNlpParameters(
int& n_vars,
int& n_cons) = 0;
31 virtual void getNlpBounds(
int n_vars,
int n_cons,
double* x_l,
double* x_u,
double* g_l,
double* g_u) = 0;
34 virtual void getStartingPoint(
int n_vars,
double* x) = 0;
37 virtual double evaluateObjective(
int n_vars,
const double* x) = 0;
40 virtual void evaluateConstraintsVector(
int n_vars,
int n_cons,
const double* x,
double* constraints) = 0;
43 virtual void processSolution(
int n_vars,
double objective_value,
const double* x)
45 Eigen::Map<const Eigen::VectorXd> eig_x_const(&x[0], n_vars);
46 this->optimalVector() = eig_x_const;
47 this->optimalValue() = objective_value;
50 double& optimalValue() {
return eig_obj_; }
51 const double& optimalValue()
const {
return eig_obj_; }
52 Eigen::VectorXd& optimalVector() {
return eig_opt_x_; }
53 const Eigen::VectorXd& optimalVector()
const {
return eig_opt_x_; }
57 Eigen::VectorXd eig_opt_x_;
Definition: NlpDescription.hpp:18