1 // $Id$ 2 // Copyright (C) 2003, 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 //Edwin 11/25/09 carved out of CbcCutGenerator 7 8 #ifndef CbcCutModifier_H 9 #define CbcCutModifier_H 10 11 #include "OsiSolverInterface.hpp" 12 #include "OsiCuts.hpp" 13 #include "CglCutGenerator.hpp" 14 15 class CbcModel; 16 class OsiRowCut; 17 class OsiRowCutDebugger; 18 /** Abstract cut modifier base class 19 20 In exotic circumstances - cuts may need to be modified 21 a) strengthened - changed 22 b) weakened - changed 23 c) deleted - set to NULL 24 d) unchanged 25 */ 26 27 class CbcCutModifier { 28 public: 29 /// Default Constructor 30 CbcCutModifier(); 31 32 // Copy constructor 33 CbcCutModifier(const CbcCutModifier &); 34 35 /// Destructor 36 virtual ~CbcCutModifier(); 37 38 /// Assignment 39 CbcCutModifier &operator=(const CbcCutModifier &rhs); 40 /// Clone 41 virtual CbcCutModifier *clone() const = 0; 42 43 /** Returns 44 0 unchanged 45 1 strengthened 46 2 weakened 47 3 deleted 48 */ 49 virtual int modify(const OsiSolverInterface *solver, OsiRowCut &cut) = 0; 50 /// Create C++ lines to get to current state generateCpp(FILE *)51 virtual void generateCpp(FILE *) {} 52 53 protected: 54 }; 55 56 #endif //CbcCutModifier_H 57 58 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2 59 */ 60