00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef COUENNEBRANCHINGOBJECT_HPP
00013 #define COUENNEBRANCHINGOBJECT_HPP
00014
00015 #include "CoinFinite.hpp"
00016 #include "exprAux.hpp"
00017 #include "CouenneJournalist.hpp"
00018 #include "OsiBranchingObject.hpp"
00019
00020 class CouenneCutGenerator;
00021 class CouenneProblem;
00022
00023 #define COUENNE_CROP 1
00024 #define COUENNE_LCROP (1e2*COUENNE_CROP)
00025
00026 #define COUENNE_LARGE_INTERVAL 1e4
00027 #define COUENNE_NEAR_BOUND 1e-2
00028
00029
00035 class CouenneBranchingObject: public OsiTwoWayBranchingObject {
00036
00037 public:
00038
00040 CouenneBranchingObject (OsiSolverInterface *solver,
00041 const OsiObject *originalObject,
00042 JnlstPtr jnlst,
00043 CouenneCutGenerator *c,
00044 CouenneProblem *p,
00045 expression *var,
00046 int way,
00047 CouNumber brpoint,
00048 bool doFBBT,
00049 bool doConvCuts);
00050
00052 CouenneBranchingObject (const CouenneBranchingObject &src):
00053
00054 OsiTwoWayBranchingObject (src),
00055 cutGen_ (src.cutGen_),
00056 problem_ (src.problem_),
00057 variable_ (src.variable_),
00058 jnlst_ (src.jnlst_),
00059 doFBBT_ (src.doFBBT_),
00060 doConvCuts_ (src.doConvCuts_),
00061 downEstimate_ (src.downEstimate_),
00062 upEstimate_ (src.upEstimate_),
00063 simulate_ (src.simulate_) {}
00064
00066 virtual OsiBranchingObject * clone () const
00067 {return new CouenneBranchingObject (*this);}
00068
00074 virtual double branch (OsiSolverInterface * solver = NULL);
00075
00077 virtual bool boundBranch () const
00078 {return !doConvCuts_;}
00079
00081 void setSimulate (bool s)
00082 {simulate_ = s;}
00083
00085 expression *variable ()
00086 {return variable_;}
00087
00088 protected:
00089
00092 CouenneCutGenerator *cutGen_;
00093
00095 CouenneProblem *problem_;
00096
00101 expression *variable_;
00102
00104 JnlstPtr jnlst_;
00105
00107 bool doFBBT_;
00108
00110 bool doConvCuts_;
00111
00113 double downEstimate_;
00114
00116 double upEstimate_;
00117
00119 bool simulate_;
00120 };
00121
00122 #endif