Cbc
trunk
|
00001 /* $Id$ */ 00002 // Copyright (C) 2005, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 // This code is licensed under the terms of the Eclipse Public License (EPL). 00005 00006 #ifndef CbcFeasibilityBase_H 00007 #define CbcFeasibilityBase_H 00008 00009 00010 //############################################################################# 00011 /* There are cases where the user wants to control how CBC sees the problems feasibility. 00012 The user may want to examine the problem and say : 00013 a) The default looks OK 00014 b) Pretend this problem is Integer feasible 00015 c) Pretend this problem is infeasible even though it looks feasible 00016 00017 This simple class allows user to do that. 00018 00019 */ 00020 00021 class CbcModel; 00022 class CbcFeasibilityBase { 00023 public: 00024 // Default Constructor 00025 CbcFeasibilityBase () {} 00026 00036 virtual int feasible(CbcModel * , int ) { 00037 return 0; 00038 } 00039 00040 virtual ~CbcFeasibilityBase() {} 00041 00042 // Copy constructor 00043 CbcFeasibilityBase ( const CbcFeasibilityBase & ) {} 00044 00045 // Assignment operator 00046 CbcFeasibilityBase & operator=( const CbcFeasibilityBase& ) { 00047 return *this; 00048 } 00049 00051 virtual CbcFeasibilityBase * clone() const { 00052 return new CbcFeasibilityBase(*this); 00053 } 00054 }; 00055 #endif 00056