Cbc 2.10.12
Loading...
Searching...
No Matches
CbcBranchLink.hpp
Go to the documentation of this file.
1// $Id$
2// Copyright (C) 2005, 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 CbcBranchLink_H
7#define CbcBranchLink_H
8
9#include "CbcBranchBase.hpp"
10
14
15class CbcLink : public CbcObject {
16
17public:
18 // Default Constructor
20
28 int numberLinks, int first,
29 const double *weights, int setNumber);
37 int numberLinks, int typeSOS, const int *which,
38 const double *weights, int setNumber);
39
40 // Copy constructor
41 CbcLink(const CbcLink &);
42
44 virtual CbcObject *clone() const;
45
46 // Assignment operator
48
49 // Destructor
51
53 virtual double infeasibility(int &preferredWay) const;
54
56 virtual void feasibleRegion();
58 virtual CbcBranchingObject *createCbcBranch(OsiSolverInterface *solver, const OsiBranchingInformation *info, int way);
59
61 inline int numberMembers() const
62 {
63 return numberMembers_;
64 }
65
67 inline int numberLinks() const
68 {
69 return numberLinks_;
70 }
71
73 inline const int *which() const
74 {
75 return which_;
76 }
77
79 inline const double *weights() const
80 {
81 return weights_;
82 }
83
84private:
86
88 double *weights_;
89
95 int *which_;
98};
99
105
106public:
107 // Default Constructor
109
110 // Useful constructor
112 int way,
113 double separator);
114
115 // Copy constructor
117
118 // Assignment operator
120
122 virtual CbcBranchingObject *clone() const;
123
124 // Destructor
126
128 virtual double branch();
129
132 virtual void print();
134 virtual CbcBranchObjType type() const
135 {
136 return CbcBranchObjType(0);
137 } /*FIXME what type() should be returned here? */
138
147 virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap = false);
148
149private:
151 const CbcLink *set_;
154};
155#endif
CbcRangeCompare
Abstract branching object base class Now just difference with OsiBranchingObject.
CbcBranchingObject()
Default Constructor.
CbcModel * model() const
Return model.
int way() const
Get the state of the branching object.
virtual ~CbcLinkBranchingObject()
virtual double branch()
Does next branch and updates state.
virtual CbcBranchObjType type() const
Return the type (an integer identifier) of this.
double separator_
separator
CbcLinkBranchingObject(const CbcLinkBranchingObject &)
virtual CbcRangeCompare compareBranchingObject(const CbcBranchingObject *brObj, const bool replaceIfOverlap=false)
Compare the this with brObj.
CbcLinkBranchingObject(CbcModel *model, const CbcLink *set, int way, double separator)
virtual void print()
Print something about branch - only if log level high.
virtual CbcBranchingObject * clone() const
Clone.
CbcLinkBranchingObject & operator=(const CbcLinkBranchingObject &rhs)
const CbcLink * set_
data
Simple Branch and bound class.
Definition CbcModel.hpp:100
CbcModel * model() const
Return model.
int preferredWay() const
If -1 down always chosen first, +1 up always, 0 normal.