GAMSlinks  0.4
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
SMAG_MINLP Class Reference

A TNLP for Ipopt that uses SMAG to interface the problem formulation. More...

#include <SmagMINLP.hpp>

Inheritance diagram for SMAG_MINLP:
Inheritance graph
[legend]
Collaboration diagram for SMAG_MINLP:
Collaboration graph
[legend]

Public Member Functions

 SMAG_MINLP (smagHandle_t prob)
 Contructor. More...
 
virtual ~SMAG_MINLP ()
 Default destructor. More...
 
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. More...
 
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. More...
 
virtual bool get_variables_types (Index n, VariableType *var_types)
 Pass the type of the variables (INTEGER, BINARY, CONTINUOUS) to the optimizer. More...
 
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. More...
 
virtual bool get_constraints_linearity (Index m, Ipopt::TNLP::LinearityType *const_types)
 Pass the type of the constraints (LINEAR, NON_LINEAR) to the optimizer. More...
 
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. More...
 
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. More...
 
virtual bool eval_grad_f (Index n, const Number *x, bool new_x, Number *grad_f)
 Method to return the gradient of the objective. More...
 
virtual bool eval_g (Index n, const Number *x, bool new_x, Index m, Number *g)
 Method to return the constraint residuals. More...
 
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) More...
 
virtual bool eval_gi (Index n, const Number *x, bool new_x, Index i, Number &gi)
 Compute the value of a single constraint. More...
 
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. More...
 
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) More...
 
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. More...
 
virtual const BranchingInfo * branchingInfo () const
 Provides information about branching priorities. More...
 

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_MINLPoperator= (const SMAG_MINLP &)
 
void setupPrioritiesSOS ()
 Internal routine to initialize sosinfo and branchinginfo. More...
 

Private Attributes

smagHandle_t prob
 
double * negLambda
 
double isMin
 
SosInfo sosinfo
 
BranchingInfo branchinginfo
 

Detailed Description

A TNLP for Ipopt that uses SMAG to interface the problem formulation.

Definition at line 31 of file SmagMINLP.hpp.

Constructor & Destructor Documentation

SMAG_MINLP::SMAG_MINLP ( smagHandle_t  prob)

Contructor.

Parameters
probThe 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

Member Function Documentation

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.

Parameters
nsize of var_types (has to be equal to the number of variables in the problem).
var_typestypes 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.

Parameters
nsize of var_linearity (has to be equal to the number of variables in the problem).
var_linearitylinearity 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.

Parameters
msize of const_types (has to be equal to the number of constraints in the problem).
const_typestypes 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.

Parameters
nthe number of variables
xthe point to evaluate
new_xwhether x is a new point
ithe constraint number (starting counting from 0)
gito 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.

Parameters
nthe number of variables
xthe point to compute the gradient for
new_xwhether x is a new point
ithe constraint number (starting counting from 0)
nele_grad_githe number of nonzero elements in the gradient of g_i
jColthe indices of the nonzero columns
valuesthe 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.

Member Data Documentation

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.

int SMAG_MINLP::model_status

Definition at line 139 of file SmagMINLP.hpp.

int SMAG_MINLP::solver_status

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.


The documentation for this class was generated from the following file: