CouenneProblem Class Reference

Class for MINLP problems with symbolic information. More...

#include <CouenneProblem.hpp>

List of all members.

Public Member Functions

 CouenneProblem (ASL *=NULL, Bonmin::BabSetupBase *base=NULL, JnlstPtr jnlst=NULL)
 Constructor.
 CouenneProblem (const CouenneProblem &)
 Copy constructor.
 ~CouenneProblem ()
 Destructor.
void initOptions (SmartPtr< OptionsList > options)
 initializes parameters like doOBBT
CouenneProblemclone () const
 Clone method (for use within CouenneCutGenerator::clone).
int nObjs () const
 Get number of objectives.
int nCons () const
 Get number of constraints.
int nOrigCons () const
 Get number of original constraints.
int nOrigVars () const
 Number of orig. variables.
int nDefVars () const
 Number of def'd variables.
int nOrigIntVars () const
 Number of original integers.
int nIntVars () const
 Number of integer variables.
int nVars () const
 Total number of variables.
void setNDefVars (int ndefined__)
int evalOrder (int i) const
 get evaluation order index
int * evalVector ()
 get evaluation order vector (numbering_)
CouenneConstraintCon (int i) const
 i-th constraint
CouenneObjectiveObj (int i) const
 i-th objective
exprVarVar (int i) const
 Return pointer to i-th variable.
std::vector< exprVar * > & Variables ()
 Return vector of variables (symbolic representation).
std::set< exprAux *, compExpr > *& AuxSet ()
 Return pointer to set for comparisons.
DepGraphgetDepGraph ()
 Return pointer to dependence graph.
Domaindomain () const
 return current point & bounds
std::vector< expression * > & commonExprs ()
CouNumberX (int i) const
 $x_i$
CouNumberLb (int i) const
 lower bound on $x_i$
CouNumberUb (int i) const
 upper bound on$x_i$
CouNumberX () const
 Return vector of variables.
CouNumberLb () const
 Return vector of lower bounds.
CouNumberUb () const
 Return vector of upper bounds.
CouNumber *& bestSol () const
 Best known solution (read from file).
CouNumber bestObj () const
 Objective of best known solution.
bool *& Commuted ()
 Get vector of commuted variables.
void addObjective (expression *, const std::string &)
 Add (non linear) objective function.
void addEQConstraint (expression *, expression *)
 Add equality constraint $ h(x) = b$.
void addGEConstraint (expression *, expression *)
 Add $\ge$ constraint, $h(x)\ge b$.
void addLEConstraint (expression *, expression *)
 Add $\le$ constraint, $h(x)\le b$.
void addRNGConstraint (expression *, expression *, expression *)
 Add range constraint, $a\le h(x)\le b$.
expressionaddVariable (bool isint=false, Domain *d=NULL)
 Add original variable.
exprAuxaddAuxiliary (expression *)
 Add auxiliary variable and associate it with expression given as argument (used in standardization).
void reformulate (CouenneCutGenerator *=NULL)
 preprocess problem in order to extract linear relaxations etc.
bool standardize ()
 Break problem's nonlinear constraints in simple expressions to be convexified later.
void print (std::ostream &=std::cout)
 Display current representation of problem: objective, linear and nonlinear constraints, and auxiliary variables.
bool doFBBT () const
 shall we do Feasibility Based Bound Tightening?
bool doRCBT () const
 shall we do reduced cost Bound Tightening?
bool doOBBT () const
 shall we do Optimality Based Bound Tightening?
bool doABT () const
 shall we do Aggressive Bound Tightening?
int logObbtLev () const
 How often shall we do OBBT?
int logAbtLev () const
 How often shall we do ABT?
void writeAMPL (const std::string &fname, bool aux)
 Write nonlinear problem to a .mod file (with lots of defined variables).
void writeGAMS (const std::string &fname)
 Write nonlinear problem to a .gms file.
void initAuxs () const
 Initialize auxiliary variables and their bounds from original variables.
void getAuxs (CouNumber *) const
 Get auxiliary variables from original variables.
bool boundTightening (t_chg_bounds *, Bonmin::BabInfo *=NULL) const
 tighten bounds using propagation, implied bounds and reduced costs
bool btCore (t_chg_bounds *chg_bds) const
 core of the bound tightening procedure
int obbt (const CouenneCutGenerator *cg, const OsiSolverInterface &csi, OsiCuts &cs, const CglTreeInfo &info, Bonmin::BabInfo *babInfo, t_chg_bounds *chg_bds)
 Optimality Based Bound Tightening.
bool aggressiveBT (Bonmin::OsiTMINLPInterface *nlp, t_chg_bounds *, Bonmin::BabInfo *=NULL) const
 aggressive bound tightening.
int redCostBT (const OsiSolverInterface *psi, t_chg_bounds *chg_bds) const
 procedure to strengthen variable bounds.
int tightenBounds (t_chg_bounds *) const
 "Forward" bound tightening, that is, propagate bound of variable $x$ in an expression $w = f(x)$ to the bounds of $w$.
