11 #include "CoinHelperFunctions.hpp"
13 #include "OsiRowCut.hpp"
21 using namespace Ipopt;
22 using namespace Couenne;
34 CouenneComplBranchingObject::CouenneComplBranchingObject (OsiSolverInterface *solver,
35 const OsiObject * originalObject,
43 bool doFBBT,
bool doConvCuts,
int sign):
45 CouenneBranchingObject (solver, originalObject, jnlst, c, p, var, way, brpoint, doFBBT, doConvCuts),
50 "Complem. Branch: x%-3d = 0 or x%-3d = 0\n",
68 way = (!branchIndex_) ? firstBranch_ : !firstBranch_,
94 solver -> setColLower (index, 0.);
95 solver -> setColUpper (index, 0.);
100 solver -> setColUpper (ind0, 0.);
101 solver -> setColLower (ind1, 0.);
103 solver -> setColLower (ind0, 0.);
104 solver -> setColUpper (ind1, 0.);
108 solver -> setColLower (ind0, 0.);
109 solver -> setColLower (ind1, 0.);
111 solver -> setColUpper (ind0, 0.);
112 solver -> setColUpper (ind1, 0.);
123 objind =
problem_ -> Obj (0) -> Body () -> Index ();
135 problem_ -> domain () -> push (nvars,
136 solver -> getColSolution (),
137 solver -> getColLower (),
138 solver -> getColUpper ());
163 *lb = solver -> getColLower (),
164 *ub = solver -> getColUpper ();
167 estimate = CoinMax (0., objind >= 0 ?
problem_ -> Lb (objind) - lb [objind] : 0.);
172 for (
int i=0; i<nvars; i++) {
173 if (
problem_ -> Lb (i) > lb [i]) solver -> setColLower (i,
problem_ -> Lb (i));
174 if (
problem_ -> Ub (i) < ub [i]) solver -> setColUpper (i,
problem_ -> Ub (i));
182 int nchanged, *changed = NULL;
187 cutGen_ -> genRowCuts (*solver, cs, nchanged, changed, chg_bds);
190 solver -> applyCuts (cs);
201 return (infeasible ? COIN_DBL_MAX : estimate);
Cut Generator for linear convexifications.
CouenneProblem * problem_
Pointer to CouenneProblem (necessary to allow FBBT)
CouenneCutGenerator * cutGen_
Pointer to CouenneCutGenerator (if any); if not NULL, allows to do extra cut generation during branch...
JnlstPtr jnlst_
SmartPointer to the Journalist.
virtual double branch(OsiSolverInterface *solver=NULL)
Execute the actions required to branch, as specified by the current state of the branching object...
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
void setLower(ChangeStatus lower)
void sparse2dense(int ncols, t_chg_bounds *chg_bds, int *&changed, int &nchanged)
translate sparse to dense vector (should be replaced)
"Spatial" branching object.
const Ipopt::EJournalCategory J_BRANCHING(Ipopt::J_USER1)
void sparse2dense(int ncols, t_chg_bounds *chg_bds, int *&changed, int &nchanged)
translate sparse to dense vector (should be replaced)
void setUpper(ChangeStatus upper)
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
Class for MINLP problems with symbolic information.
static const int infeasible
double CouNumber
main number type in Couenne
bool simulate_
are we currently in strong branching?
expression * variable_
The index of the variable this branching object refers to.
bool doConvCuts_
shall we add convexification cuts at branching?
expression * variable2_
use CouenneBranchingObject::variable_ as the first variable to set to 0, and this one as the second ...
int sign_
-1 if object is for xi * xj <= 0 +1 if object is for xi * xj <= 0 0 if object is for xi * xj = 0 (cla...