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

Last change on this file since 1313 was 1313, checked in by stefan, 4 months ago

merge branch autotools-update

  • skip travis changes
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1/* $Id: CouenneBab.hpp 1313 2020-01-31 11:17:47Z stefan $
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#include "CouenneConfig.h"
17
18namespace Couenne {
19
20  class CouenneProblem;
21
22  class COUENNELIB_EXPORT CouenneBab: public Bonmin::Bab {
23
24  public:
25
26    CouenneBab (); ///< Constructor
27
28    virtual ~CouenneBab(); ///< Destructor
29
30    void setProblem (CouenneProblem *p);
31
32    virtual void branchAndBound (Bonmin::BabSetupBase &s); ///< Carry out branch and bound
33
34    /// Get the best solution known to the problem (is optimal if
35    /// MipStatus is FeasibleOptimal).  If no solution is known
36    /// returns NULL.
37    const double * bestSolution() const;
38
39    /// Return objective value of the bestSolution
40    double bestObj() const;
41
42    /** return the best known lower bound on the objective value*/
43    double bestBound() { return CoinMin(Bonmin::Bab::bestBound(), bestObj()); }
44
45  protected:
46
47    CouenneProblem *problem_;
48
49  };
50}
51
52#endif
Note: See TracBrowser for help on using the repository browser.