int impliedBounds (t_chg_bounds *) const
 "Backward" bound tightening, aka implied bounds.
void fillQuadIndices ()
 Look for quadratic terms to be used with SDP cuts.
void fillObjCoeff (double *&)
 Fill vector with coefficients of objective function.
void auxiliarize (exprVar *, exprVar *=NULL)
 Replace all occurrences of original variable with new aux given as argument.
void setCutOff (CouNumber cutoff) const
 Set cutoff.
CouNumber getCutOff () const
 Set cutoff.
void installCutOff () const
 Make cutoff known to the problem.
ConstJnlstPtr Jnlst () const
 Provide Journalist.
bool checkNLP (const double *solution, double &obj, bool recompute=false) const
 Check if solution is MINLP feasible.
int getIntegerCandidate (const double *xFrac, double *xInt, double *lb, double *ub) const
 generate integer NLP point Y starting from fractional solution using bound tightening
bool readOptimum (std::string *fname=NULL)
 Read best known solution from file given in argument.
void readCutoff (const std::string &fname)
 Read cutoff value (for testing purposes).
exprAuxlinStandardize (bool addAux, CouNumber c0, LinMap &lmap, QuadMap &qmap)
 standardization of linear exprOp's
int splitAux (CouNumber, expression *, expression *&, bool *)
 split a constraint w - f(x) = c into w's index (it is returned) and rest = f(x) + c
void indcoe2vector (int *indexL, CouNumber *coeff, std::vector< std::pair< exprVar *, CouNumber > > &lcoeff)
 translates pair (indices, coefficients) into vector with pointers to variables
void indcoe2vector (int *indexI, int *indexJ, CouNumber *coeff, std::vector< quadElem > &qcoeff)
 translates triplet (indicesI, indicesJ, coefficients) into vector with pointers to variables
void decomposeTerm (expression *term, CouNumber initCoe, CouNumber &c0, LinMap &lmap, QuadMap &qmap)
 given (expression *) element of sum, returns (coe,ind0,ind1) depending on element:
const std::string & problemName () const
 return problem name
void setProblemName (std::string &problemName__)
const std::vector< std::set<
int > > & 
Dependence () const
 return inverse dependence structure
const std::vector< CouenneObject * > & Objects () const
 return object vector
int findSOS (OsiSolverInterface *solver, OsiObject **objects)
 find SOS constraints in problem
void setMaxCpuTime (double time)
 set maximum CPU time
double getMaxCpuTime () const
 return maximum CPU time
void setBase (Bonmin::BabSetupBase *base)
 save CouenneBase
void createUnusedOriginals ()
 Some originals may be unused due to their zero multiplicity (that happens when they are duplicates).
void restoreUnusedOriginals (CouNumber *=NULL) const
 Some originals may be unused due to their zero multiplicity (that happens when they are duplicates).
int * unusedOriginalsIndices ()
 return indices of neglected redundant variables
int nUnusedOriginals ()
 number of unused originals

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Add list of options to be read from file.

Protected Member Functions

int fake_tighten (char direction, int index, const double *X, CouNumber *olb, CouNumber *oub, t_chg_bounds *chg_bds, t_chg_bounds *f_chg) const
 single fake tightening.
int obbtInner (OsiSolverInterface *, OsiCuts &, t_chg_bounds *, Bonmin::BabInfo *) const
 Optimality Based Bound Tightening -- inner loop.
int obbt_iter (OsiSolverInterface *csi, t_chg_bounds *chg_bds, const CoinWarmStart *warmstart, Bonmin::BabInfo *babInfo, double *objcoe, int sense, int index) const
int call_iter (OsiSolverInterface *csi, t_chg_bounds *chg_bds, const CoinWarmStart *warmstart, Bonmin::BabInfo *babInfo, double *objcoe, enum nodeType type, int sense) const
void analyzeSparsity (CouNumber, LinMap &, QuadMap &)
 analyze sparsity of potential exprQuad/exprGroup and change linear/quadratic maps accordingly, if necessary by adding new auxiliary variables and including them in the linear map
void flattenMul (expression *mul, CouNumber &coe, std::map< int, CouNumber > &indices)
 re-organizes multiplication and stores indices (and exponents) of its variables
void realign ()
 clear all spurious variables pointers not referring to the variables_ vector
void fillDependence (Bonmin::BabSetupBase *base, CouenneCutGenerator *=NULL)
 fill dependence_ structure
void fillIntegerRank () const
 fill freeIntegers_ array
int testIntFix (int index, CouNumber xFrac, enum fixType *fixed, CouNumber *xInt, CouNumber *dualL, CouNumber *dualR, CouNumber *olb, CouNumber *oub, bool patient) const
 Test fixing of an integer variable (used in getIntegerCandidate()).

Protected Attributes

std::string problemName_
 problem name
std::vector< exprVar * > variables_
 Variables (original, auxiliary, and defined).
