CouenneBranchingObject.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
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_;}
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 protected:
00094
00097 CouenneCutGenerator *cutGen_;
00098
00100 CouenneProblem *problem_;
00101
00106 expression *variable_;
00107
00109 JnlstPtr jnlst_;
00110
00112 bool doFBBT_;
00113
00115 bool doConvCuts_;
00116
00118 double downEstimate_;
00119
00121 double upEstimate_;
00122
00124 bool simulate_;
00125 };
00126
00127 }
00128
00129 #endif