MeshKit
1.0
|
#include <IABendNlp.hpp>
Classes | |
struct | SparseMatrixEntry |
Public Member Functions | |
IABendNlp (const IAData *data_ptr, const IPData *ip_data_ptr, const IPBendData *ip_bend_ptr, IASolution *solution_ptr, IAWeights *weight_ptr, const bool set_silent=true) | |
virtual | ~IABendNlp () |
void | even_constraints_active (bool set_active) |
double | f_x_value (double I_i, double x_i) |
Overloaded from TNLP | |
virtual bool | get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style) |
virtual bool | get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) |
virtual bool | get_starting_point (Index n, bool init_x, Number *x_init, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda) |
virtual bool | eval_f (Index n, const Number *x, bool new_x, Number &obj_value) |
virtual bool | eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f) |
virtual bool | eval_g (Index n, const Number *x, bool new_x, Index m, Number *g) |
virtual bool | eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) |
virtual bool | eval_h (Index n, const Number *x, bool new_x, Number obj_factor, Index m, const Number *lambda, bool new_lambda, Index nele_hess, Index *iRow, Index *jCol, Number *values) |
Solution Methods | |
virtual void | finalize_solution (SolverReturn status, Index n, const Number *x, const Number *z_L, const Number *z_U, Index m, const Number *g, const Number *lambda, Number obj_value, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) |
Private Types | |
typedef std::map< int, SparseMatrixEntry > | SparseMatrixMap |
Private Member Functions | |
void | add_hessian_entry (int i, int j, int &k) |
void | build_hessian () |
int | get_hessian_k (int i, int j) |
void | print_hessian () |
const double | nearest_int (const double x) |
const double | nearest_even (const double s) |
const double | delta_x (const double x) |
const double | delta_s (const double s) |
double | eval_g_int_x (const double x) |
double | eval_g_int_s (const double s) |
double | eval_jac_int_x (const double x) |
double | eval_jac_int_s (const double s) |
double | eval_hess_int_x (const double x) |
virtual double | eval_hess_int_s (const double s) |
IABendNlp () | |
IABendNlp (const IABendNlp &) | |
IABendNlp & | operator= (const IABendNlp &) |
Private Attributes | |
const IAData * | data |
const IPData * | ipData |
const IPBendData * | ipBendData |
IASolution * | solution |
IANlp | baseNlp |
const int | base_n |
const int | base_m |
const int | problem_n |
int | problem_m |
int | wave_even_constraint_start |
IAWeights * | weights |
const bool | silent |
const bool | debugging |
const bool | verbose |
bool | evenConstraintsActive |
SparseMatrixMap | hessian_map |
std::vector< SparseMatrixEntry > | hessian_vector |
Definition at line 26 of file IABendNlp.hpp.
typedef std::map<int, SparseMatrixEntry> SparseMatrixMap [private] |
Definition at line 156 of file IABendNlp.hpp.
IABendNlp | ( | const IAData * | data_ptr, |
const IPData * | ip_data_ptr, | ||
const IPBendData * | ip_bend_ptr, | ||
IASolution * | solution_ptr, | ||
IAWeights * | weight_ptr, | ||
const bool | set_silent = true |
||
) |
default constructor
Definition at line 59 of file IABendNlp.cpp.
~IABendNlp | ( | ) | [virtual] |
default destructor
Definition at line 86 of file IABendNlp.cpp.
IABendNlp | ( | ) | [private] |
void add_hessian_entry | ( | int | i, |
int | j, | ||
int & | k | ||
) | [private] |
Definition at line 629 of file IABendNlp.cpp.
void build_hessian | ( | ) | [private] |
Definition at line 645 of file IABendNlp.cpp.
const double delta_s | ( | const double | s | ) | [inline, private] |
Definition at line 181 of file IABendNlp.hpp.
const double delta_x | ( | const double | x | ) | [inline, private] |
Definition at line 177 of file IABendNlp.hpp.
bool eval_f | ( | Index | n, |
const Number * | x, | ||
bool | new_x, | ||
Number & | obj_value | ||
) | [virtual] |
Method to return the objective value
Definition at line 340 of file IABendNlp.cpp.
bool eval_g | ( | Index | n, |
const Number * | x, | ||
bool | new_x, | ||
Index | m, | ||
Number * | g | ||
) | [virtual] |
Method to return the constraint residuals
Definition at line 384 of file IABendNlp.cpp.
double eval_g_int_s | ( | const double | s | ) | [inline, private] |
Definition at line 191 of file IABendNlp.hpp.
double eval_g_int_x | ( | const double | x | ) | [inline, private] |
Definition at line 186 of file IABendNlp.hpp.
bool eval_grad_f | ( | Index | n, |
const Number * | x, | ||
bool | new_x, | ||
Number * | grad_f | ||
) | [virtual] |
Method to return the gradient of the objective
Definition at line 359 of file IABendNlp.cpp.
bool eval_h | ( | Index | n, |
const Number * | x, | ||
bool | new_x, | ||
Number | obj_factor, | ||
Index | m, | ||
const Number * | lambda, | ||
bool | new_lambda, | ||
Index | nele_hess, | ||
Index * | iRow, | ||
Index * | jCol, | ||
Number * | values | ||
) | [virtual] |
Method to return: 1) The structure of the hessian of the lagrangian (if "values" is NULL) 2) The values of the hessian of the lagrangian (if "values" is not NULL)
Definition at line 744 of file IABendNlp.cpp.
virtual double eval_hess_int_s | ( | const double | s | ) | [inline, private, virtual] |
Definition at line 210 of file IABendNlp.hpp.
double eval_hess_int_x | ( | const double | x | ) | [inline, private] |
Definition at line 206 of file IABendNlp.hpp.
bool eval_jac_g | ( | Index | n, |
const Number * | x, | ||
bool | new_x, | ||
Index | m, | ||
Index | nele_jac, | ||
Index * | iRow, | ||
Index * | jCol, | ||
Number * | values | ||
) | [virtual] |
Method to return: 1) The structure of the jacobian (if "values" is NULL) 2) The values of the jacobian (if "values" is not NULL)
Definition at line 441 of file IABendNlp.cpp.
double eval_jac_int_s | ( | const double | s | ) | [inline, private] |
Definition at line 201 of file IABendNlp.hpp.
double eval_jac_int_x | ( | const double | x | ) | [inline, private] |
Definition at line 196 of file IABendNlp.hpp.
void even_constraints_active | ( | bool | set_active | ) | [inline] |
Definition at line 96 of file IABendNlp.hpp.
double f_x_value | ( | double | I_i, |
double | x_i | ||
) |
Definition at line 42 of file IABendNlp.cpp.
void finalize_solution | ( | SolverReturn | status, |
Index | n, | ||
const Number * | x, | ||
const Number * | z_L, | ||
const Number * | z_U, | ||
Index | m, | ||
const Number * | g, | ||
const Number * | lambda, | ||
Number | obj_value, | ||
const IpoptData * | ip_data, | ||
IpoptCalculatedQuantities * | ip_cq | ||
) | [virtual] |
This method is called when the algorithm is complete so the TNLP can store/write the solution
Definition at line 837 of file IABendNlp.cpp.
bool get_bounds_info | ( | Index | n, |
Number * | x_l, | ||
Number * | x_u, | ||
Index | m, | ||
Number * | g_l, | ||
Number * | g_u | ||
) | [virtual] |
Method to return the bounds for my problem
Definition at line 159 of file IABendNlp.cpp.
int get_hessian_k | ( | int | i, |
int | j | ||
) | [private] |
Definition at line 694 of file IABendNlp.cpp.
bool get_nlp_info | ( | Index & | n, |
Index & | m, | ||
Index & | nnz_jac_g, | ||
Index & | nnz_h_lag, | ||
IndexStyleEnum & | index_style | ||
) | [virtual] |
Method to return some info about the nlp
Definition at line 89 of file IABendNlp.cpp.
bool get_starting_point | ( | Index | n, |
bool | init_x, | ||
Number * | x_init, | ||
bool | init_z, | ||
Number * | z_L, | ||
Number * | z_U, | ||
Index | m, | ||
bool | init_lambda, | ||
Number * | lambda | ||
) | [virtual] |
Method to return the starting point for the algorithm
Definition at line 253 of file IABendNlp.cpp.
const double nearest_even | ( | const double | s | ) | [inline, private] |
Definition at line 173 of file IABendNlp.hpp.
const double nearest_int | ( | const double | x | ) | [inline, private] |
Definition at line 167 of file IABendNlp.hpp.
void print_hessian | ( | ) | [private] |
Definition at line 703 of file IABendNlp.cpp.
const int base_m [private] |
Definition at line 123 of file IABendNlp.hpp.
const int base_n [private] |
Definition at line 123 of file IABendNlp.hpp.
Definition at line 121 of file IABendNlp.hpp.
Definition at line 112 of file IABendNlp.hpp.
const bool debugging [private] |
Definition at line 133 of file IABendNlp.hpp.
bool evenConstraintsActive [private] |
Definition at line 136 of file IABendNlp.hpp.
SparseMatrixMap hessian_map [private] |
Definition at line 158 of file IABendNlp.hpp.
std::vector< SparseMatrixEntry > hessian_vector [private] |
Definition at line 159 of file IABendNlp.hpp.
const IPBendData* ipBendData [private] |
Definition at line 114 of file IABendNlp.hpp.
Definition at line 113 of file IABendNlp.hpp.
int problem_m [private] |
Definition at line 125 of file IABendNlp.hpp.
const int problem_n [private] |
Definition at line 124 of file IABendNlp.hpp.
const bool silent [private] |
Definition at line 132 of file IABendNlp.hpp.
IASolution* solution [private] |
Definition at line 117 of file IABendNlp.hpp.
const bool verbose [private] |
Definition at line 134 of file IABendNlp.hpp.
int wave_even_constraint_start [private] |
Definition at line 126 of file IABendNlp.hpp.
Definition at line 129 of file IABendNlp.hpp.