std::vector< CouenneObjective * > objectives_
 Objectives.
std::vector< CouenneConstraint * > constraints_
 Constraints.
std::vector< expression * > commonexprs_
 AMPL's common expressions (read from AMPL through structures cexps and cexps1).
Domain domain_
 current point and bounds;
std::set< exprAux *, compExpr > * auxSet_
 Expression map for comparison in standardization and to count occurrences of an auxiliary.
int curnvars_
 Number of elements in the x_, lb_, ub_ arrays.
int nIntVars_
 Number of discrete variables.
CouNumberoptimum_
 Best solution known to be loaded from file -- for testing purposes.
CouNumber bestObj_
 Best known objective function.
int * quadIndex_
 Indices of variables appearing in products (used for SDP cuts).
bool * commuted_
 Variables that have commuted to auxiliary.
int * numbering_
 numbering of variables.
int ndefined_
 Number of "defined variables" (aka "common expressions").
DepGraphgraph_
 Dependence (acyclic) graph: shows dependence of all auxiliary variables on one another and on original variables.
int nOrigVars_
 Number of original variables.
int nOrigCons_
 Number of original constraints (disregarding those that turned into auxiliary variable definition).
int nOrigIntVars_
 Number of original integer variables.
GlobalCutOffpcutoff_
 Pointer to a global cutoff object.
bool created_pcutoff_
 flag indicating if this class is creator of global cutoff object
bool doFBBT_
 do Feasibility-based bound tightening
bool doRCBT_
 do reduced cost bound tightening
bool doOBBT_
 do Optimality-based bound tightening
bool doABT_
 do Aggressive bound tightening
int logObbtLev_
 frequency of Optimality-based bound tightening
int logAbtLev_
 frequency of Aggressive bound tightening
JnlstPtr jnlst_
 SmartPointer to the Journalist.
CouNumber opt_window_
 window around known optimum (for testing purposes)
bool useQuadratic_
 Use quadratic expressions?
CouNumber feas_tolerance_
 feasibility tolerance (to be used in checkNLP)
std::vector< std::set< int > > dependence_
 inverse dependence structure: for each variable x give set of auxiliary variables (or better, their indices) whose expression depends on x
std::vector< CouenneObject * > objects_
 vector of pointer to CouenneObjects.
int * integerRank_
 each element is true if variable is integer and, if auxiliary, depends on no integer
std::vector< int > numberInRank_
 numberInRank_ [i] is the number of integer variables in rank i
double maxCpuTime_
 maximum cpu time
Bonmin::BabSetupBase * bonBase_
 options
int * unusedOriginalsIndices_
 some originals may be unused due to their zero multiplicity (that happens when they are duplicates).
int nUnusedOriginals_
 number of unused originals

Private Types

 UNFIXED
 FIXED
 CONTINUOUS
enum  fixType { UNFIXED, FIXED, CONTINUOUS }
 structure to record fixed, non-fixed, and continuous variables More...

Classes

class  GlobalCutOff
 Class for storing a global cutoff for a CouenneProblem and all its clones. More...


Detailed Description

Class for MINLP problems with symbolic information.

It is read from an AMPL .nl file and contains variables, AMPL's "defined variables" (aka common expressions), objective(s), and constraints in the form of expression's. Changes throughout the program occur in standardization.

Definition at line 50 of file CouenneProblem.hpp.


Member Enumeration Documentation

enum CouenneProblem::fixType [private]

structure to record fixed, non-fixed, and continuous variables

Enumerator:
UNFIXED 
FIXED 
CONTINUOUS 

Definition at line 67 of file CouenneProblem.hpp.


Constructor & Destructor Documentation

CouenneProblem::CouenneProblem ( ASL *  = NULL,
Bonmin::BabSetupBase *  base = NULL,
JnlstPtr  jnlst = NULL 
)

Constructor.

Referenced by clone().

CouenneProblem::CouenneProblem ( const CouenneProblem  ) 

Copy constructor.

CouenneProblem::~CouenneProblem (  ) 

Destructor.


Member Function Documentation

void CouenneProblem::initOptions ( SmartPtr< OptionsList >  options  ) 

initializes parameters like doOBBT

CouenneProblem* CouenneProblem::clone (  )  const [inline]

Clone method (for use within CouenneCutGenerator::clone).

Definition at line 202 of file CouenneProblem.hpp.

References CouenneProblem().

int CouenneProblem::nObjs (  )  const [inline]

Get number of objectives.

Definition at line 205 of file CouenneProblem.hpp.

References objectives_.

int CouenneProblem::nCons (  )  const [inline]

Get number of constraints.

Definition at line 206 of file CouenneProblem.hpp.

References constraints_.

int CouenneProblem::nOrigCons (  )  const [inline]

Get number of original constraints.

Definition at line 207 of file CouenneProblem.hpp.

References nOrigCons_.

int CouenneProblem::nOrigVars (  )  const [inline]

Number of orig. variables.

Definition at line 209 of file CouenneProblem.hpp.

