Line | |
---|
1 | // Copyright (C) 2005, International Business Machines |
---|
2 | // Corporation and others. All Rights Reserved. |
---|
3 | #ifndef CbcFeasibilityBase_H |
---|
4 | #define CbcFeasibilityBase_H |
---|
5 | |
---|
6 | |
---|
7 | //############################################################################# |
---|
8 | /* There are cases where the user wants to control how CBC sees the problems feasibility. |
---|
9 | The user may want to examine the problem and say : |
---|
10 | a) The default looks OK |
---|
11 | b) Pretend this problem is Integer feasible |
---|
12 | c) Pretend this problem is infeasible even though it looks feasible |
---|
13 | |
---|
14 | This simple class allows user to do that. |
---|
15 | |
---|
16 | */ |
---|
17 | |
---|
18 | class CbcModel; |
---|
19 | class CbcFeasibilityBase { |
---|
20 | public: |
---|
21 | // Default Constructor |
---|
22 | CbcFeasibilityBase () {}; |
---|
23 | |
---|
24 | /** |
---|
25 | On input mode: |
---|
26 | 0 - called after a solve but before any cuts |
---|
27 | -1 - called after strong branching |
---|
28 | Returns : |
---|
29 | 0 - no opinion |
---|
30 | -1 pretend infeasible |
---|
31 | 1 pretend integer solution |
---|
32 | */ |
---|
33 | virtual int feasible(CbcModel * model, int mode) {return 0;}; |
---|
34 | |
---|
35 | virtual ~CbcFeasibilityBase() {}; |
---|
36 | |
---|
37 | // Copy constructor |
---|
38 | CbcFeasibilityBase ( const CbcFeasibilityBase & rhs) |
---|
39 | {}; |
---|
40 | |
---|
41 | // Assignment operator |
---|
42 | CbcFeasibilityBase & operator=( const CbcFeasibilityBase& rhs) |
---|
43 | { |
---|
44 | return *this; |
---|
45 | }; |
---|
46 | |
---|
47 | /// Clone |
---|
48 | virtual CbcFeasibilityBase * clone() const |
---|
49 | { return new CbcFeasibilityBase(*this);}; |
---|
50 | }; |
---|
51 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.