source: trunk/Cbc/src/CbcHeuristicRENS.hpp @ 2105

Last change on this file since 2105 was 2105, checked in by forrest, 4 years ago

mostly reporting options plus a few tweaks

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1// $Id: CbcHeuristicRENS.hpp 2105 2015-01-05 13:11:11Z forrest $
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
19    // Default Constructor
20    CbcHeuristicRENS ();
21
22    /* Constructor with model - assumed before cuts
23       Initial version does not do Lps
24    */
25    CbcHeuristicRENS (CbcModel & model);
26
27    // Copy constructor
28    CbcHeuristicRENS ( const CbcHeuristicRENS &);
29
30    // Destructor
31    ~CbcHeuristicRENS ();
32
33    /// Clone
34    virtual CbcHeuristic * clone() const;
35
36
37    /// Assignment operator
38    CbcHeuristicRENS & operator=(const CbcHeuristicRENS& rhs);
39
40    /// Resets stuff if model changes
41    virtual void resetModel(CbcModel * model);
42
43    /// update model (This is needed if cliques update matrix etc)
44    virtual void setModel(CbcModel * model);
45
46    using CbcHeuristic::solution ;
47    /** returns 0 if no solution, 1 if valid solution.
48        Sets solution values if good, sets objective value (only if good)
49        This does Relaxation Extension Neighborhood Search
50        Does not run if when_<2 and a solution exists
51    */
52    virtual int solution(double & objectiveValue,
53                         double * newSolution);
54
55    /// Set type
56    inline void setRensType(int value)
57    { rensType_ = value;}
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
77
Note: See TracBrowser for help on using the repository browser.