References nOrigVars_.

int CouenneProblem::nDefVars (  )  const [inline]

Number of def'd variables.

Definition at line 210 of file CouenneProblem.hpp.

References ndefined_.

int CouenneProblem::nOrigIntVars (  )  const [inline]

Number of original integers.

Definition at line 211 of file CouenneProblem.hpp.

References nOrigIntVars_.

int CouenneProblem::nIntVars (  )  const [inline]

Number of integer variables.

Definition at line 212 of file CouenneProblem.hpp.

References nIntVars_.

int CouenneProblem::nVars (  )  const [inline]

Total number of variables.

Definition at line 213 of file CouenneProblem.hpp.

References variables_.

void CouenneProblem::setNDefVars ( int  ndefined__  )  [inline]

Definition at line 215 of file CouenneProblem.hpp.

References ndefined_.

int CouenneProblem::evalOrder ( int  i  )  const [inline]

get evaluation order index

Definition at line 218 of file CouenneProblem.hpp.

References numbering_.

int* CouenneProblem::evalVector (  )  [inline]

get evaluation order vector (numbering_)

Definition at line 222 of file CouenneProblem.hpp.

References numbering_.

CouenneConstraint* CouenneProblem::Con ( int  i  )  const [inline]

i-th constraint

Definition at line 226 of file CouenneProblem.hpp.

References constraints_.

CouenneObjective* CouenneProblem::Obj ( int  i  )  const [inline]

i-th objective

Definition at line 227 of file CouenneProblem.hpp.

References objectives_.

exprVar* CouenneProblem::Var ( int  i  )  const [inline]

Return pointer to i-th variable.

Definition at line 230 of file CouenneProblem.hpp.

References variables_.

std::vector<exprVar *>& CouenneProblem::Variables (  )  [inline]

Return vector of variables (symbolic representation).

Definition at line 234 of file CouenneProblem.hpp.

References variables_.

std::set<exprAux *, compExpr>*& CouenneProblem::AuxSet (  )  [inline]

Return pointer to set for comparisons.

Definition at line 238 of file CouenneProblem.hpp.

References auxSet_.

DepGraph* CouenneProblem::getDepGraph (  )  [inline]

Return pointer to dependence graph.

Definition at line 242 of file CouenneProblem.hpp.

References graph_.

Domain* CouenneProblem::domain (  )  const [inline]

return current point & bounds

Definition at line 246 of file CouenneProblem.hpp.

References domain_.

std::vector<expression *>& CouenneProblem::commonExprs (  )  [inline]

Definition at line 249 of file CouenneProblem.hpp.

References commonexprs_.

CouNumber& CouenneProblem::X ( int  i  )  const [inline]

$x_i$

Definition at line 252 of file CouenneProblem.hpp.

References domain_, and Domain::x().

CouNumber& CouenneProblem::Lb ( int  i  )  const [inline]

lower bound on $x_i$

Definition at line 253 of file CouenneProblem.hpp.

References domain_, and Domain::lb().

CouNumber& CouenneProblem::Ub ( int  i  )  const [inline]

upper bound on$x_i$

Definition at line 254 of file CouenneProblem.hpp.

References domain_, and Domain::ub().

CouNumber* CouenneProblem::X (  )  const [inline]

Return vector of variables.

Definition at line 257 of file CouenneProblem.hpp.

References domain_, and Domain::x().

CouNumber* CouenneProblem::Lb (  )  const [inline]

Return vector of lower bounds.

Definition at line 258 of file CouenneProblem.hpp.

References domain_, and Domain::lb().

CouNumber* CouenneProblem::Ub (  )  const [inline]

Return vector of upper bounds.

Definition at line 259 of file CouenneProblem.hpp.

References domain_, and Domain::ub().

CouNumber*& CouenneProblem::bestSol (  )  const [inline]

Best known solution (read from file).

Definition at line 262 of file CouenneProblem.hpp.

References optimum_.

CouNumber CouenneProblem::bestObj (  )  const [inline]

Objective of best known solution.

Definition at line 263 of file CouenneProblem.hpp.

References bestObj_.

bool*& CouenneProblem::Commuted (  )  [inline]

Get vector of commuted variables.

Definition at line 266 of file CouenneProblem.hpp.

References commuted_.

void CouenneProblem::addObjective ( expression ,
const std::string &   
)

Add (non linear) objective function.

void CouenneProblem::addEQConstraint ( expression ,
expression  
)

Add equality constraint $ h(x) = b$.

void CouenneProblem::addGEConstraint ( expression ,
expression  
)

Add $\ge$ constraint, $h(x)\ge b$.

void CouenneProblem::addLEConstraint ( expression ,
expression  
)

Add $\le$ constraint, $h(x)\le b$.

void CouenneProblem::addRNGConstraint ( expression ,
expression ,
expression  
)

Add range constraint, $a\le h(x)\le b$.

expression* CouenneProblem::addVariable ( bool  isint = false,
Domain d = NULL 
)

