source: branches/Couenne/Couenne/src/branch/CouenneThreeWayBranchObj.hpp @ 534

Last change on this file since 534 was 534, checked in by pbelotti, 13 years ago

moved include files to make them doxygenable. Introduced three-way branching, with fixed intervals for now. Added check for small bound interval within all generateCuts()

File size: 1.8 KB
Line 
1/*
2 * Name:    CouenneThreeWayBranchObj.hpp
3 * Authors: Pierre Bonami, IBM Corp.
4 *          Pietro Belotti, Carnegie Mellon University
5 * Purpose: Three way branching object for auxiliary variables
6 *
7 * (C) Pietro Belotti. This file is licensed under the Common Public License (CPL)
8 */
9
10#ifndef COUENNETHREEWAYBRANCHOBJ_HPP
11#define COUENNETHREEWAYBRANCHOBJ_HPP
12
13#include <CoinFinite.hpp>
14#include <OsiBranchingObject.hpp>
15#include <exprAux.h>
16
17
18/// Spatial, three-way branching object. Branching is performed on
19/// continuous variables but a better convexification is sought around
20/// the current point by dividing the interval in three parts
21
22class CouenneThreeWayBranchObj: public OsiBranchingObject {
23
24public:
25
26  /// Constructor
27  CouenneThreeWayBranchObj (expression *, CouNumber, CouNumber, CouNumber);
28
29  /// Copy constructor
30  CouenneThreeWayBranchObj (const CouenneThreeWayBranchObj &src):
31    OsiBranchingObject (src),
32    reference_ (src.reference_),
33    lcrop_     (src.lcrop_),
34    rcrop_     (src.rcrop_) {}
35
36  /// Cloning method
37  virtual OsiBranchingObject * clone () const
38  {return new CouenneThreeWayBranchObj (*this);}
39
40  /** \brief Execute the actions required to branch, as specified by the
41             current state of the branching object, and advance the object's
42             state.
43             Returns change in guessed objective on next (what does
44             "next" mean here?) branch
45  */
46  virtual double branch (OsiSolverInterface * solver = NULL);
47
48protected:
49
50  /// The variable this branching object refers to. If the
51  /// corresponding CouenneObject was created on w=f(x,y), it is
52  /// either x or y.
53  expression *reference_;
54
55  /// Dividing points of interval
56  CouNumber lcrop_;
57  CouNumber rcrop_;
58
59  /// first branch to be performed: 0 is left, 1 is central, 2 is right
60  int first_;
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.