Dip  0.92.4
CbcBranchUser.hpp
Go to the documentation of this file.
1 // $Id: CbcBranchUser.hpp 2469 2019-01-06 23:17:46Z unxusr $
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 
55 private:
58 };
59 
61 
63 
64 public:
65  // Default Constructor
67 
68  // Useful constructor - passed integer index and model index
69  CbcSimpleIntegerFixed(CbcModel *model, int iColumn, double breakEven = 0.5);
70 
71  // Constructor from simple
73 
74  // Copy constructor
76 
78  virtual CbcObject *clone() const;
79 
80  // Assignment operator
82 
83  // Destructor
85 
87  virtual double infeasibility(int &preferredWay) const;
88 
93  //virtual CbcBranchingObject * createBranch(int way) ;
100  const OsiBranchingInformation *info, int way);
101 
102 protected:
104 };
105 
106 #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:258
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:252
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:100
double breakEven() const
Breakeven e.g 0.7 -> >= 0.7 go up first.