Add original variable.

Parameters:
isint if true, this variable is integer, otherwise it is continuous

exprAux* CouenneProblem::addAuxiliary ( expression  ) 

Add auxiliary variable and associate it with expression given as argument (used in standardization).

void CouenneProblem::reformulate ( CouenneCutGenerator = NULL  ) 

preprocess problem in order to extract linear relaxations etc.

bool CouenneProblem::standardize (  ) 

Break problem's nonlinear constraints in simple expressions to be convexified later.

Return true if problem looks feasible, false if proven infeasible.

void CouenneProblem::print ( std::ostream &  = std::cout  ) 

Display current representation of problem: objective, linear and nonlinear constraints, and auxiliary variables.

bool CouenneProblem::doFBBT (  )  const [inline]

shall we do Feasibility Based Bound Tightening?

Definition at line 310 of file CouenneProblem.hpp.

References doFBBT_.

bool CouenneProblem::doRCBT (  )  const [inline]

shall we do reduced cost Bound Tightening?

Definition at line 311 of file CouenneProblem.hpp.

References doRCBT_.

bool CouenneProblem::doOBBT (  )  const [inline]

shall we do Optimality Based Bound Tightening?

Definition at line 312 of file CouenneProblem.hpp.

References doOBBT_.

bool CouenneProblem::doABT (  )  const [inline]

shall we do Aggressive Bound Tightening?

Definition at line 313 of file CouenneProblem.hpp.

References doABT_.

int CouenneProblem::logObbtLev (  )  const [inline]

How often shall we do OBBT?

Definition at line 315 of file CouenneProblem.hpp.

References logObbtLev_.

int CouenneProblem::logAbtLev (  )  const [inline]

How often shall we do ABT?

Definition at line 316 of file CouenneProblem.hpp.

References logAbtLev_.

void CouenneProblem::writeAMPL ( const std::string &  fname,
bool  aux 
)

Write nonlinear problem to a .mod file (with lots of defined variables).

Parameters:
fname Name of the .mod file to be written
aux controls the use of auxiliaries. If true, a problem is written with auxiliary variables written with their associated expression, i.e. $w_i = h_i(x,y,w)$ and bounds $l_i \le w_i \le u_i$, while if false these constraints are written in the form $l_i \le h_i (x,y) \le u_i$.
Note: if used before standardization, writes original AMPL formulation

void CouenneProblem::writeGAMS ( const std::string &  fname  ) 

Write nonlinear problem to a .gms file.

Parameters:
fname Name of the .gams file to be written.

void CouenneProblem::initAuxs (  )  const

Initialize auxiliary variables and their bounds from original variables.

void CouenneProblem::getAuxs ( CouNumber  )  const

Get auxiliary variables from original variables.

bool CouenneProblem::boundTightening ( t_chg_bounds ,
Bonmin::BabInfo *  = NULL 
) const

tighten bounds using propagation, implied bounds and reduced costs

bool CouenneProblem::btCore ( t_chg_bounds chg_bds  )  const

core of the bound tightening procedure

int CouenneProblem::obbt ( const CouenneCutGenerator cg,
const OsiSolverInterface &  csi,
OsiCuts &  cs,
const CglTreeInfo &  info,
Bonmin::BabInfo *  babInfo,
t_chg_bounds chg_bds 
)

Optimality Based Bound Tightening.

bool CouenneProblem::aggressiveBT ( Bonmin::OsiTMINLPInterface *  nlp,
t_chg_bounds ,
Bonmin::BabInfo *  = NULL 
) const

aggressive bound tightening.

Fake bounds in order to cut portions of the solution space by fathoming on bounds/infeasibility

int CouenneProblem::redCostBT ( const OsiSolverInterface *  psi,
t_chg_bounds chg_bds 
) const

procedure to strengthen variable bounds.

Return false if problem turns out to be infeasible with given bounds, true otherwise.

int CouenneProblem::tightenBounds ( t_chg_bounds  )  const

"Forward" bound tightening, that is, propagate bound of variable $x$ in an expression $w = f(x)$ to the bounds of $w$.

int CouenneProblem::impliedBounds ( t_chg_bounds  )  const

"Backward" bound tightening, aka implied bounds.

void CouenneProblem::fillQuadIndices (  ) 

Look for quadratic terms to be used with SDP cuts.

void CouenneProblem::fillObjCoeff ( double *&   ) 

Fill vector with coefficients of objective function.

void CouenneProblem::auxiliarize ( exprVar ,
exprVar = NULL 
)

Replace all occurrences of original variable with new aux given as argument.

void CouenneProblem::setCutOff ( CouNumber  cutoff  )  const

Set cutoff.

CouNumber CouenneProblem::getCutOff (  )  const [inline]

Set cutoff.

Definition at line 393 of file CouenneProblem.hpp.

References pcutoff_.

void CouenneProblem::installCutOff (  )  const

Make cutoff known to the problem.

