#include <SmagMINLP.hpp>
Public Member Functions | |
SMAG_MINLP (smagHandle_t prob) | |
Contructor. | |
virtual | ~SMAG_MINLP () |
Default destructor. | |
virtual bool | get_nlp_info (Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, TNLP::IndexStyleEnum &index_style) |
Method to return some info about the nlp. | |
virtual bool | get_bounds_info (Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) |
Method to return the bounds for my problem. | |
virtual bool | get_variables_types (Index n, VariableType *var_types) |
Pass the type of the variables (INTEGER, BINARY, CONTINUOUS) to the optimizer. | |
virtual bool | get_variables_linearity (Index n, Ipopt::TNLP::LinearityType *var_linearity) |
Pass the type of the variables linearity (LINEAR, NON_LINEAR) to the optimizer. | |
virtual bool | get_constraints_linearity (Index m, Ipopt::TNLP::LinearityType *const_types) |
Pass the type of the constraints (LINEAR, NON_LINEAR) to the optimizer. | |
virtual bool | get_starting_point (Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda) |
Method to return the starting point for the algorithm. | |
virtual bool | get_scaling_parameters (Number &obj_scaling, bool &use_x_scaling, Index n, Number *x_scaling, bool &use_g_scaling, Index m, Number *g_scaling) |
virtual bool | eval_f (Index n, const Number *x, bool new_x, Number &obj_value) |
Method to return the objective value. | |
virtual bool | eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f) |
Method to return the gradient of the objective. | |
virtual bool | eval_g (Index n, const Number *x, bool new_x, Index m, Number *g) |
Method to return the constraint residuals. | |
virtual bool | eval_jac_g (Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) |
Method to return: 1) The structure of the jacobian (if "values" is NULL) 2) The values of the jacobian (if "values" is not NULL). | |
virtual bool | eval_gi (Index n, const Number *x, bool new_x, Index i, Number &gi) |
Compute the value of a single constraint. | |
virtual bool | eval_grad_gi (Index n, const Number *x, bool new_x, Index i, Index &nele_grad_gi, Index *jCol, Number *values) |
Compute the structure or values of the gradient for one constraint. | |
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) |
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). | |
virtual void | finalize_solution (TMINLP::SolverReturn status, Index n, const Number *x, Number obj_value) |
virtual const SosInfo * | sosConstraints () const |
Provides information about SOS constraints. | |
virtual const BranchingInfo * | branchingInfo () const |
Provides information about branching priorities. | |
Public Attributes | |
double | div_iter_tol |
long int | domviolations |
double | clock_start |
int | model_status |
int | solver_status |
Private Member Functions | |
SMAG_MINLP () | |
SMAG_MINLP (const SMAG_MINLP &) | |
SMAG_MINLP & | operator= (const SMAG_MINLP &) |
void | setupPrioritiesSOS () |
Internal routine to initialize sosinfo and branchinginfo. | |
Private Attributes | |
smagHandle_t | prob |
double * | negLambda |
double | isMin |
SosInfo | sosinfo |
BranchingInfo | branchinginfo |
Definition at line 31 of file SmagMINLP.hpp.
SMAG_MINLP::SMAG_MINLP | ( | smagHandle_t | prob | ) |
Contructor.
prob | The SMAG handle for the problem. |
virtual SMAG_MINLP::~SMAG_MINLP | ( | ) | [virtual] |
Default destructor.
SMAG_MINLP::SMAG_MINLP | ( | ) | [private] |
SMAG_MINLP::SMAG_MINLP | ( | const SMAG_MINLP & | ) | [private] |
virtual bool SMAG_MINLP::get_nlp_info | ( | Index & | n, | |
Index & | m, | |||
Index & | nnz_jac_g, | |||
Index & | nnz_h_lag, | |||
TNLP::IndexStyleEnum & | index_style | |||
) | [virtual] |
Method to return some info about the nlp.
virtual bool SMAG_MINLP::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.
virtual bool SMAG_MINLP::get_variables_types | ( | Index | n, | |
VariableType * | var_types | |||
) | [virtual] |
Pass the type of the variables (INTEGER, BINARY, CONTINUOUS) to the optimizer.
n | size of var_types (has to be equal to the number of variables in the problem). | |
var_types | types of the variables (has to be filled by function). |
virtual bool SMAG_MINLP::get_variables_linearity | ( | Index | n, | |
Ipopt::TNLP::LinearityType * | var_linearity | |||
) | [virtual] |
Pass the type of the variables linearity (LINEAR, NON_LINEAR) to the optimizer.
n | size of var_linearity (has to be equal to the number of variables in the problem). | |
var_linearity | linearity of the variables (has to be filled by function). |
virtual bool SMAG_MINLP::get_constraints_linearity | ( | Index | m, | |
Ipopt::TNLP::LinearityType * | const_types | |||
) | [virtual] |
Pass the type of the constraints (LINEAR, NON_LINEAR) to the optimizer.
m | size of const_types (has to be equal to the number of constraints in the problem). | |
const_types | types of the constraints (has to be filled by function). |
virtual bool SMAG_MINLP::get_starting_point | ( | Index | n, | |
bool | init_x, | |||
Number * | x, | |||
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.
virtual bool SMAG_MINLP::get_scaling_parameters | ( | Number & | obj_scaling, | |
bool & | use_x_scaling, | |||
Index | n, | |||
Number * | x_scaling, | |||
bool & | use_g_scaling, | |||
Index | m, | |||
Number * | g_scaling | |||
) | [virtual] |
virtual bool SMAG_MINLP::eval_f | ( | Index | n, | |
const Number * | x, | |||
bool | new_x, | |||
Number & | obj_value | |||
) | [virtual] |
Method to return the objective value.
virtual bool SMAG_MINLP::eval_grad_f | ( | Index | n, | |
const Number * | x, | |||
bool | new_x, | |||
Number * | grad_f | |||
) | [virtual] |
Method to return the gradient of the objective.
virtual bool SMAG_MINLP::eval_g | ( | Index | n, | |
const Number * | x, | |||
bool | new_x, | |||
Index | m, | |||
Number * | g | |||
) | [virtual] |
Method to return the constraint residuals.
virtual bool SMAG_MINLP::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).
virtual bool SMAG_MINLP::eval_gi | ( | Index | n, | |
const Number * | x, | |||
bool | new_x, | |||
Index | i, | |||
Number & | gi | |||
) | [virtual] |
Compute the value of a single constraint.
n | the number of variables | |
x | the point to evaluate | |
new_x | whether x is a new point | |
i | the constraint number (starting counting from 0) | |
gi | to store the value of g_i at x |
virtual bool SMAG_MINLP::eval_grad_gi | ( | Index | n, | |
const Number * | x, | |||
bool | new_x, | |||
Index | i, | |||
Index & | nele_grad_gi, | |||
Index * | jCol, | |||
Number * | values | |||
) | [virtual] |
Compute the structure or values of the gradient for one constraint.
Things are like with eval_jac_g.
n | the number of variables | |
x | the point to compute the gradient for | |
new_x | whether x is a new point | |
i | the constraint number (starting counting from 0) | |
nele_grad_gi | the number of nonzero elements in the gradient of g_i | |
jCol | the indices of the nonzero columns | |
values | the values for the nonzero columns |
virtual bool SMAG_MINLP::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).
virtual void SMAG_MINLP::finalize_solution | ( | TMINLP::SolverReturn | status, | |
Index | n, | |||
const Number * | x, | |||
Number | obj_value | |||
) | [virtual] |
virtual const SosInfo* SMAG_MINLP::sosConstraints | ( | ) | const [virtual] |
Provides information about SOS constraints.
virtual const BranchingInfo* SMAG_MINLP::branchingInfo | ( | ) | const [virtual] |
Provides information about branching priorities.
SMAG_MINLP& SMAG_MINLP::operator= | ( | const SMAG_MINLP & | ) | [private] |
void SMAG_MINLP::setupPrioritiesSOS | ( | ) | [private] |
Internal routine to initialize sosinfo and branchinginfo.
double SMAG_MINLP::div_iter_tol |
Definition at line 136 of file SmagMINLP.hpp.
long int SMAG_MINLP::domviolations |
Definition at line 137 of file SmagMINLP.hpp.
double SMAG_MINLP::clock_start |
Definition at line 138 of file SmagMINLP.hpp.
Definition at line 139 of file SmagMINLP.hpp.
Definition at line 139 of file SmagMINLP.hpp.
smagHandle_t SMAG_MINLP::prob [private] |
Definition at line 141 of file SmagMINLP.hpp.
double* SMAG_MINLP::negLambda [private] |
Definition at line 142 of file SmagMINLP.hpp.
double SMAG_MINLP::isMin [private] |
Definition at line 143 of file SmagMINLP.hpp.
SosInfo SMAG_MINLP::sosinfo [private] |
Definition at line 146 of file SmagMINLP.hpp.
BranchingInfo SMAG_MINLP::branchinginfo [private] |
Definition at line 147 of file SmagMINLP.hpp.