source: trunk/Couenne/src/main/CouenneBab.hpp @ 972

Last change on this file since 972 was 888, checked in by stefan, 8 years ago

merge r887 from stable/0.4: bad workaround for sideeffect of other bad workaround

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1/* $Id: CouenneBab.hpp 888 2012-08-06 18:43:55Z tkr $
2 *
3 * Name:    CouenneBab.hpp
4 * Author:  Pietro Belotti
5 * Purpose: B&B object 
6 * Created: 2012-01-25
7 *
8 * This file is licensed under the Eclipse Public License (EPL)
9 */
10
11#ifndef COUENNEBAB_H
12#define COUENNEBAB_H
13
14#include "BonCbc.hpp"
15#include "BonBabSetupBase.hpp"
16
17namespace Couenne {
18
19  class CouenneProblem;
20
21  class CouenneBab: public Bonmin::Bab {
22
23  public:
24
25    CouenneBab (); ///< Constructor
26
27    virtual ~CouenneBab(); ///< Destructor
28
29    void setProblem (CouenneProblem *p);
30
31    virtual void branchAndBound (Bonmin::BabSetupBase &s); ///< Carry out branch and bound
32
33    /// Get the best solution known to the problem (is optimal if
34    /// MipStatus is FeasibleOptimal).  If no solution is known
35    /// returns NULL.
36    const double * bestSolution() const;
37
38    /// Return objective value of the bestSolution
39    double bestObj() const;
40
41    /** return the best known lower bound on the objective value*/
42    double bestBound() { return CoinMin(Bonmin::Bab::bestBound(), bestObj()); }
43
44  protected:
45
46    CouenneProblem *problem_;
47
48  };
49}
50
51#endif
Note: See TracBrowser for help on using the repository browser.