ConstJnlstPtr CouenneProblem::Jnlst (  )  const [inline]

Provide Journalist.

Definition at line 400 of file CouenneProblem.hpp.

References jnlst_.

bool CouenneProblem::checkNLP ( const double *  solution,
double &  obj,
bool  recompute = false 
) const

Check if solution is MINLP feasible.

int CouenneProblem::getIntegerCandidate ( const double *  xFrac,
double *  xInt,
double *  lb,
double *  ub 
) const

generate integer NLP point Y starting from fractional solution using bound tightening

bool CouenneProblem::readOptimum ( std::string *  fname = NULL  ) 

Read best known solution from file given in argument.

void CouenneProblem::readCutoff ( const std::string &  fname  ) 

Read cutoff value (for testing purposes).

static void CouenneProblem::registerOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions >  roptions  )  [static]

Add list of options to be read from file.

exprAux* CouenneProblem::linStandardize ( bool  addAux,
CouNumber  c0,
LinMap lmap,
QuadMap qmap 
)

standardization of linear exprOp's

int CouenneProblem::splitAux ( CouNumber  ,
expression ,
expression *&  ,
bool *   
)

split a constraint w - f(x) = c into w's index (it is returned) and rest = f(x) + c

void CouenneProblem::indcoe2vector ( int *  indexL,
CouNumber coeff,
std::vector< std::pair< exprVar *, CouNumber > > &  lcoeff 
)

translates pair (indices, coefficients) into vector with pointers to variables

void CouenneProblem::indcoe2vector ( int *  indexI,
int *  indexJ,
CouNumber coeff,
std::vector< quadElem > &  qcoeff 
)

translates triplet (indicesI, indicesJ, coefficients) into vector with pointers to variables

void CouenneProblem::decomposeTerm ( expression term,
CouNumber  initCoe,
CouNumber c0,
LinMap lmap,
QuadMap qmap 
)

given (expression *) element of sum, returns (coe,ind0,ind1) depending on element:

1) a * x_i ^ 2 ---> (a,i,?) return COU_EXPRPOW 2) a * x_i ---> (a,i,?) return COU_EXPRVAR 3) a * x_i * x_j ---> (a,i,j) return COU_EXPRMUL 4) a ---> (a,?,?) return COU_EXPRCONST

x_i and/or x_j may come from standardizing other (linear or quadratic operator) sub-expressions

const std::string& CouenneProblem::problemName (  )  const [inline]

return problem name

Definition at line 457 of file CouenneProblem.hpp.

References problemName_.

void CouenneProblem::setProblemName ( std::string &  problemName__  )  [inline]

Definition at line 460 of file CouenneProblem.hpp.

References problemName_.

const std::vector<std::set <int> >& CouenneProblem::Dependence (  )  const [inline]

return inverse dependence structure

Definition at line 464 of file CouenneProblem.hpp.

References dependence_.

const std::vector<CouenneObject *>& CouenneProblem::Objects (  )  const [inline]

return object vector

Definition at line 468 of file CouenneProblem.hpp.

References objects_.

int CouenneProblem::findSOS ( OsiSolverInterface *  solver,
OsiObject **  objects 
)

find SOS constraints in problem

void CouenneProblem::setMaxCpuTime ( double  time  )  [inline]

set maximum CPU time

Definition at line 475 of file CouenneProblem.hpp.

References maxCpuTime_.

double CouenneProblem::getMaxCpuTime (  )  const [inline]

return maximum CPU time

Definition at line 479 of file CouenneProblem.hpp.

References maxCpuTime_.

void CouenneProblem::setBase ( Bonmin::BabSetupBase *  base  )  [inline]

save CouenneBase

Definition at line 483 of file CouenneProblem.hpp.

References bonBase_, and jnlst_.

void CouenneProblem::createUnusedOriginals (  ) 

Some originals may be unused due to their zero multiplicity (that happens when they are duplicates).

This procedure creates a structure for quickly checking and restoring their value after solving.

void CouenneProblem::restoreUnusedOriginals ( CouNumber = NULL  )  const

Some originals may be unused due to their zero multiplicity (that happens when they are duplicates).

This procedure restores their value after solving

int* CouenneProblem::unusedOriginalsIndices (  )  [inline]

return indices of neglected redundant variables

Definition at line 500 of file CouenneProblem.hpp.

References unusedOriginalsIndices_.

int CouenneProblem::nUnusedOriginals (  )  [inline]

number of unused originals

Definition at line 503 of file CouenneProblem.hpp.

References nUnusedOriginals_.

int CouenneProblem::fake_tighten ( char  direction,
int  index,
const double *  X,
CouNumber olb,
CouNumber oub,
t_chg_bounds chg_bds,
t_chg_bounds f_chg 
) const [protected]

single fake tightening.

Return

-1 if infeasible 0 if no improvement +1 if improved

Parameters:
direction  0: left, 1: right
index  index of the variable tested
X  point round which tightening is done
olb  cur. lower bound
oub  cur. upper bound

