source: trunk/Cbc/src/CbcCutSubsetModifier.hpp @ 2464

Last change on this file since 2464 was 2464, checked in by unxusr, 10 months ago

.clang-format with proposal for formatting code

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1// $Id: CbcCutSubsetModifier.hpp 2464 2019-01-03 19:03:23Z unxusr $
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 CbcCutSubsetModifier_H
9#define CbcCutSubsetModifier_H
10
11#include "OsiSolverInterface.hpp"
12#include "OsiCuts.hpp"
13#include "CglCutGenerator.hpp"
14#include "CbcCutModifier.hpp"
15
16class CbcModel;
17class OsiRowCut;
18class OsiRowCutDebugger;
19/** Simple cut modifier base class
20
21    In exotic circumstances - cuts may need to be modified
22    a) strengthened - changed
23    b) weakened - changed
24    c) deleted - set to NULL
25    d) unchanged
26
27    initially get rid of cuts with variables >= k
28    could weaken
29*/
30
31class CbcCutSubsetModifier : public CbcCutModifier {
32public:
33  /// Default Constructor
34  CbcCutSubsetModifier();
35
36  /// Useful Constructor
37  CbcCutSubsetModifier(int firstOdd);
38
39  // Copy constructor
40  CbcCutSubsetModifier(const CbcCutSubsetModifier &);
41
42  /// Destructor
43  virtual ~CbcCutSubsetModifier();
44
45  /// Assignment
46  CbcCutSubsetModifier &operator=(const CbcCutSubsetModifier &rhs);
47  /// Clone
48  virtual CbcCutModifier *clone() const;
49
50  /** Returns
51        0 unchanged
52        1 strengthened
53        2 weakened
54        3 deleted
55    */
56  virtual int modify(const OsiSolverInterface *solver, OsiRowCut &cut);
57  /// Create C++ lines to get to current state
58  virtual void generateCpp(FILE *) {}
59
60protected:
61  /// data
62  /// First odd variable
63  int firstOdd_;
64};
65
66#endif //CbcCutSubsetModifier_H
Note: See TracBrowser for help on using the repository browser.