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),
93 double now = CoinCpuTime ();
100 jnlst_ -> Printf (Ipopt::J_ERROR,
J_PROBLEM,
"Couenne was compiled without the ASL library. Cannot process ASL structure.\n");
104 if ((now = (CoinCpuTime () - now)) > 10.)
106 "Couenne: reading time %.3fs\n", now);
110 auxSet_ =
new std::set <exprAux *, compExpr>;
127 problemName_ (p.problemName_),
130 nIntVars_ (p.nIntVars_),
132 bestObj_ (p.bestObj_),
135 ndefined_ (p.ndefined_),
137 nOrigVars_ (p.nOrigVars_),
138 nOrigCons_ (p.nOrigCons_),
139 nOrigIntVars_ (p.nOrigIntVars_),
140 pcutoff_ (p.pcutoff_),
141 created_pcutoff_ (false),
142 doFBBT_ (p. doFBBT_),
143 doRCBT_ (p. doRCBT_),
144 doOBBT_ (p. doOBBT_),
146 logObbtLev_ (p. logObbtLev_),
147 logAbtLev_ (p. logAbtLev_),
149 opt_window_ (p.opt_window_),
150 useQuadratic_ (p.useQuadratic_),
151 feas_tolerance_ (p.feas_tolerance_),
152 dependence_ (p.dependence_),
153 objects_ (p.objects_),
155 numberInRank_ (p.numberInRank_),
156 maxCpuTime_ (p.maxCpuTime_),
157 bonBase_ (p.bonBase_),
161 unusedOriginalsIndices_ (NULL),
162 nUnusedOriginals_ (p.nUnusedOriginals_),
163 multilinSep_ (p.multilinSep_),
164 max_fbbt_iter_ (p.max_fbbt_iter_),
165 orbitalBranching_ (p.orbitalBranching_),
166 constObjVal_ (p.constObjVal_),
168 nauty_info (p.nauty_info) {
172 for (
int i=0; i < p.
nVars (); i++)
175 for (
int i=0; i < p.
nVars (); i++) {
180 for (std::vector <CouenneObject *>::iterator i =
objects_.begin ();
182 (*i) = (*i) ->
clone ();
237 for (std::vector <CouenneObjective *>::iterator i =
objectives_ . begin ();
242 for (std::vector <CouenneConstraint *>::iterator i =
constraints_ . begin ();
263 for (std::vector <CouenneObject *>::iterator i =
objects_.begin ();
283 options -> GetStringValue (
"use_quadratic", s,
"couenne.");
useQuadratic_ = (s ==
"yes");
284 options -> GetStringValue (
"feasibility_bt", s,
"couenne.");
doFBBT_ = (s ==
"yes");
285 options -> GetStringValue (
"redcost_bt", s,
"couenne.");
doRCBT_ = (s ==
"yes");
286 options -> GetStringValue (
"optimality_bt", s,
"couenne.");
doOBBT_ = (s ==
"yes");
287 options -> GetStringValue (
"aggressive_fbbt", s,
"couenne.");
doABT_ = (s ==
"yes");
289 options -> GetIntegerValue (
"log_num_obbt_per_level",
logObbtLev_,
"couenne.");
290 options -> GetIntegerValue (
"log_num_abt_per_level",
logAbtLev_,
"couenne.");
292 options -> GetIntegerValue (
"max_fbbt_iter",
max_fbbt_iter_,
"couenne.");
294 options -> GetNumericValue (
"feas_tolerance",
feas_tolerance_,
"couenne.");
295 options -> GetNumericValue (
"opt_window",
opt_window_,
"couenne.");
297 options -> GetStringValue (
"multilinear_separation", s,
"couenne.");
302 options -> GetStringValue (
"orbital_branching", s,
"couenne.");
orbitalBranching_ = (s ==
"yes");
304 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
CouenneBTPerfIndicator * perfIndicator_
Performance indicator for FBBT – to be moved away from CouenneProblem when we do it with FBBT...
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
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)
bool doFBBT_
do Feasibility-based bound tightening