Couenne 0.5.8
Loading...
Searching...
No Matches
CouenneBranchingObject.hpp
Go to the documentation of this file.
1/* $Id: CouenneBranchingObject.hpp 925 2012-11-27 19:11:04Z stefan $
2 *
3 * Name: CouenneBranchingObject.hpp
4 * Authors: Pierre Bonami, IBM Corp.
5 * Pietro Belotti, Carnegie Mellon University
6 * Purpose: Branching object for auxiliary variables
7 *
8 * (C) Carnegie-Mellon University, 2006-10.
9 * This file is licensed under the Eclipse Public License (EPL)
10 */
11
12#ifndef COUENNEBRANCHINGOBJECT_HPP
13#define COUENNEBRANCHINGOBJECT_HPP
14
15#include "stdio.h"
16#include "CouenneExprAux.hpp"
17#include "CouenneJournalist.hpp"
19
20namespace Couenne {
21
22class CouenneCutGenerator;
23class CouenneProblem;
24
25#define COUENNE_CROP 1
26#define COUENNE_LCROP (1e2*COUENNE_CROP)
27
28#define COUENNE_LARGE_INTERVAL 1e4
29#define COUENNE_NEAR_BOUND 1e-2
30
31
38
39public:
40
44 JnlstPtr jnlst,
47 expression *var,
48 int way,
49 CouNumber brpoint,
50 bool doFBBT,
51 bool doConvCuts);
52
55
57 cutGen_ (src.cutGen_),
58 problem_ (src.problem_),
59 variable_ (src.variable_),
60 jnlst_ (src.jnlst_),
61 doFBBT_ (src.doFBBT_),
65 simulate_ (src.simulate_) {}
66
68 virtual OsiBranchingObject * clone () const
69 {return new CouenneBranchingObject (*this);}
70
76 virtual double branch (OsiSolverInterface * solver = NULL);
77
79 virtual bool boundBranch () const
80 {return !doConvCuts_;} // iff it does not add convexification cuts
81
83 void setSimulate (bool s)
84 {simulate_ = s;}
85
88 {return variable_;}
89
91 void branchCore (OsiSolverInterface *, int, int, bool, double, t_chg_bounds *&);
92
93 // FIXME: horrible global variables. Brrr.
94 static int nOrbBr;
96 static int nSGcomputations;
97
98protected:
99
103
106
112
115
118
121
124
127
130};
131
132}
133
134#endif
bool simulate_
are we currently in strong branching?
JnlstPtr jnlst_
SmartPointer to the Journalist.
bool doConvCuts_
shall we add convexification cuts at branching?
expression * variable_
The index of the variable this branching object refers to.
double downEstimate_
down branch estimate (done at selectBranch with reduced costs)
virtual OsiBranchingObject * clone() const
cloning method
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
CouenneBranchingObject(const CouenneBranchingObject &src)
Copy constructor.
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...
void branchCore(OsiSolverInterface *, int, int, bool, double, t_chg_bounds *&)
Perform branching step.
virtual bool boundBranch() const
does this branching object only change variable bounds?
CouenneBranchingObject(OsiSolverInterface *solver, const OsiObject *originalObject, JnlstPtr jnlst, CouenneCutGenerator *c, CouenneProblem *p, expression *var, int way, CouNumber brpoint, bool doFBBT, bool doConvCuts)
Constructor.
void setSimulate(bool s)
set simulate_ field below
virtual double branch(OsiSolverInterface *solver=NULL)
Execute the actions required to branch, as specified by the current state of the branching object,...
expression * variable()
return branching variable
Cut Generator for linear convexifications.
Class for MINLP problems with symbolic information.
Expression base class.
status of lower/upper bound of a variable, to be checked/modified in bound tightening
const OsiObject * originalObject() const
general include file for different compilers
double CouNumber
main number type in Couenne