Last change
on this file since 1433 was
1432,
checked in by bjarni, 10 years ago
|
Added extra return at end of each source file where needed, to remove possible linefeed conflicts (NightlyBuild? errors)
|
File size:
1.4 KB
|
Line | |
---|
1 | // Edwin 11/13/2009-- carved out of CbcBranchCut |
---|
2 | #ifndef CbcBranchAllDifferent_H |
---|
3 | #define CbcBranchAllDifferent_H |
---|
4 | |
---|
5 | #include "CbcBranchBase.hpp" |
---|
6 | #include "OsiRowCut.hpp" |
---|
7 | #include "CoinPackedMatrix.hpp" |
---|
8 | #include "CbcBranchCut.hpp" |
---|
9 | |
---|
10 | /** Define a branch class that branches so that it is only satsified if all |
---|
11 | members have different values |
---|
12 | So cut is x <= y-1 or x >= y+1 |
---|
13 | */ |
---|
14 | |
---|
15 | |
---|
16 | class CbcBranchAllDifferent : public CbcBranchCut { |
---|
17 | |
---|
18 | public: |
---|
19 | |
---|
20 | // Default Constructor |
---|
21 | CbcBranchAllDifferent (); |
---|
22 | |
---|
23 | /** Useful constructor - passed set of integer variables which must all be different |
---|
24 | */ |
---|
25 | CbcBranchAllDifferent (CbcModel * model, int number, const int * which); |
---|
26 | |
---|
27 | // Copy constructor |
---|
28 | CbcBranchAllDifferent ( const CbcBranchAllDifferent &); |
---|
29 | |
---|
30 | /// Clone |
---|
31 | virtual CbcObject * clone() const; |
---|
32 | |
---|
33 | // Assignment operator |
---|
34 | CbcBranchAllDifferent & operator=( const CbcBranchAllDifferent& rhs); |
---|
35 | |
---|
36 | // Destructor |
---|
37 | ~CbcBranchAllDifferent (); |
---|
38 | |
---|
39 | /// Infeasibility - large is 0.5 |
---|
40 | virtual double infeasibility(const OsiBranchingInformation * info, |
---|
41 | int &preferredWay) const; |
---|
42 | |
---|
43 | /// Creates a branching object |
---|
44 | virtual CbcBranchingObject * createCbcBranch(OsiSolverInterface * solver, const OsiBranchingInformation * info, int way) ; |
---|
45 | |
---|
46 | |
---|
47 | protected: |
---|
48 | /// data |
---|
49 | |
---|
50 | /// Number of entries |
---|
51 | int numberInSet_; |
---|
52 | /// Which variables |
---|
53 | int * which_; |
---|
54 | }; |
---|
55 | #endif |
---|
56 | |
---|
Note: See
TracBrowser
for help on using the repository browser.