00001 /* $Id: CouenneBab.hpp 888 2012-08-06 18:43:55Z stefan $ 00002 * 00003 * Name: CouenneBab.hpp 00004 * Author: Pietro Belotti 00005 * Purpose: B&B object 00006 * Created: 2012-01-25 00007 * 00008 * This file is licensed under the Eclipse Public License (EPL) 00009 */ 00010 00011 #ifndef COUENNEBAB_H 00012 #define COUENNEBAB_H 00013 00014 #include "BonCbc.hpp" 00015 #include "BonBabSetupBase.hpp" 00016 00017 namespace Couenne { 00018 00019 class CouenneProblem; 00020 00021 class CouenneBab: public Bonmin::Bab { 00022 00023 public: 00024 00025 CouenneBab (); 00026 00027 virtual ~CouenneBab(); 00028 00029 void setProblem (CouenneProblem *p); 00030 00031 virtual void branchAndBound (Bonmin::BabSetupBase &s); 00032 00036 const double * bestSolution() const; 00037 00039 double bestObj() const; 00040 00042 double bestBound() { return CoinMin(Bonmin::Bab::bestBound(), bestObj()); } 00043 00044 protected: 00045 00046 CouenneProblem *problem_; 00047 00048 }; 00049 } 00050 00051 #endif
1.6.1