Couenne  0.5.8
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"
18 #include "OsiBranchingObject.hpp"
19 
20 namespace Couenne {
21 
22 class CouenneCutGenerator;
23 class 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 
39 public:
40 
44  JnlstPtr jnlst,
46  CouenneProblem *p,
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;
95  static int maxDepthOrbBranch;
96  static int nSGcomputations;
97 
98 protected:
99 
103 
106 
112 
115 
117  bool doFBBT_;
118 
121 
124 
126  double upEstimate_;
127 
129  bool simulate_;
130 };
131 
132 }
133 
134 #endif
Couenne::t_chg_bounds
status of lower/upper bound of a variable, to be checked/modified in bound tightening
Definition: CouenneTypes.hpp:66
OsiTwoWayBranchingObject
Couenne::CouenneBranchingObject::nOrbBr
static int nOrbBr
Definition: CouenneBranchingObject.hpp:94
OsiObject
OsiBranchingObject.hpp
Couenne::CouenneBranchingObject::clone
virtual OsiBranchingObject * clone() const
cloning method
Definition: CouenneBranchingObject.hpp:68
Couenne::CouenneBranchingObject
"Spatial" branching object.
Definition: CouenneBranchingObject.hpp:37
Couenne::CouenneBranchingObject::branchCore
void branchCore(OsiSolverInterface *, int, int, bool, double, t_chg_bounds *&)
Perform branching step.
Couenne::CouenneCutGenerator
Cut Generator for linear convexifications.
Definition: CouenneCutGenerator.hpp:49
Couenne::CouenneBranchingObject::doConvCuts_
bool doConvCuts_
shall we add convexification cuts at branching?
Definition: CouenneBranchingObject.hpp:120
OsiTwoWayBranchingObject::way
int way() const
Couenne::CouenneBranchingObject::doFBBT_
bool doFBBT_
shall we do Feasibility based Bound Tightening (FBBT) at branching?
Definition: CouenneBranchingObject.hpp:117
Couenne::CouenneBranchingObject::CouenneBranchingObject
CouenneBranchingObject(OsiSolverInterface *solver, const OsiObject *originalObject, JnlstPtr jnlst, CouenneCutGenerator *c, CouenneProblem *p, expression *var, int way, CouNumber brpoint, bool doFBBT, bool doConvCuts)
Constructor.
Couenne
general include file for different compilers
Definition: CouenneAggrProbing.hpp:24
Couenne::CouenneBranchingObject::boundBranch
virtual bool boundBranch() const
does this branching object only change variable bounds?
Definition: CouenneBranchingObject.hpp:79
Couenne::CouenneBranchingObject::maxDepthOrbBranch
static int maxDepthOrbBranch
Definition: CouenneBranchingObject.hpp:95
Couenne::CouenneBranchingObject::nSGcomputations
static int nSGcomputations
Definition: CouenneBranchingObject.hpp:96
Ipopt::SmartPtr< Ipopt::Journalist >
Couenne::CouenneBranchingObject::jnlst_
JnlstPtr jnlst_
SmartPointer to the Journalist.
Definition: CouenneBranchingObject.hpp:114
Couenne::CouNumber
double CouNumber
main number type in Couenne
Definition: CouenneTypes.hpp:100
Couenne::CouenneBranchingObject::CouenneBranchingObject
CouenneBranchingObject(const CouenneBranchingObject &src)
Copy constructor.
Definition: CouenneBranchingObject.hpp:54
Couenne::CouenneBranchingObject::variable_
expression * variable_
The index of the variable this branching object refers to.
Definition: CouenneBranchingObject.hpp:111
CouenneExprAux.hpp
Couenne::CouenneBranchingObject::variable
expression * variable()
return branching variable
Definition: CouenneBranchingObject.hpp:87
OsiSolverInterface
Couenne::CouenneBranchingObject::problem_
CouenneProblem * problem_
Pointer to CouenneProblem (necessary to allow FBBT)
Definition: CouenneBranchingObject.hpp:105
Couenne::CouenneBranchingObject::simulate_
bool simulate_
are we currently in strong branching?
Definition: CouenneBranchingObject.hpp:129
Couenne::CouenneBranchingObject::upEstimate_
double upEstimate_
up branch estimate
Definition: CouenneBranchingObject.hpp:126
OsiTwoWayBranchingObject::branch
virtual double branch()
Couenne::CouenneBranchingObject::setSimulate
void setSimulate(bool s)
set simulate_ field below
Definition: CouenneBranchingObject.hpp:83
OsiBranchingObject::originalObject
const OsiObject * originalObject() const
Couenne::CouenneBranchingObject::downEstimate_
double downEstimate_
down branch estimate (done at selectBranch with reduced costs)
Definition: CouenneBranchingObject.hpp:123
OsiBranchingObject
Couenne::CouenneProblem
Class for MINLP problems with symbolic information.
Definition: CouenneProblem.hpp:169
Couenne::expression
Expression base class.
Definition: CouenneExpression.hpp:48
Couenne::CouenneBranchingObject::cutGen_
CouenneCutGenerator * cutGen_
Pointer to CouenneCutGenerator (if any); if not NULL, allows to do extra cut generation during branch...
Definition: CouenneBranchingObject.hpp:102
CouenneJournalist.hpp