Ignore:
Timestamp:
Nov 7, 2006 2:53:55 PM (13 years ago)
Author:
forrest
Message:

for nonlinear and sprint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcCutGenerator.hpp

    r445 r482  
    302302  int numberActiveCutsAtRoot_;
    303303};
     304/** Abstract cut modifier base class
     305
     306    In exotic circumstances - cuts may need to be modified
     307    a) strengthened - changed
     308    b) weakened - changed
     309    c) deleted - set to NULL
     310    d) unchanged
     311*/
     312
     313class CbcCutModifier {
     314public:
     315  /// Default Constructor
     316  CbcCutModifier ();
     317
     318  // Copy constructor
     319  CbcCutModifier ( const CbcCutModifier &);
     320   
     321  /// Destructor
     322  virtual ~CbcCutModifier();
     323
     324  /// Assignment
     325  CbcCutModifier & operator=(const CbcCutModifier& rhs);
     326 /// Clone
     327  virtual CbcCutModifier * clone() const = 0;
     328
     329  /** Returns
     330      0 unchanged
     331      1 strengthened
     332      2 weakened
     333      3 deleted
     334  */
     335  virtual int modify(const OsiSolverInterface * solver, OsiRowCut & cut) =0;
     336  /// Create C++ lines to get to current state
     337  virtual void generateCpp( FILE * fp) {};
     338protected:
     339 
     340};
     341
     342/** Simple cut modifier base class
     343
     344    In exotic circumstances - cuts may need to be modified
     345    a) strengthened - changed
     346    b) weakened - changed
     347    c) deleted - set to NULL
     348    d) unchanged
     349
     350    initially get rid of cuts with variables >= k
     351    could weaken
     352*/
     353
     354class CbcCutSubsetModifier  : public CbcCutModifier {
     355public:
     356  /// Default Constructor
     357  CbcCutSubsetModifier ();
     358
     359  /// Useful Constructor
     360  CbcCutSubsetModifier (int firstOdd);
     361
     362  // Copy constructor
     363  CbcCutSubsetModifier ( const CbcCutSubsetModifier &);
     364   
     365  /// Destructor
     366  virtual ~CbcCutSubsetModifier();
     367
     368  /// Assignment
     369  CbcCutSubsetModifier & operator=(const CbcCutSubsetModifier& rhs);
     370 /// Clone
     371  virtual CbcCutModifier * clone() const ;
     372
     373  /** Returns
     374      0 unchanged
     375      1 strengthened
     376      2 weakened
     377      3 deleted
     378  */
     379  virtual int modify(const OsiSolverInterface * solver, OsiRowCut & cut) ;
     380  /// Create C++ lines to get to current state
     381  virtual void generateCpp( FILE * fp) {};
     382protected:
     383  /// data
     384  /// First odd variable
     385  int firstOdd_;
     386};
    304387
    305388#endif
Note: See TracChangeset for help on using the changeset viewer.