source: branches/Couenne/Couenne/src/branch/CouenneBranchingObject.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:    CouenneBranchingObject.hpp
3 * Authors: Pierre Bonami, IBM Corp.
4 *          Pietro Belotti, Carnegie Mellon University
5 * Purpose: Branching object for auxiliary variables
6 *
7 * (C) Pietro Belotti. This file is licensed under the Common Public License (CPL)
8 */
9
10#ifndef COUENNEBRANCHINGOBJECT_HPP
11#define COUENNEBRANCHINGOBJECT_HPP
12
13#include <CoinFinite.hpp>
14#include <OsiBranchingObject.hpp>
15#include <exprAux.h>
16
17#define COUENNE_CROP 1
18#define COUENNE_LCROP (1e2*COUENNE_CROP)
19
20#define COUENNE_LARGE_INTERVAL 1e4
21#define COUENNE_NEAR_BOUND 1e-2
22
23
24/// "Spatial" Branching object. Branching can also be performed on
25/// continuous variables.
26
27class CouenneBranchingObject: public OsiTwoWayBranchingObject {
28
29public:
30
31  /// return global value for convex combination between current point
32  /// and midpoint
33  static CouNumber Alpha () {return alpha_;}
34
35  /// Constructor
36  CouenneBranchingObject (expression * = NULL);
37
38  /// Copy constructor
39  CouenneBranchingObject (const CouenneBranchingObject &src):
40    OsiTwoWayBranchingObject (src),
41    reference_ (src.reference_) {}
42
43  /// Cloning method
44  virtual OsiBranchingObject * clone() const
45  {return new CouenneBranchingObject (*this);}
46
47  /** \brief Execute the actions required to branch, as specified by the
48             current state of the branching object, and advance the object's
49             state.
50             Returns change in guessed objective on next branch
51  */
52  virtual double branch (OsiSolverInterface * solver = NULL);
53
54protected:
55
56  /// The variable this branching object refers to. If the
57  /// corresponding CouenneObject was created on w=f(x,y), it is
58  /// either x or y, chosen previously with a call to getFixVar()
59  expression *reference_;
60
61  /// Global value for convex combination between current point and
62  /// midpoint
63  static CouNumber alpha_;
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.