CouenneBranchingObject.hpp

Go to the documentation of this file.
00001 /* $Id: CouenneBranchingObject.hpp 923 2012-11-27 18:55:39Z 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   static int nOrbBr;
00094 
00095 protected:
00096 
00099   CouenneCutGenerator *cutGen_;
00100 
00102   CouenneProblem *problem_;
00103 
00108   expression *variable_;
00109 
00111   JnlstPtr jnlst_;
00112 
00114   bool doFBBT_;
00115 
00117   bool doConvCuts_;
00118 
00120   double downEstimate_;
00121 
00123   double upEstimate_;
00124 
00126   bool simulate_;
00127 };
00128 
00129 }
00130 
00131 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 17 Sep 2013 for Couenne by  doxygen 1.6.1