#include <CouenneProblem.hpp>
Collaboration diagram for CouenneProblem:
Public Member Functions | |
CouenneProblem (ASL *=NULL, Bonmin::BabSetupBase *base=NULL, JnlstPtr jnlst=NULL) | |
Constructor. | |
CouenneProblem (const CouenneProblem &) | |
Copy constructor. | |
~CouenneProblem () | |
Destructor. | |
CouenneProblem * | clone () 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. | |
int | evalOrder (int i) const |
get evaluation order index | |
int * | evalVector () |
get evaluation order vector (numbering_) | |
CouenneConstraint * | Con (int i) const |
i-th constraint | |
CouenneObjective * | Obj (int i) const |
i-th objective | |
exprVar * | Var (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. | |
DepGraph * | getDepGraph () |
Return pointer to dependence graph. | |
Domain * | domain () const |
return current point & bounds | |
CouNumber & | X (int i) const |
![]() | |
CouNumber & | Lb (int i) const |
lower bound on ![]() | |
CouNumber & | Ub (int i) const |
upper bound on![]() | |
CouNumber * | X () const |
Return vector of variables. | |
CouNumber * | Lb () const |
Return vector of lower bounds. | |
CouNumber * | Ub () 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 ![]() | |
void | addGEConstraint (expression *, expression *) |
Add ![]() ![]() | |
void | addLEConstraint (expression *, expression *) |
Add ![]() ![]() | |
void | addRNGConstraint (expression *, expression *, expression *) |
Add range constraint, ![]() | |
expression * | addVariable (bool isint=false, Domain *d=NULL) |
Add original variable. | |
exprAux * | addAuxiliary (expression *) |
Add auxiliary variable and associate it with expression given as argument (used in standardization). | |
void | reformulate () |
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 ![]() ![]() ![]() | |
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). | |
exprAux * | linStandardize (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 | |
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 (CouenneSolverInterface *, OsiCuts &, t_chg_bounds *, Bonmin::BabInfo *) const |
Optimality Based Bound Tightening -- inner loop. | |
int | obbt_iter (CouenneSolverInterface *csi, t_chg_bounds *chg_bds, const CoinWarmStart *warmstart, Bonmin::BabInfo *babInfo, double *objcoe, int sense, int index) const |
Iteration on one variable. | |
int | call_iter (CouenneSolverInterface *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) |
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. | |
CouNumber * | optimum_ |
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"). | |
DepGraph * | graph_ |
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. | |
GlobalCutOff * | pcutoff_ |
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... |
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 49 of file CouenneProblem.hpp.
enum CouenneProblem::fixType [private] |
structure to record fixed, non-fixed, and continuous variables
Definition at line 66 of file CouenneProblem.hpp.
CouenneProblem::CouenneProblem | ( | ASL * | = NULL , |
|
Bonmin::BabSetupBase * | base = NULL , |
|||
JnlstPtr | jnlst = NULL | |||
) |
Constructor.
Definition at line 31 of file CouenneProblemConstructors.cpp.
References auxSet_, doABT_, doFBBT_, doOBBT_, doRCBT_, feas_tolerance_, J_PROBLEM(), jnlst_, logAbtLev_, logObbtLev_, opt_window_, s, and useQuadratic_.
Referenced by clone().
CouenneProblem::CouenneProblem | ( | const CouenneProblem & | ) |
Copy constructor.
Definition at line 113 of file CouenneProblemConstructors.cpp.
References clone(), Con(), constraints_, domain_, integerRank_, nCons(), nObjs(), numbering_, nUnusedOriginals_, nVars(), Obj(), objectives_, optimum_, realign(), unusedOriginalsIndices_, Var(), and variables_.
CouenneProblem::~CouenneProblem | ( | ) |
Destructor.
Definition at line 188 of file CouenneProblemConstructors.cpp.
References commuted_, constraints_, created_pcutoff_, graph_, integerRank_, numbering_, nVars(), objectives_, optimum_, pcutoff_, unusedOriginalsIndices_, and variables_.
CouenneProblem* CouenneProblem::clone | ( | ) | const [inline] |
Clone method (for use within CouenneCutGenerator::clone).
Definition at line 198 of file CouenneProblem.hpp.
References CouenneProblem().
Referenced by CouenneProblem(), and splitAux().
int CouenneProblem::nObjs | ( | ) | const [inline] |
Get number of objectives.
Definition at line 201 of file CouenneProblem.hpp.
References objectives_.
Referenced by CouenneProblem().
int CouenneProblem::nCons | ( | ) | const [inline] |
Get number of constraints.
Definition at line 202 of file CouenneProblem.hpp.
References constraints_.
Referenced by checkNLP(), CouenneProblem(), reformulate(), writeAMPL(), and writeGAMS().
int CouenneProblem::nOrigCons | ( | ) | const [inline] |
Get number of original constraints.
Definition at line 203 of file CouenneProblem.hpp.
References nOrigCons_.
int CouenneProblem::nOrigVars | ( | ) | const [inline] |
Number of orig. variables.
Definition at line 205 of file CouenneProblem.hpp.
References nOrigVars_.
Referenced by createUnusedOriginals().
int CouenneProblem::nDefVars | ( | ) | const [inline] |
int CouenneProblem::nOrigIntVars | ( | ) | const [inline] |
Number of original integers.
Definition at line 207 of file CouenneProblem.hpp.
References nOrigIntVars_.
int CouenneProblem::nIntVars | ( | ) | const [inline] |
Number of integer variables.
Definition at line 208 of file CouenneProblem.hpp.
References nIntVars_.
Referenced by reformulate().
int CouenneProblem::nVars | ( | ) | const [inline] |
Total number of variables.
Definition at line 209 of file CouenneProblem.hpp.
References variables_.
Referenced by aggressiveBT(), btCore(), checkNLP(), CouenneProblem(), createUnusedOriginals(), fake_tighten(), fillDependence(), fillIntegerRank(), getAuxs(), getIntegerCandidate(), impliedBounds(), initAuxs(), obbt(), print(), readOptimum(), redCostBT(), reformulate(), restoreUnusedOriginals(), standardize(), testIntFix(), tightenBounds(), writeAMPL(), writeGAMS(), and ~CouenneProblem().
int CouenneProblem::evalOrder | ( | int | i | ) | const [inline] |
get evaluation order index
Definition at line 212 of file CouenneProblem.hpp.
References numbering_.
Referenced by aggressiveBT(), and call_iter().
int* CouenneProblem::evalVector | ( | ) | [inline] |
get evaluation order vector (numbering_)
Definition at line 216 of file CouenneProblem.hpp.
References numbering_.
CouenneConstraint* CouenneProblem::Con | ( | int | i | ) | const [inline] |
i-th constraint
Definition at line 220 of file CouenneProblem.hpp.
References constraints_.
Referenced by checkNLP(), CouenneProblem(), and writeGAMS().
CouenneObjective* CouenneProblem::Obj | ( | int | i | ) | const [inline] |
i-th objective
Definition at line 221 of file CouenneProblem.hpp.
References objectives_.
Referenced by aggressiveBT(), boundTightening(), checkNLP(), CouenneProblem(), fake_tighten(), getIntegerCandidate(), obbt_iter(), redCostBT(), testIntFix(), and writeGAMS().
exprVar* CouenneProblem::Var | ( | int | i | ) | const [inline] |
Return pointer to i-th variable.
Definition at line 224 of file CouenneProblem.hpp.
References variables_.
Referenced by aggressiveBT(), analyzeSparsity(), btCore(), CouenneSolver::buildSolverInstance(), call_iter(), CouenneProblem(), decomposeTerm(), fillIntegerRank(), getIntegerCandidate(), indcoe2vector(), linStandardize(), main(), obbt_iter(), redCostBT(), setCutOff(), standardize(), tightenBounds(), and writeGAMS().
std::vector<exprVar *>& CouenneProblem::Variables | ( | ) | [inline] |
Return vector of variables (symbolic representation).
Definition at line 228 of file CouenneProblem.hpp.
References variables_.
Referenced by CouenneSolver::createCouenneExpression().
Return pointer to set for comparisons.
Definition at line 232 of file CouenneProblem.hpp.
References auxSet_.
DepGraph* CouenneProblem::getDepGraph | ( | ) | [inline] |
Return pointer to dependence graph.
Definition at line 236 of file CouenneProblem.hpp.
References graph_.
Domain* CouenneProblem::domain | ( | ) | const [inline] |
return current point & bounds
Definition at line 240 of file CouenneProblem.hpp.
References domain_.
Referenced by CouenneSolver::buildSolverInstance().
CouNumber& CouenneProblem::X | ( | int | i | ) | const [inline] |
CouNumber& CouenneProblem::Lb | ( | int | i | ) | const [inline] |
lower bound on
Definition at line 245 of file CouenneProblem.hpp.
References domain_, and Domain::lb().
Referenced by CouenneChooseStrong::doStrongBranching(), fictitiousBound(), and CouenneDisjCuts::getDisjunctions().
CouNumber& CouenneProblem::Ub | ( | int | i | ) | const [inline] |
upper bound on
Definition at line 246 of file CouenneProblem.hpp.
References domain_, and Domain::ub().
Referenced by CouenneChooseStrong::doStrongBranching(), and CouenneDisjCuts::getDisjunctions().
CouNumber* CouenneProblem::X | ( | ) | const [inline] |
Return vector of variables.
Definition at line 249 of file CouenneProblem.hpp.
References domain_, and Domain::x().
Referenced by aggressiveBT(), getAuxs(), getIntegerCandidate(), initAuxs(), redCostBT(), restoreUnusedOriginals(), writeAMPL(), and writeGAMS().
CouNumber* CouenneProblem::Lb | ( | ) | const [inline] |
Return vector of lower bounds.
Definition at line 250 of file CouenneProblem.hpp.
References domain_, and Domain::lb().
Referenced by aggressiveBT(), boundTightening(), btCore(), checkNLP(), fake_tighten(), findSOS(), getAuxs(), getIntegerCandidate(), impliedBounds(), initAuxs(), obbt_iter(), readOptimum(), redCostBT(), reformulate(), standardize(), testIntFix(), tightenBounds(), writeAMPL(), and writeGAMS().
CouNumber* CouenneProblem::Ub | ( | ) | const [inline] |
Return vector of upper bounds.
Definition at line 251 of file CouenneProblem.hpp.
References domain_, and Domain::ub().
Referenced by aggressiveBT(), boundTightening(), btCore(), checkNLP(), fake_tighten(), findSOS(), getAuxs(), getIntegerCandidate(), impliedBounds(), initAuxs(), installCutOff(), obbt_iter(), readOptimum(), redCostBT(), reformulate(), standardize(), testIntFix(), tightenBounds(), writeAMPL(), and writeGAMS().
CouNumber*& CouenneProblem::bestSol | ( | ) | const [inline] |
Best known solution (read from file).
Definition at line 254 of file CouenneProblem.hpp.
References optimum_.
Referenced by obbt_iter().
CouNumber CouenneProblem::bestObj | ( | ) | const [inline] |
Objective of best known solution.
Definition at line 255 of file CouenneProblem.hpp.
References bestObj_.
bool*& CouenneProblem::Commuted | ( | ) | [inline] |
Get vector of commuted variables.
Definition at line 258 of file CouenneProblem.hpp.
References commuted_.
void CouenneProblem::addObjective | ( | expression * | , | |
const std::string & | ||||
) |
Add (non linear) objective function.
Definition at line 34 of file CouenneProblem.cpp.
References objectives_.
Referenced by CouenneSolver::buildSolverInstance().
void CouenneProblem::addEQConstraint | ( | expression * | , | |
expression * | ||||
) |
Add equality constraint .
Definition at line 44 of file CouenneProblem.cpp.
References constraints_.
Referenced by CouenneSolver::buildSolverInstance().
void CouenneProblem::addGEConstraint | ( | expression * | , | |
expression * | ||||
) |
Add constraint,
.
Definition at line 51 of file CouenneProblem.cpp.
References constraints_, and COUENNE_INFINITY.
Referenced by CouenneSolver::buildSolverInstance().
void CouenneProblem::addLEConstraint | ( | expression * | , | |
expression * | ||||
) |
Add constraint,
.
Definition at line 58 of file CouenneProblem.cpp.
References constraints_, and COUENNE_INFINITY.
Referenced by CouenneSolver::buildSolverInstance().
void CouenneProblem::addRNGConstraint | ( | expression * | , | |
expression * | , | |||
expression * | ||||
) |
Add range constraint, .
Definition at line 65 of file CouenneProblem.cpp.
References constraints_.
Referenced by CouenneSolver::buildSolverInstance().
expression * CouenneProblem::addVariable | ( | bool | isint = false , |
|
Domain * | d = NULL | |||
) |
Add original variable.
isint | if true, this variable is integer, otherwise it is continuous |
Definition at line 74 of file CouenneProblem.cpp.
References nIntVars_, nOrigVars_, and variables_.
Referenced by CouenneSolver::buildSolverInstance().
exprAux * CouenneProblem::addAuxiliary | ( | expression * | ) |
Add auxiliary variable and associate it with expression given as argument (used in standardization).
Definition at line 93 of file CouenneProblem.cpp.
References auxSet_, domain_, graph_, exprAux::Unset, variables_, and w.
Referenced by analyzeSparsity(), decomposeTerm(), and linStandardize().
void CouenneProblem::reformulate | ( | ) |
preprocess problem in order to extract linear relaxations etc.
Definition at line 25 of file reformulate.cpp.
References bonBase_, constraints_, COUENNE_INFINITY, createUnusedOriginals(), Domain::current(), domain_, fillDependence(), fillQuadIndices(), initAuxs(), J_PROBLEM(), jnlst_, Domain::lb(), Lb(), nCons(), nIntVars(), nIntVars_, nOrigCons_, nOrigIntVars_, nOrigVars_, nVars(), objectives_, print(), Domain::push(), readOptimum(), realign(), setCutOff(), standardize(), Ub(), variables_, and x.
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.
re-check integrality. This is necessary as the initial integrality check is done on some continuous variables, which may turn out to be identical to other, integer, variables. See minlplib/ex1223.nl, where x_29 = x_4^2 and x_4=x_9, with x_4 declared continuous and x_9 integer
Definition at line 28 of file standardize.cpp.
References AUX, auxiliarize(), auxSet_, bonBase_, commonexprs_, commuted_, constraints_, COUENNE_EPS, Domain::current(), DEBUG, domain_, graph_, isInteger(), Lb(), Domain::lb(), n, nOrigVars_, numbering_, nVars(), objectives_, print(), Ub(), Domain::ub(), exprAux::Unset, Var(), VAR, variables_, and Domain::x().
Referenced by decomposeTerm(), flattenMul(), reformulate(), and splitAux().
void CouenneProblem::print | ( | std::ostream & | = std::cout |
) |
Display current representation of problem: objective, linear and nonlinear constraints, and auxiliary variables.
Definition at line 22 of file problemIO.cpp.
References AUX, bestObj_, commonexprs_, constraints_, COUENNE_EPS, COUENNE_INFINITY, domain_, isInteger(), Domain::lb(), nVars(), objectives_, optimum_, Domain::ub(), and variables_.
Referenced by auxiliarize(), checkNLP(), findSOS(), flattenMul(), impliedBounds(), linStandardize(), obbt_iter(), reformulate(), splitAux(), standardize(), tightenBounds(), writeAMPL(), and writeGAMS().
bool CouenneProblem::doFBBT | ( | ) | const [inline] |
shall we do Feasibility Based Bound Tightening?
Definition at line 302 of file CouenneProblem.hpp.
References doFBBT_.
bool CouenneProblem::doRCBT | ( | ) | const [inline] |
shall we do reduced cost Bound Tightening?
Definition at line 303 of file CouenneProblem.hpp.
References doRCBT_.
bool CouenneProblem::doOBBT | ( | ) | const [inline] |
shall we do Optimality Based Bound Tightening?
Definition at line 304 of file CouenneProblem.hpp.
References doOBBT_.
bool CouenneProblem::doABT | ( | ) | const [inline] |
shall we do Aggressive Bound Tightening?
Definition at line 305 of file CouenneProblem.hpp.
References doABT_.
int CouenneProblem::logObbtLev | ( | ) | const [inline] |
How often shall we do OBBT?
Definition at line 307 of file CouenneProblem.hpp.
References logObbtLev_.
int CouenneProblem::logAbtLev | ( | ) | const [inline] |
How often shall we do ABT?
Definition at line 308 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).
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. ![]() ![]() ![]() |
with or without auxiliaries?
aux | name of the mod file |
Definition at line 19 of file writeAMPL.cpp.
References AUX, constraints_, COUENNE_EPS, COUENNE_INFINITY, f, isInteger(), Lb(), nCons(), nVars(), objectives_, print(), Ub(), variables_, and X().
void CouenneProblem::writeGAMS | ( | const std::string & | fname | ) |
Write nonlinear problem to a .gms file.
fname | Name of the .gams file to be written. |
Definition at line 20 of file writeGAMS.cpp.
References AUX, Con(), COUENNE_EPS, COUENNE_INFINITY, f, isInteger(), Lb(), nCons(), nVars(), Obj(), print(), problemName_, Ub(), Var(), and X().
void CouenneProblem::initAuxs | ( | ) | const |
Initialize auxiliary variables and their bounds from original variables.
Definition at line 34 of file problem.cpp.
References AUX, constraints_, COUENNE_EPS, COUENNE_INFINITY, Domain::current(), domain_, isInteger(), J_PROBLEM(), Jnlst(), Lb(), nOrigVars_, numbering_, nVars(), restoreUnusedOriginals(), Ub(), variables_, and X().
Referenced by getIntegerCandidate(), and reformulate().
void CouenneProblem::getAuxs | ( | CouNumber * | ) | const |
Get auxiliary variables from original variables.
Definition at line 133 of file problem.cpp.
References AUX, domain_, Lb(), Domain::lb(), numbering_, nVars(), Domain::pop(), Domain::push(), restoreUnusedOriginals(), Ub(), Domain::ub(), variables_, and X().
Referenced by aggressiveBT(), checkNLP(), and readOptimum().
bool CouenneProblem::boundTightening | ( | t_chg_bounds * | chg_bds, | |
Bonmin::BabInfo * | babInfo = NULL | |||
) | const |
tighten bounds using propagation, implied bounds and reduced costs
Return false if problem turns out to be infeasible with given bounds, true otherwise.
Definition at line 134 of file boundTightening.cpp.
References btCore(), t_chg_bounds::CHANGED, COUENNE_EPS, COUENNE_INFINITY, J_BOUNDTIGHTENING(), Jnlst(), Lb(), Obj(), t_chg_bounds::setLower(), t_chg_bounds::setUpper(), and Ub().
Referenced by obbt_iter().
bool CouenneProblem::btCore | ( | t_chg_bounds * | chg_bds | ) | const |
core of the bound tightening procedure
Definition at line 23 of file boundTightening.cpp.
References COUENNE_EPS, impliedBounds(), installCutOff(), J_BOUNDTIGHTENING(), Jnlst(), Lb(), MAX_BOUND, MAX_BT_ITER, maxCpuTime_, nVars(), optimum_, THRES_IMPROVED, tightenBounds(), Ub(), and Var().
Referenced by boundTightening(), fake_tighten(), and testIntFix().
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.
OBBT has tightened, add improved bounds
Definition at line 140 of file obbt.cpp.
References doOBBT_, J_BOUNDTIGHTENING(), jnlst_, logObbtLev_, MAX_OBBT_ITER, maxCpuTime_, nVars(), obbtInner(), sparse2dense(), and THRES_NBD_CHANGED.
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
Definition at line 45 of file aggressiveBT.cpp.
References COUENNE_EPS, COUENNE_INFINITY, distanceToBound(), evalOrder(), fake_tighten(), getAuxs(), Bonmin::OsiTMINLPInterface::getColSolution(), getCutOff(), getIntegerCandidate(), Bonmin::OsiTMINLPInterface::getObjValue(), Bonmin::OsiTMINLPInterface::isProvenOptimal(), J_BOUNDTIGHTENING(), Jnlst(), jnlst_, Lb(), MAX_ABT_ITER, maxCpuTime_, nOrigVars_, nVars(), Obj(), THRES_ABT_IMPROVED, THRES_ABT_ORIG, Ub(), Var(), and X().
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.
Definition at line 173 of file boundTightening.cpp.
References t_chg_bounds::CHANGED, COUENNE_EPS, COUENNE_INFINITY, getCutOff(), isInteger(), J_BOUNDTIGHTENING(), jnlst_, Lb(), nVars(), Obj(), t_chg_bounds::setLower(), t_chg_bounds::setUpper(), Ub(), Var(), x, and X().
int CouenneProblem::tightenBounds | ( | t_chg_bounds * | ) | const |
"Forward" bound tightening, that is, propagate bound of variable in an expression
to the bounds of
.
Definition at line 19 of file tightenBounds.cpp.
References AUX, t_chg_bounds::CHANGED, COUENNE_EPS, COUENNE_INFINITY, domain_, isInteger(), J_BOUNDTIGHTENING(), Jnlst(), Lb(), ll, MAX_BOUND, numbering_, nVars(), optimum_, print(), t_chg_bounds::setLower(), t_chg_bounds::setUpper(), Ub(), Var(), and variables_.
Referenced by btCore().
int CouenneProblem::impliedBounds | ( | t_chg_bounds * | ) | const |
"Backward" bound tightening, aka implied bounds.
Definition at line 15 of file impliedBounds.cpp.
References AUX, COUENNE_EPS, domain_, J_BOUNDTIGHTENING(), Jnlst(), Lb(), Domain::lb(), numbering_, nVars(), print(), Ub(), Domain::ub(), and variables_.
Referenced by btCore().
void CouenneProblem::fillQuadIndices | ( | ) |
Look for quadratic terms to be used with SDP cuts.
Definition at line 13 of file fillQuadIndices.cpp.
Referenced by reformulate().
void CouenneProblem::fillObjCoeff | ( | double *& | ) |
Fill vector with coefficients of objective function.
Definition at line 175 of file problem.cpp.
References COU_EXPRCONST, COU_EXPRGROUP, COU_EXPRMUL, COU_EXPRSUB, COU_EXPRSUM, COU_EXPRVAR, J_PROBLEM(), Jnlst(), n, and objectives_.
Replace all occurrences of original variable with new aux given as argument.
Definition at line 21 of file auxiliarize.cpp.
References AUX, constraints_, objectives_, print(), VAR, and variables_.
Referenced by standardize().
void CouenneProblem::setCutOff | ( | CouNumber | cutoff | ) | const |
Set cutoff.
Definition at line 260 of file problem.cpp.
References COUENNE_EPS, getCutOff(), isInteger(), J_PROBLEM(), Jnlst(), objectives_, pcutoff_, SafeCutoff, and Var().
Referenced by getIntegerCandidate(), readCutoff(), and reformulate().
CouNumber CouenneProblem::getCutOff | ( | ) | const [inline] |
Set cutoff.
Definition at line 385 of file CouenneProblem.hpp.
References pcutoff_.
Referenced by aggressiveBT(), fake_tighten(), getIntegerCandidate(), installCutOff(), redCostBT(), and setCutOff().
void CouenneProblem::installCutOff | ( | ) | const |
Make cutoff known to the problem.
Definition at line 282 of file problem.cpp.
References getCutOff(), J_PROBLEM(), jnlst_, objectives_, pcutoff_, and Ub().
Referenced by btCore().
ConstJnlstPtr CouenneProblem::Jnlst | ( | ) | const [inline] |
Provide Journalist.
Definition at line 392 of file CouenneProblem.hpp.
References jnlst_.
Referenced by aggressiveBT(), boundTightening(), btCore(), checkNLP(), fake_tighten(), fillObjCoeff(), impliedBounds(), initAuxs(), obbt_iter(), setCutOff(), and tightenBounds().
bool CouenneProblem::checkNLP | ( | const double * | solution, | |
double & | obj, | |||
bool | recompute = false | |||
) | const |
Check if solution is MINLP feasible.
Definition at line 15 of file checkNLP.cpp.
References AUX, c, Con(), COUENNE_INFINITY, COUENNE_round, domain_, feas_tolerance_, getAuxs(), isInteger(), J_PROBLEM(), Jnlst(), Lb(), Domain::lb(), nCons(), nOrigVars_, nVars(), Obj(), Domain::pop(), print(), Domain::push(), Ub(), Domain::ub(), VAR, variables_, and Domain::x().
Referenced by getIntegerCandidate().
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
Generate integer NLP point xInt starting from fractional solution xFrac, using (feasibility-based, i.e. cheap) bound tightening
return -1 if the problem is infeasible
Definition at line 26 of file getIntegerCandidate.cpp.
References checkNLP(), CONTINUOUS, COUENNE_EPS, COUENNE_round, domain_, fillIntegerRank(), FIXED, getCutOff(), initAuxs(), integerRank_, isInteger(), J_NLPHEURISTIC(), jnlst_, Lb(), maxCpuTime_, nOrigVars_, numberInRank_, nVars(), Obj(), optimum_, Domain::pop(), Domain::push(), restoreUnusedOriginals(), setCutOff(), testIntFix(), Ub(), UNFIXED, Var(), variables_, x, and X().
Referenced by aggressiveBT().
bool CouenneProblem::readOptimum | ( | std::string * | fname = NULL |
) |
Read best known solution from file given in argument.
Definition at line 92 of file problemIO.cpp.
References bestObj_, f, getAuxs(), Lb(), nOrigVars_, nVars(), opt_window_, optimum_, problemName_, and Ub().
Referenced by reformulate().
void CouenneProblem::readCutoff | ( | const std::string & | fname | ) |
Read cutoff value (for testing purposes).
Definition at line 149 of file problemIO.cpp.
References f, and setCutOff().
void CouenneProblem::registerOptions | ( | Ipopt::SmartPtr< Bonmin::RegisteredOptions > | roptions | ) | [static] |
Add list of options to be read from file.
Definition at line 326 of file problem.cpp.
References Bonmin::RegisteredOptions::CouenneCategory, and feas_tolerance_default.
Referenced by CouenneCutGenerator::registerOptions().
exprAux * CouenneProblem::linStandardize | ( | bool | addAux, | |
CouNumber | c0, | |||
LinMap & | lmap, | |||
QuadMap & | qmap | |||
) |
standardization of linear exprOp's
data for exprQuad
data for exprGroup
Definition at line 24 of file linStandardize.cpp.
References addAuxiliary(), analyzeSparsity(), COUENNE_EPS, domain_, indcoe2vector(), lc, li, LinMap::Map(), QuadMap::Map(), print(), and Var().
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
Definition at line 33 of file splitAux.cpp.
References AUX, clone(), CONST, CONSTANT, COU_EXPRGROUP, COU_EXPROPP, COU_EXPRQUAD, COU_EXPRSUB, COU_EXPRSUM, COUENNE_EPS, domain_, elementBreak(), indcoe2vector(), isInteger(), n, print(), standardize(), TAG_AND_RECURSIVE, and VAR.
void CouenneProblem::indcoe2vector | ( | int * | indexL, | |
CouNumber * | coeff, | |||
std::vector< std::pair< exprVar *, CouNumber > > & | lcoeff | |||
) |
translates pair (indices, coefficients) into vector with pointers to variables
Definition at line 134 of file CouenneProblem.cpp.
References Var().
Referenced by linStandardize(), and splitAux().
void CouenneProblem::indcoe2vector | ( | int * | indexI, | |
int * | indexJ, | |||
CouNumber * | coeff, | |||
std::vector< quadElem > & | qcoeff | |||
) |
translates triplet (indicesI, indicesJ, coefficients) into vector with pointers to variables
Definition at line 145 of file CouenneProblem.cpp.
References Var().
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
a constant
a variable
the opposite of a term
a subtraction
a quadratic form
a linear term
a sum of (possibly) nonlinear elements
a product of n factors /////////////////////////////////////////
otherwise, simply standardize expression
Definition at line 30 of file decomposeTerm.cpp.
References addAuxiliary(), CONST, COU_EXPRCONST, COU_EXPRGROUP, COU_EXPRMUL, COU_EXPROPP, COU_EXPRPOW, COU_EXPRQUAD, COU_EXPRSUB, COU_EXPRSUM, COU_EXPRVAR, COUENNE_EPS, flattenMul(), QuadMap::insert(), LinMap::insert(), n, standardize(), and Var().
const std::string& CouenneProblem::problemName | ( | ) | const [inline] |
const std::vector<std::set <int> >& CouenneProblem::Dependence | ( | ) | const [inline] |
return inverse dependence structure
Definition at line 453 of file CouenneProblem.hpp.
References dependence_.
const std::vector<CouenneObject>& CouenneProblem::Objects | ( | ) | const [inline] |
int CouenneProblem::findSOS | ( | OsiSolverInterface * | solver, | |
OsiObject ** | objects | |||
) |
find SOS constraints in problem
Definition at line 23 of file CouenneSOS.cpp.
References AUX, COU_EXPRGROUP, COUENNE_EPS, isInteger(), Lb(), nOrigVars_, print(), Ub(), and variables_.
void CouenneProblem::setMaxCpuTime | ( | double | time | ) | [inline] |
double CouenneProblem::getMaxCpuTime | ( | ) | const [inline] |
void CouenneProblem::setBase | ( | Bonmin::BabSetupBase * | base | ) | [inline] |
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.
Definition at line 17 of file CouenneRestoreUnused.cpp.
References nOrigVars(), numbering_, nUnusedOriginals_, nVars(), unusedOriginalsIndices_, and variables_.
Referenced by reformulate().
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
Definition at line 52 of file CouenneRestoreUnused.cpp.
References domain_, nUnusedOriginals_, nVars(), Domain::push(), unusedOriginalsIndices_, variables_, and X().
Referenced by getAuxs(), getIntegerCandidate(), and initAuxs().
int* CouenneProblem::unusedOriginalsIndices | ( | ) | [inline] |
return indices of neglected redundant variables
Definition at line 489 of file CouenneProblem.hpp.
References unusedOriginalsIndices_.
int CouenneProblem::nUnusedOriginals | ( | ) | [inline] |
number of unused originals
Definition at line 492 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
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 |
Definition at line 60 of file fake_tightening.cpp.
References btCore(), t_chg_bounds::CHANGED, COUENNE_EPS, diff(), exp(), fictBounds(), getCutOff(), isInteger(), J_BOUNDTIGHTENING(), Jnlst(), Lb(), log(), MAX_ITER, nVars(), Obj(), optimum_, t_chg_bounds::setLower(), t_chg_bounds::setUpper(), Ub(), and variables_.
Referenced by aggressiveBT().
int CouenneProblem::obbtInner | ( | CouenneSolverInterface * | , | |
OsiCuts & | , | |||
t_chg_bounds * | , | |||
Bonmin::BabInfo * | ||||
) | const [protected] |
Optimality Based Bound Tightening -- inner loop.
Definition at line 65 of file obbt.cpp.
References AUX, call_iter(), COUENNE_INFINITY, MAX_OBBT_LP_ITERATION, and VAR.
Referenced by obbt().
int CouenneProblem::obbt_iter | ( | CouenneSolverInterface * | csi, | |
t_chg_bounds * | chg_bds, | |||
const CoinWarmStart * | warmstart, | |||
Bonmin::BabInfo * | babInfo, | |||
double * | objcoe, | |||
int | sense, | |||
int | index | |||
) | const [protected] |
Iteration on one variable.
Definition at line 56 of file obbt_iter.cpp.
References AUX, bestSol(), boundTightening(), t_chg_bounds::CHANGED, COUENNE_EPS, doFBBT_, t_chg_bounds::EXACT, isInteger(), J_BOUNDTIGHTENING(), Jnlst(), jnlst_, Lb(), LINEAR, t_chg_bounds::lower(), obbt_updateBound(), Obj(), print(), t_chg_bounds::setLowerBits(), t_chg_bounds::setUpperBits(), STOP_AT_AUX, Ub(), VAR, and Var().
Referenced by call_iter().
int CouenneProblem::call_iter | ( | CouenneSolverInterface * | csi, | |
t_chg_bounds * | chg_bds, | |||
const CoinWarmStart * | warmstart, | |||
Bonmin::BabInfo * | babInfo, | |||
double * | objcoe, | |||
enum nodeType | type, | |||
int | sense | |||
) | const [protected] |
Definition at line 31 of file obbt.cpp.
References evalOrder(), maxCpuTime_, obbt_iter(), and Var().
Referenced by obbtInner().
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
Definition at line 29 of file analyzeSparsity.cpp.
References addAuxiliary(), LinMap::insert(), QuadMap::Map(), MIN_DENSITY, useQuadratic_, and Var().
Referenced by linStandardize().
void CouenneProblem::flattenMul | ( | expression * | mul, | |
CouNumber & | coe, | |||
std::map< int, CouNumber > & | indices | |||
) | [protected] |
re-organizes multiplication and stores indices (and exponents) of its variables
Definition at line 18 of file flattenMul.cpp.
References CONST, COU_EXPRCONST, COU_EXPRMUL, COU_EXPROPP, COU_EXPRPOW, COU_EXPRSUM, COU_EXPRVAR, N_ARY, print(), and standardize().
Referenced by decomposeTerm().
void CouenneProblem::realign | ( | ) | [protected] |
clear all spurious variables pointers not referring to the variables_ vector
Definition at line 300 of file problem.cpp.
References AUX, constraints_, domain_, objectives_, and variables_.
Referenced by CouenneProblem(), and reformulate().
void CouenneProblem::fillDependence | ( | Bonmin::BabSetupBase * | base | ) | [protected] |
fill dependence_ structure
Definition at line 21 of file fillDependence.cpp.
References AUX, dependence_, jnlst_, LINEAR, nVars(), objects_, CouenneObject::Reference(), STOP_AT_AUX, and variables_.
Referenced by reformulate().
void CouenneProblem::fillIntegerRank | ( | ) | const [protected] |
fill freeIntegers_ array
Definition at line 157 of file CouenneProblem.cpp.
References AUX, integerRank_, J_PROBLEM(), jnlst_, nOrigVars_, numbering_, numberInRank_, nVars(), STOP_AT_AUX, Var(), and variables_.
Referenced by getIntegerCandidate().
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()).
Definition at line 15 of file testIntFix.cpp.
References btCore(), t_chg_bounds::CHANGED, COUENNE_EPS, FIXED, J_NLPHEURISTIC(), jnlst_, Lb(), nVars(), Obj(), t_chg_bounds::setLower(), t_chg_bounds::setUpper(), Ub(), and t_chg_bounds::UNCHANGED.
Referenced by getIntegerCandidate().
std::string CouenneProblem::problemName_ [protected] |
problem name
Definition at line 71 of file CouenneProblem.hpp.
Referenced by problemName(), readOptimum(), and writeGAMS().
std::vector<exprVar *> CouenneProblem::variables_ [protected] |
Variables (original, auxiliary, and defined).
Definition at line 73 of file CouenneProblem.hpp.
Referenced by addAuxiliary(), addVariable(), auxiliarize(), checkNLP(), CouenneProblem(), createUnusedOriginals(), fake_tighten(), fillDependence(), fillIntegerRank(), findSOS(), getAuxs(), getIntegerCandidate(), impliedBounds(), initAuxs(), nVars(), print(), realign(), reformulate(), restoreUnusedOriginals(), standardize(), tightenBounds(), Var(), Variables(), writeAMPL(), and ~CouenneProblem().
std::vector<CouenneObjective *> CouenneProblem::objectives_ [protected] |
Definition at line 74 of file CouenneProblem.hpp.
Referenced by addObjective(), auxiliarize(), CouenneProblem(), fillObjCoeff(), installCutOff(), nObjs(), Obj(), print(), realign(), reformulate(), setCutOff(), standardize(), writeAMPL(), and ~CouenneProblem().
std::vector<CouenneConstraint *> CouenneProblem::constraints_ [protected] |
Definition at line 75 of file CouenneProblem.hpp.
Referenced by addEQConstraint(), addGEConstraint(), addLEConstraint(), addRNGConstraint(), auxiliarize(), Con(), CouenneProblem(), initAuxs(), nCons(), print(), realign(), reformulate(), standardize(), writeAMPL(), and ~CouenneProblem().
std::vector<expression *> CouenneProblem::commonexprs_ [protected] |
AMPL's common expressions (read from AMPL through structures cexps and cexps1).
Definition at line 78 of file CouenneProblem.hpp.
Referenced by print(), and standardize().
Domain CouenneProblem::domain_ [mutable, protected] |
current point and bounds;
Definition at line 80 of file CouenneProblem.hpp.
Referenced by addAuxiliary(), checkNLP(), CouenneProblem(), domain(), getAuxs(), getIntegerCandidate(), impliedBounds(), initAuxs(), Lb(), linStandardize(), print(), realign(), reformulate(), restoreUnusedOriginals(), splitAux(), standardize(), tightenBounds(), 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 84 of file CouenneProblem.hpp.
Referenced by addAuxiliary(), AuxSet(), CouenneProblem(), and standardize().
int CouenneProblem::curnvars_ [mutable, protected] |
int CouenneProblem::nIntVars_ [protected] |
Number of discrete variables.
Definition at line 90 of file CouenneProblem.hpp.
Referenced by addVariable(), nIntVars(), and reformulate().
CouNumber* CouenneProblem::optimum_ [mutable, protected] |
Best solution known to be loaded from file -- for testing purposes.
Definition at line 93 of file CouenneProblem.hpp.
Referenced by bestSol(), btCore(), CouenneProblem(), fake_tighten(), getIntegerCandidate(), print(), readOptimum(), tightenBounds(), and ~CouenneProblem().
CouNumber CouenneProblem::bestObj_ [protected] |
Best known objective function.
Definition at line 96 of file CouenneProblem.hpp.
Referenced by bestObj(), print(), and readOptimum().
int* CouenneProblem::quadIndex_ [protected] |
Indices of variables appearing in products (used for SDP cuts).
Definition at line 99 of file CouenneProblem.hpp.
bool* CouenneProblem::commuted_ [protected] |
Variables that have commuted to auxiliary.
Definition at line 102 of file CouenneProblem.hpp.
Referenced by Commuted(), standardize(), and ~CouenneProblem().
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 106 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), createUnusedOriginals(), evalOrder(), evalVector(), fillIntegerRank(), getAuxs(), impliedBounds(), initAuxs(), standardize(), tightenBounds(), and ~CouenneProblem().
int CouenneProblem::ndefined_ [protected] |
Number of "defined variables" (aka "common expressions").
Definition at line 109 of file CouenneProblem.hpp.
Referenced by nDefVars().
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 115 of file CouenneProblem.hpp.
Referenced by addAuxiliary(), getDepGraph(), standardize(), and ~CouenneProblem().
int CouenneProblem::nOrigVars_ [protected] |
Number of original variables.
Definition at line 118 of file CouenneProblem.hpp.
Referenced by addVariable(), aggressiveBT(), checkNLP(), fillIntegerRank(), findSOS(), getIntegerCandidate(), initAuxs(), nOrigVars(), readOptimum(), reformulate(), and standardize().
int CouenneProblem::nOrigCons_ [protected] |
Number of original constraints (disregarding those that turned into auxiliary variable definition).
Definition at line 122 of file CouenneProblem.hpp.
Referenced by nOrigCons(), and reformulate().
int CouenneProblem::nOrigIntVars_ [protected] |
Number of original integer variables.
Definition at line 125 of file CouenneProblem.hpp.
Referenced by nOrigIntVars(), and reformulate().
GlobalCutOff* CouenneProblem::pcutoff_ [mutable, protected] |
Pointer to a global cutoff object.
Definition at line 128 of file CouenneProblem.hpp.
Referenced by getCutOff(), installCutOff(), setCutOff(), and ~CouenneProblem().
bool CouenneProblem::created_pcutoff_ [mutable, protected] |
flag indicating if this class is creator of global cutoff object
Definition at line 131 of file CouenneProblem.hpp.
Referenced by ~CouenneProblem().
bool CouenneProblem::doFBBT_ [protected] |
do Feasibility-based bound tightening
Definition at line 133 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), doFBBT(), and obbt_iter().
bool CouenneProblem::doRCBT_ [protected] |
do reduced cost bound tightening
Definition at line 134 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), and doRCBT().
bool CouenneProblem::doOBBT_ [protected] |
do Optimality-based bound tightening
Definition at line 135 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), doOBBT(), and obbt().
bool CouenneProblem::doABT_ [protected] |
do Aggressive bound tightening
Definition at line 136 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), and doABT().
int CouenneProblem::logObbtLev_ [protected] |
frequency of Optimality-based bound tightening
Definition at line 138 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), logObbtLev(), and obbt().
int CouenneProblem::logAbtLev_ [protected] |
frequency of Aggressive bound tightening
Definition at line 139 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), and logAbtLev().
JnlstPtr CouenneProblem::jnlst_ [protected] |
SmartPointer to the Journalist.
Definition at line 142 of file CouenneProblem.hpp.
Referenced by aggressiveBT(), CouenneProblem(), fillDependence(), fillIntegerRank(), getIntegerCandidate(), installCutOff(), Jnlst(), obbt(), obbt_iter(), redCostBT(), reformulate(), setBase(), and testIntFix().
CouNumber CouenneProblem::opt_window_ [protected] |
window around known optimum (for testing purposes)
Definition at line 145 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), and readOptimum().
bool CouenneProblem::useQuadratic_ [protected] |
Use quadratic expressions?
Definition at line 148 of file CouenneProblem.hpp.
Referenced by analyzeSparsity(), and CouenneProblem().
CouNumber CouenneProblem::feas_tolerance_ [protected] |
feasibility tolerance (to be used in checkNLP)
Definition at line 151 of file CouenneProblem.hpp.
Referenced by checkNLP(), and CouenneProblem().
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 156 of file CouenneProblem.hpp.
Referenced by Dependence(), and fillDependence().
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 161 of file CouenneProblem.hpp.
Referenced by fillDependence(), and Objects().
int* CouenneProblem::integerRank_ [mutable, protected] |
each element is true if variable is integer and, if auxiliary, depends on no integer
Definition at line 165 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), fillIntegerRank(), getIntegerCandidate(), and ~CouenneProblem().
std::vector<int> CouenneProblem::numberInRank_ [mutable, protected] |
numberInRank_ [i] is the number of integer variables in rank i
Definition at line 168 of file CouenneProblem.hpp.
Referenced by fillIntegerRank(), and getIntegerCandidate().
double CouenneProblem::maxCpuTime_ [protected] |
maximum cpu time
Definition at line 171 of file CouenneProblem.hpp.
Referenced by aggressiveBT(), btCore(), call_iter(), getIntegerCandidate(), getMaxCpuTime(), obbt(), and setMaxCpuTime().
Bonmin::BabSetupBase* CouenneProblem::bonBase_ [protected] |
options
Definition at line 174 of file CouenneProblem.hpp.
Referenced by reformulate(), setBase(), and standardize().
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 184 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), createUnusedOriginals(), restoreUnusedOriginals(), unusedOriginalsIndices(), and ~CouenneProblem().
int CouenneProblem::nUnusedOriginals_ [protected] |
number of unused originals
Definition at line 187 of file CouenneProblem.hpp.
Referenced by CouenneProblem(), createUnusedOriginals(), nUnusedOriginals(), and restoreUnusedOriginals().