int CouenneProblem::obbtInner ( OsiSolverInterface *  ,
OsiCuts &  ,
t_chg_bounds ,
Bonmin::BabInfo *   
) const [protected]

Optimality Based Bound Tightening -- inner loop.

int CouenneProblem::obbt_iter ( OsiSolverInterface *  csi,
t_chg_bounds chg_bds,
const CoinWarmStart *  warmstart,
Bonmin::BabInfo *  babInfo,
double *  objcoe,
int  sense,
int  index 
) const [protected]

int CouenneProblem::call_iter ( OsiSolverInterface *  csi,
t_chg_bounds chg_bds,
const CoinWarmStart *  warmstart,
Bonmin::BabInfo *  babInfo,
double *  objcoe,
enum nodeType  type,
int  sense 
) const [protected]

void CouenneProblem::analyzeSparsity ( CouNumber  ,
LinMap ,
QuadMap  
) [protected]

analyze sparsity of potential exprQuad/exprGroup and change linear/quadratic maps accordingly, if necessary by adding new auxiliary variables and including them in the linear map

void CouenneProblem::flattenMul ( expression mul,
CouNumber coe,
std::map< int, CouNumber > &  indices 
) [protected]

re-organizes multiplication and stores indices (and exponents) of its variables

void CouenneProblem::realign (  )  [protected]

clear all spurious variables pointers not referring to the variables_ vector

void CouenneProblem::fillDependence ( Bonmin::BabSetupBase *  base,
CouenneCutGenerator = NULL 
) [protected]

fill dependence_ structure

void CouenneProblem::fillIntegerRank (  )  const [protected]

fill freeIntegers_ array

int CouenneProblem::testIntFix ( int  index,
CouNumber  xFrac,
enum fixType fixed,
CouNumber xInt,
CouNumber dualL,
CouNumber dualR,
CouNumber olb,
CouNumber oub,
bool  patient 
) const [protected]

Test fixing of an integer variable (used in getIntegerCandidate()).


Member Data Documentation

std::string CouenneProblem::problemName_ [protected]

problem name

Definition at line 72 of file CouenneProblem.hpp.

Referenced by problemName(), and setProblemName().

std::vector<exprVar *> CouenneProblem::variables_ [protected]

Variables (original, auxiliary, and defined).

Definition at line 74 of file CouenneProblem.hpp.

Referenced by nVars(), Var(), and Variables().

std::vector<CouenneObjective *> CouenneProblem::objectives_ [protected]

Objectives.

Definition at line 75 of file CouenneProblem.hpp.

Referenced by nObjs(), and Obj().

std::vector<CouenneConstraint *> CouenneProblem::constraints_ [protected]

Constraints.

Definition at line 76 of file CouenneProblem.hpp.

Referenced by Con(), and nCons().

std::vector<expression *> CouenneProblem::commonexprs_ [protected]

AMPL's common expressions (read from AMPL through structures cexps and cexps1).

Definition at line 79 of file CouenneProblem.hpp.

Referenced by commonExprs().

Domain CouenneProblem::domain_ [mutable, protected]

current point and bounds;

Definition at line 81 of file CouenneProblem.hpp.

Referenced by domain(), Lb(), Ub(), and X().

std::set<exprAux *, compExpr>* CouenneProblem::auxSet_ [protected]

Expression map for comparison in standardization and to count occurrences of an auxiliary.

Definition at line 85 of file CouenneProblem.hpp.

Referenced by AuxSet().

int CouenneProblem::curnvars_ [mutable, protected]

Number of elements in the x_, lb_, ub_ arrays.

Definition at line 88 of file CouenneProblem.hpp.

int CouenneProblem::nIntVars_ [protected]

Number of discrete variables.

Definition at line 91 of file CouenneProblem.hpp.

Referenced by nIntVars().

CouNumber* CouenneProblem::optimum_ [mutable, protected]

Best solution known to be loaded from file -- for testing purposes.

Definition at line 94 of file CouenneProblem.hpp.

Referenced by bestSol().

CouNumber CouenneProblem::bestObj_ [protected]

Best known objective function.

Definition at line 97 of file CouenneProblem.hpp.

Referenced by bestObj().

int* CouenneProblem::quadIndex_ [protected]

Indices of variables appearing in products (used for SDP cuts).

Definition at line 100 of file CouenneProblem.hpp.

bool* CouenneProblem::commuted_ [protected]

Variables that have commuted to auxiliary.

Definition at line 103 of file CouenneProblem.hpp.

Referenced by Commuted().

int* CouenneProblem::numbering_ [protected]

numbering of variables.

No variable xi with associated pi(i) greater than pi(j) should be evaluated before variable xj

Definition at line 107 of file CouenneProblem.hpp.

Referenced by evalOrder(), and evalVector().

int CouenneProblem::ndefined_ [protected]

Number of "defined variables" (aka "common expressions").

Definition at line 110 of file CouenneProblem.hpp.

