# CouenneBranchingObject.hpp

Go to the documentation of this file.

    00001 /* $Id: CouenneBranchingObject.hpp 925 2012-11-27 19:11:04Z stefan $
    00002  *
    00003  * Name:    CouenneBranchingObject.hpp
    00004  * Authors: Pierre Bonami, IBM Corp.
    00005  *          Pietro Belotti, Carnegie Mellon University
    00006  * Purpose: Branching object for auxiliary variables
    00007  *
    00008  * (C) Carnegie-Mellon University, 2006-10.
    00009  * This file is licensed under the Eclipse Public License (EPL)
    00010  */
    00011
    00012 #ifndef COUENNEBRANCHINGOBJECT_HPP
    00013 #define COUENNEBRANCHINGOBJECT_HPP
    00014
    00015 #include "stdio.h"
    00016 #include "CouenneExprAux.hpp"
    00017 #include "CouenneJournalist.hpp"
    00018 #include "OsiBranchingObject.hpp"
    00019
    00020 namespace Couenne {
    00021
    00022 class CouenneCutGenerator;
    00023 class CouenneProblem;
    00024
    00025 #define COUENNE_CROP 1
    00026 #define COUENNE_LCROP (1e2*COUENNE_CROP)
    00027
    00028 #define COUENNE_LARGE_INTERVAL 1e4
    00029 #define COUENNE_NEAR_BOUND 1e-2
    00030
    00031
    00037 class CouenneBranchingObject: public OsiTwoWayBranchingObject {
    00038
    00039 public:
    00040
    00042   CouenneBranchingObject (OsiSolverInterface *solver,
    00043                           const OsiObject *originalObject,
    00044                           JnlstPtr jnlst,
    00045                           CouenneCutGenerator *c,
    00046                           CouenneProblem *p,
    00047                           expression *var,
    00048                           int way,
    00049                           CouNumber brpoint,
    00050                           bool doFBBT,
    00051                           bool doConvCuts);
    00052
    00054   CouenneBranchingObject (const CouenneBranchingObject &src):
    00055
    00056     OsiTwoWayBranchingObject (src),
    00057     cutGen_       (src.cutGen_),
    00058     problem_      (src.problem_),
    00059     variable_     (src.variable_),
    00060     jnlst_        (src.jnlst_),
    00061     doFBBT_       (src.doFBBT_),
    00062     doConvCuts_   (src.doConvCuts_),
    00063     downEstimate_ (src.downEstimate_),
    00064     upEstimate_   (src.upEstimate_),
    00065     simulate_     (src.simulate_) {}
    00066
    00068   virtual OsiBranchingObject * clone () const
    00069   {return new CouenneBranchingObject (*this);}
    00070
    00076   virtual double branch (OsiSolverInterface * solver = NULL);
    00077
    00079   virtual bool boundBranch () const
    00080   {return !doConvCuts_;} // iff it does not add convexification cuts
    00081
    00083   void setSimulate (bool s)
    00084   {simulate_ = s;}
    00085
    00087   expression *variable ()
    00088   {return variable_;}
    00089
    00091   void branchCore (OsiSolverInterface *, int, int, bool, double, t_chg_bounds *&);
    00092
    00093   // FIXME: horrible global variables. Brrr.
    00094   static int nOrbBr;
    00095   static int maxDepthOrbBranch;
    00096   static int nSGcomputations;
    00097
    00098 protected:
    00099
    00102   CouenneCutGenerator *cutGen_;
    00103
    00105   CouenneProblem *problem_;
    00106
    00111   expression *variable_;
    00112
    00114   JnlstPtr jnlst_;
    00115
    00117   bool doFBBT_;
    00118
    00120   bool doConvCuts_;
    00121
    00123   double downEstimate_;
    00124
    00126   double upEstimate_;
    00127
    00129   bool simulate_;
    00130 };
    00131
    00132 }
    00133
    00134 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines