Dip-All  0.91.0
CbcBranchUser.hpp
Go to the documentation of this file.
1 // $Id: CbcBranchUser.hpp 1574 2011-01-05 01:13:55Z lou $
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef CbcBranchUser_H
7 #define CbcBranchUser_H
8 
9 #include "CbcBranchBase.hpp"
10 #include "CbcBranchActual.hpp"
11 
15 public:
16  // Default Constructor
18 
19  // Copy constructor
21 
22  virtual ~CbcBranchUserDecision();
23 
25  virtual CbcBranchDecision * clone() const;
26 
28  virtual void initialize(CbcModel * model);
29 
37  virtual int betterBranch(CbcBranchingObject * thisOne,
38  CbcBranchingObject * bestSoFar,
39  double changeUp, int numberInfeasibilitiesUp,
40  double changeDown, int numberInfeasibilitiesDown);
41 
49  virtual int
50  bestBranch (CbcBranchingObject ** objects, int numberObjects, int numberUnsatisfied,
51  double * changeUp, int * numberInfeasibilitiesUp,
52  double * changeDown, int * numberInfeasibilitiesDown,
53  double objectiveValue) ;
54 private:
55 
58 
59 };
60 
62 
63 
65 
66 public:
67 
68  // Default Constructor
70 
71  // Useful constructor - passed integer index and model index
72  CbcSimpleIntegerFixed (CbcModel * model, int iColumn, double breakEven=0.5);
73 
74  // Constructor from simple
75  CbcSimpleIntegerFixed (const CbcSimpleInteger & simple);
76 
77  // Copy constructor
79 
81  virtual CbcObject * clone() const;
82 
83  // Assignment operator
85 
86  // Destructor
88 
90  virtual double infeasibility(int & preferredWay) const;
91 
96  //virtual CbcBranchingObject * createBranch(int way) ;
103  const OsiBranchingInformation * info, int way) ;
104 
105 protected:
107 };
108 
109 #endif
Abstract branching object base class Now just difference with OsiBranchingObject. ...
virtual CbcObject * clone() const
Clone.
Define a single integer class.
virtual CbcBranchDecision * clone() const
Clone.
virtual int bestBranch(CbcBranchingObject **objects, int numberObjects, int numberUnsatisfied, double *changeUp, int *numberInfeasibilitiesUp, double *changeDown, int *numberInfeasibilitiesDown, double objectiveValue)
Compare N branching objects.
double infeasibility() const
Return infeasibility.
CbcSimpleIntegerFixed & operator=(const CbcSimpleIntegerFixed &rhs)
virtual void initialize(CbcModel *model)
Initialize i.e. before start of choosing at a node.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.
Definition: CbcObject.hpp:245
virtual int betterBranch(CbcBranchingObject *thisOne, CbcBranchingObject *bestSoFar, double changeUp, int numberInfeasibilitiesUp, double changeDown, int numberInfeasibilitiesDown)
Returns nonzero if branching on first object is "better" than on second (if second NULL first wins)...
Abstract Base Class for describing an interface to a solver.
Branching decision user class.
Define a single integer class where branching is forced until fixed.
virtual ~CbcBranchUserDecision()
CbcModel * model() const
Return model.
Definition: CbcObject.hpp:240
virtual CbcBranchingObject * createBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way)
Creates a branching object.
CbcBranchUserDecision & operator=(const CbcBranchUserDecision &rhs)
Illegal Assignment operator.
Simple Branch and bound class.
Definition: CbcModel.hpp:101
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.