Last change
on this file since 2096 was
1573,
checked in by lou, 9 years ago
|
Change to EPL license notice.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.4 KB
|
Rev | Line | |
---|
[1271] | 1 | /* $Id: CbcFeasibilityBase.hpp 1573 2011-01-05 01:12:36Z forrest $ */ |
---|
[165] | 2 | // Copyright (C) 2005, International Business Machines |
---|
| 3 | // Corporation and others. All Rights Reserved. |
---|
[1573] | 4 | // This code is licensed under the terms of the Eclipse Public License (EPL). |
---|
| 5 | |
---|
[165] | 6 | #ifndef CbcFeasibilityBase_H |
---|
| 7 | #define CbcFeasibilityBase_H |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | //############################################################################# |
---|
| 11 | /* There are cases where the user wants to control how CBC sees the problems feasibility. |
---|
| 12 | The user may want to examine the problem and say : |
---|
| 13 | a) The default looks OK |
---|
[1286] | 14 | b) Pretend this problem is Integer feasible |
---|
[165] | 15 | c) Pretend this problem is infeasible even though it looks feasible |
---|
[1286] | 16 | |
---|
[165] | 17 | This simple class allows user to do that. |
---|
| 18 | |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | class CbcModel; |
---|
| 22 | class CbcFeasibilityBase { |
---|
| 23 | public: |
---|
[1286] | 24 | // Default Constructor |
---|
| 25 | CbcFeasibilityBase () {} |
---|
[165] | 26 | |
---|
[1286] | 27 | /** |
---|
| 28 | On input mode: |
---|
| 29 | 0 - called after a solve but before any cuts |
---|
| 30 | -1 - called after strong branching |
---|
| 31 | Returns : |
---|
| 32 | 0 - no opinion |
---|
| 33 | -1 pretend infeasible |
---|
| 34 | 1 pretend integer solution |
---|
| 35 | */ |
---|
| 36 | virtual int feasible(CbcModel * , int ) { |
---|
| 37 | return 0; |
---|
| 38 | } |
---|
[165] | 39 | |
---|
[1286] | 40 | virtual ~CbcFeasibilityBase() {} |
---|
[165] | 41 | |
---|
[1286] | 42 | // Copy constructor |
---|
| 43 | CbcFeasibilityBase ( const CbcFeasibilityBase & ) {} |
---|
[165] | 44 | |
---|
[1286] | 45 | // Assignment operator |
---|
| 46 | CbcFeasibilityBase & operator=( const CbcFeasibilityBase& ) { |
---|
| 47 | return *this; |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | /// Clone |
---|
| 51 | virtual CbcFeasibilityBase * clone() const { |
---|
| 52 | return new CbcFeasibilityBase(*this); |
---|
| 53 | } |
---|
[165] | 54 | }; |
---|
| 55 | #endif |
---|
[1432] | 56 | |
---|
Note: See
TracBrowser
for help on using the repository browser.