13 #include "CoinHelperFunctions.hpp"
14 #include "CoinTime.hpp"
44 using namespace Couenne;
46 #define MAX_FBBT_ITER 3
57 bestObj_ (COIN_DBL_MAX),
65 created_pcutoff_ (true),
73 opt_window_ (COIN_DBL_MAX),
74 useQuadratic_ (false),
77 maxCpuTime_ (COIN_DBL_MAX),
82 unusedOriginalsIndices_ (NULL),
83 nUnusedOriginals_ (-1),
86 orbitalBranching_ (false),
94 double now = CoinCpuTime ();
101 jnlst_ -> Printf (Ipopt::J_ERROR,
J_PROBLEM,
"Couenne was compiled without the ASL library. Cannot process ASL structure.\n");
105 if ((now = (CoinCpuTime () - now)) > 10.)
107 "Couenne: reading time %.3fs\n", now);
111 auxSet_ =
new std::set <exprAux *, compExpr>;
128 problemName_ (p.problemName_),
131 nIntVars_ (p.nIntVars_),
133 bestObj_ (p.bestObj_),
136 ndefined_ (p.ndefined_),
138 nOrigVars_ (p.nOrigVars_),
139 nOrigCons_ (p.nOrigCons_),
140 nOrigIntVars_ (p.nOrigIntVars_),
141 pcutoff_ (p.pcutoff_),
142 created_pcutoff_ (false),
143 doFBBT_ (p. doFBBT_),
144 doRCBT_ (p. doRCBT_),
145 doOBBT_ (p. doOBBT_),
147 logObbtLev_ (p. logObbtLev_),
148 logAbtLev_ (p. logAbtLev_),
150 opt_window_ (p.opt_window_),
151 useQuadratic_ (p.useQuadratic_),
152 feas_tolerance_ (p.feas_tolerance_),
153 dependence_ (p.dependence_),
154 objects_ (p.objects_),
156 numberInRank_ (p.numberInRank_),
157 maxCpuTime_ (p.maxCpuTime_),
158 bonBase_ (p.bonBase_),
162 unusedOriginalsIndices_ (NULL),
163 nUnusedOriginals_ (p.nUnusedOriginals_),
164 multilinSep_ (p.multilinSep_),
165 max_fbbt_iter_ (p.max_fbbt_iter_),
166 orbitalBranching_ (p.orbitalBranching_),
167 constObjVal_ (p.constObjVal_),
170 nauty_info (p.nauty_info) {
174 for (
int i=0; i < p.
nVars (); i++)
177 for (
int i=0; i < p.
nVars (); i++) {
182 for (std::vector <CouenneObject *>::iterator i =
objects_.begin ();
184 (*i) = (*i) ->
clone ();
242 for (std::vector <CouenneObjective *>::iterator i =
objectives_ . begin ();
247 for (std::vector <CouenneConstraint *>::iterator i =
constraints_ . begin ();
268 for (std::vector <CouenneObject *>::iterator i =
objects_.begin ();
288 options -> GetStringValue (
"use_quadratic", s,
"couenne.");
useQuadratic_ = (s ==
"yes");
289 options -> GetStringValue (
"feasibility_bt", s,
"couenne.");
doFBBT_ = (s ==
"yes");
290 options -> GetStringValue (
"redcost_bt", s,
"couenne.");
doRCBT_ = (s ==
"yes");
291 options -> GetStringValue (
"optimality_bt", s,
"couenne.");
doOBBT_ = (s ==
"yes");
292 options -> GetStringValue (
"aggressive_fbbt", s,
"couenne.");
doABT_ = (s ==
"yes");
294 options -> GetIntegerValue (
"log_num_obbt_per_level",
logObbtLev_,
"couenne.");
295 options -> GetIntegerValue (
"log_num_abt_per_level",
logAbtLev_,
"couenne.");
297 options -> GetIntegerValue (
"max_fbbt_iter",
max_fbbt_iter_,
"couenne.");
299 options -> GetNumericValue (
"feas_tolerance",
feas_tolerance_,
"couenne.");
300 options -> GetNumericValue (
"opt_window",
opt_window_,
"couenne.");
302 options -> GetStringValue (
"multilinear_separation", s,
"couenne.");
307 options -> GetStringValue (
"orbital_branching", s,
"couenne.");
orbitalBranching_ = (s ==
"yes");
309 options -> GetStringValue (
"quadrilinear_decomp", s,
"couenne.");
void realign()
clear all spurious variables pointers not referring to the variables_ vector
GlobalCutOff * pcutoff_
Pointer to a global cutoff object.
const CouNumber feas_tolerance_default
int nVars() const
Total number of variables.
CouenneProblem(ASL *=NULL, Bonmin::BabSetupBase *base=NULL, JnlstPtr jnlst=NULL)
Constructor.
int max_fbbt_iter_
number of FBBT iterations
std::vector< CouenneObjective * > objectives_
Objectives.
~CouenneProblem()
Destructor.
bool doABT_
do Aggressive bound tightening
DepGraph * graph_
Dependence (acyclic) graph: shows dependence of all auxiliary variables on one another and on origina...
int * integerRank_
each element is true if variable is integer and, if auxiliary, depends on no integer ...
CouenneSdpCuts * sdpCutGen_
Temporary pointer to SDP cut generator.
bool IsValid(const OSSmartPtr< U > &smart_ptr)
std::set< exprAux *, compExpr > * auxSet_
Expression map for comparison in standardization and to count occurrences of an auxiliary.
These are cuts of the form.
int logAbtLev_
frequency of Aggressive bound tightening
bool doOBBT_
do Optimality-based bound tightening
CouenneBTPerfIndicator * OBBTperfIndicator_
Performance indicator for OBBT – to be moved away from CouenneProblem.
int nUnusedOriginals_
number of unused originals
void initOptions(Ipopt::SmartPtr< Ipopt::OptionsList > options)
initializes parameters like doOBBT
std::vector< CouenneObject * > objects_
vector of pointer to CouenneObjects.
A class to have all elements necessary to setup a branch-and-bound.
CouenneProblem * clone() const
Clone method (for use within CouenneCutGenerator::clone)
CouNumber opt_window_
window around known optimum (for testing purposes)
std::vector< CouenneConstraint * > constraints_
Constraints.
CouenneConstraint * Con(int i) const
i-th constraint
bool created_pcutoff_
flag indicating if this class is creator of global cutoff object
Class for MINLP problems with symbolic information.
void fint fint fint fint fint fint fint fint fint fint real real real real real real real real * s
exprVar * Var(int i) const
Return pointer to i-th variable.
std::vector< exprVar * > variables_
Variables (original, auxiliary, and defined)
CouenneRecordBestSol * recBSol
bool * commuted_
Variables that have commuted to auxiliary.
enum TrilinDecompType trilinDecompType_
return type of decomposition of quadrilinear terms
Domain domain_
current point and bounds;
int * numbering_
numbering of variables.
CouNumber * optimum_
Best solution known to be loaded from file – for testing purposes.
bool orbitalBranching_
use orbital branching?
CouNumber feas_tolerance_
feasibility tolerance (to be used in checkNLP)
bool useQuadratic_
Use quadratic expressions?
int logObbtLev_
frequency of Optimality-based bound tightening
enum multiSep multilinSep_
Type of Multilinear separation.
int nCons() const
Get number of constraints.
int * unusedOriginalsIndices_
some originals may be unused due to their zero multiplicity (that happens when they are duplicates)...
JnlstPtr jnlst_
SmartPointer to the Journalist.
CouenneObjective * Obj(int i) const
i-th objective
bool doRCBT_
do reduced cost bound tightening
int nObjs() const
Get number of objectives.
const Ipopt::EJournalCategory J_PROBLEM(Ipopt::J_USER4)
CouenneBTPerfIndicator * FBBTperfIndicator_
Performance indicator for FBBT – to be moved away from CouenneProblem when we do it with FBBT...
bool doFBBT_
do Feasibility-based bound tightening