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

Last change on this file since 1569 was 1499, checked in by forrest, 9 years ago

a few more rens heuristics

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