Referenced by nDefVars(), and setNDefVars().

DepGraph* CouenneProblem::graph_ [protected]

Dependence (acyclic) graph: shows dependence of all auxiliary variables on one another and on original variables.

Used to create a numbering of all variables for evaluation and bound tightening (reverse order for implied bounds)

Definition at line 116 of file CouenneProblem.hpp.

Referenced by getDepGraph().

int CouenneProblem::nOrigVars_ [protected]

Number of original variables.

Definition at line 119 of file CouenneProblem.hpp.

Referenced by nOrigVars().

int CouenneProblem::nOrigCons_ [protected]

Number of original constraints (disregarding those that turned into auxiliary variable definition).

Definition at line 123 of file CouenneProblem.hpp.

Referenced by nOrigCons().

int CouenneProblem::nOrigIntVars_ [protected]

Number of original integer variables.

Definition at line 126 of file CouenneProblem.hpp.

Referenced by nOrigIntVars().

GlobalCutOff* CouenneProblem::pcutoff_ [mutable, protected]

Pointer to a global cutoff object.

Definition at line 129 of file CouenneProblem.hpp.

Referenced by getCutOff().

bool CouenneProblem::created_pcutoff_ [mutable, protected]

flag indicating if this class is creator of global cutoff object

Definition at line 132 of file CouenneProblem.hpp.

bool CouenneProblem::doFBBT_ [protected]

do Feasibility-based bound tightening

Definition at line 134 of file CouenneProblem.hpp.

Referenced by doFBBT().

bool CouenneProblem::doRCBT_ [protected]

do reduced cost bound tightening

Definition at line 135 of file CouenneProblem.hpp.

Referenced by doRCBT().

bool CouenneProblem::doOBBT_ [protected]

do Optimality-based bound tightening

Definition at line 136 of file CouenneProblem.hpp.

Referenced by doOBBT().

bool CouenneProblem::doABT_ [protected]

do Aggressive bound tightening

Definition at line 137 of file CouenneProblem.hpp.

Referenced by doABT().

int CouenneProblem::logObbtLev_ [protected]

frequency of Optimality-based bound tightening

Definition at line 139 of file CouenneProblem.hpp.

Referenced by logObbtLev().

int CouenneProblem::logAbtLev_ [protected]

frequency of Aggressive bound tightening

Definition at line 140 of file CouenneProblem.hpp.

Referenced by logAbtLev().

JnlstPtr CouenneProblem::jnlst_ [protected]

SmartPointer to the Journalist.

Definition at line 143 of file CouenneProblem.hpp.

Referenced by Jnlst(), and setBase().

CouNumber CouenneProblem::opt_window_ [protected]

window around known optimum (for testing purposes)

Definition at line 146 of file CouenneProblem.hpp.

bool CouenneProblem::useQuadratic_ [protected]

Use quadratic expressions?

Definition at line 149 of file CouenneProblem.hpp.

CouNumber CouenneProblem::feas_tolerance_ [protected]

feasibility tolerance (to be used in checkNLP)

Definition at line 152 of file CouenneProblem.hpp.

std::vector<std::set <int> > CouenneProblem::dependence_ [protected]

inverse dependence structure: for each variable x give set of auxiliary variables (or better, their indices) whose expression depends on x

Definition at line 157 of file CouenneProblem.hpp.

Referenced by Dependence().

std::vector<CouenneObject *> CouenneProblem::objects_ [protected]

vector of pointer to CouenneObjects.

Used by CouenneVarObjects when finding all objects related to (having as argument) a single variable

Definition at line 162 of file CouenneProblem.hpp.

Referenced by Objects().

int* CouenneProblem::integerRank_ [mutable, protected]

each element is true if variable is integer and, if auxiliary, depends on no integer

Definition at line 166 of file CouenneProblem.hpp.

std::vector<int> CouenneProblem::numberInRank_ [mutable, protected]

numberInRank_ [i] is the number of integer variables in rank i

Definition at line 169 of file CouenneProblem.hpp.

double CouenneProblem::maxCpuTime_ [protected]

maximum cpu time

Definition at line 172 of file CouenneProblem.hpp.

Referenced by getMaxCpuTime(), and setMaxCpuTime().

Bonmin::BabSetupBase* CouenneProblem::bonBase_ [protected]

options

Definition at line 175 of file CouenneProblem.hpp.

Referenced by setBase().

int* CouenneProblem::unusedOriginalsIndices_ [protected]

some originals may be unused due to their zero multiplicity (that happens when they are duplicates).

This array keeps track of their indices and is sorted by evaluation order

Definition at line 185 of file CouenneProblem.hpp.

Referenced by unusedOriginalsIndices().

int CouenneProblem::nUnusedOriginals_ [protected]

number of unused originals

Definition at line 188 of file CouenneProblem.hpp.

Referenced by nUnusedOriginals().


The documentation for this class was generated from the following file:
Generated on Mon Aug 8 03:04:16 2011 for Couenne by  doxygen 1.4.7