source: trunk/Samples/CbcBranchUser.hpp @ 2

Last change on this file since 2 was 2, checked in by ladanyi, 15 years ago

Import of Coin Branch-and-Cut (formerly known as Sbb)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1// Copyright (C) 2002, International Business Machines
2// Corporation and others.  All Rights Reserved.
3#ifndef CbcBranchUser_H
4#define CbcBranchUser_H
5
6#include "CbcBranchBase.hpp"
7
8/** Branching decision user class */
9
10class CbcBranchUserDecision : public CbcBranchDecision {
11public:
12  // Default Constructor
13  CbcBranchUserDecision ();
14
15  // Copy constructor
16  CbcBranchUserDecision ( const CbcBranchUserDecision &);
17
18  virtual ~CbcBranchUserDecision();
19
20 /// Clone
21  virtual CbcBranchDecision * clone() const;
22
23    /// Initialize i.e. before start of choosing at a node
24  virtual void initialize(CbcModel * model);
25
26  /** Returns nonzero if branching on first object is "better" than on
27      second (if second NULL first wins).
28      This is only used after strong branching.  The initial selection
29      is done by infeasibility() for each CbcObject
30      return code +1 for up branch preferred, -1 for down
31     
32 */
33  virtual int betterBranch(CbcBranchingObject * thisOne,
34                            CbcBranchingObject * bestSoFar,
35                            double changeUp, int numberInfeasibilitiesUp,
36                            double changeDown, int numberInfeasibilitiesDown);
37
38  /** \brief Compare N branching objects. Return index of best
39      and sets way of branching in chosen object.
40   
41    This routine is used only after strong branching.
42    This is reccommended version as it can be more sophisticated
43  */
44
45  virtual int
46  bestBranch (CbcBranchingObject ** objects, int numberObjects, int numberUnsatisfied,
47              double * changeUp, int * numberInfeasibilitiesUp,
48              double * changeDown, int * numberInfeasibilitiesDown,
49              double objectiveValue) ;
50private:
51 
52  /// Illegal Assignment operator
53  CbcBranchUserDecision & operator=(const CbcBranchUserDecision& rhs);
54
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.