source: trunk/Cbc/src/CbcHeuristicRENS.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.8 KB
Line 
1// $Id: CbcHeuristicRENS.hpp 2464 2019-01-03 19:03:23Z unxusr $
2// Copyright (C) 2006, 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 12/5/09 carved out of CbcHeuristicRINS
7
8#ifndef CbcHeuristicRENS_H
9#define CbcHeuristicRENS_H
10
11#include "CbcHeuristic.hpp"
12
13/** LocalSearch class
14 */
15
16class CbcHeuristicRENS : public CbcHeuristic {
17public:
18  // Default Constructor
19  CbcHeuristicRENS();
20
21  /* Constructor with model - assumed before cuts
22       Initial version does not do Lps
23    */
24  CbcHeuristicRENS(CbcModel &model);
25
26  // Copy constructor
27  CbcHeuristicRENS(const CbcHeuristicRENS &);
28
29  // Destructor
30  ~CbcHeuristicRENS();
31
32  /// Clone
33  virtual CbcHeuristic *clone() const;
34
35  /// Assignment operator
36  CbcHeuristicRENS &operator=(const CbcHeuristicRENS &rhs);
37
38  /// Resets stuff if model changes
39  virtual void resetModel(CbcModel *model);
40
41  /// update model (This is needed if cliques update matrix etc)
42  virtual void setModel(CbcModel *model);
43
44  using CbcHeuristic::solution;
45  /** returns 0 if no solution, 1 if valid solution.
46        Sets solution values if good, sets objective value (only if good)
47        This does Relaxation Extension Neighborhood Search
48        Does not run if when_<2 and a solution exists
49    */
50  virtual int solution(double &objectiveValue,
51    double *newSolution);
52
53  /// Set type
54  inline void setRensType(int value)
55  {
56    rensType_ = value;
57  }
58
59protected:
60  // Data
61  /// Number of tries
62  int numberTries_;
63  /** Type
64        0 - fix at LB
65        1 - fix on dj
66        2 - fix at UB as well
67        3 - fix on 0.01*average dj
68        add 16 to allow two tries
69        32 - if solution exists use to keep more variables
70        64 - if priorities keep high priority
71        128 - if priorities keep low priority
72    */
73  int rensType_;
74};
75
76#endif
Note: See TracBrowser for help on using the repository browser.