Cbc 2.10.12
Loading...
Searching...
No Matches
CbcHeuristicRINS.hpp
Go to the documentation of this file.
1/* $Id$ */
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#ifndef CbcHeuristicRINS_H
7#define CbcHeuristicRINS_H
8
9#include "CbcHeuristic.hpp"
10// for backward compatibility include 3 other headers
11#include "CbcHeuristicRENS.hpp"
12#include "CbcHeuristicDINS.hpp"
13#include "CbcHeuristicVND.hpp"
18public:
19 // Default Constructor
21
22 /* Constructor with model - assumed before cuts
23 Initial version does not do Lps
24 */
26
27 // Copy constructor
29
30 // Destructor
32
34 virtual CbcHeuristic *clone() const;
35
38
40 virtual void generateCpp(FILE *fp);
41
43 virtual void resetModel(CbcModel *model);
44
46 virtual void setModel(CbcModel *model);
47
53 virtual int solution(double &objectiveValue,
54 double *newSolution);
56 int solutionFix(double &objectiveValue,
57 double *newSolution,
58 const int *keep);
59
61 inline void setHowOften(int value)
62 {
63 howOften_ = value;
64 }
66 inline char *used() const
67 {
68 return used_;
69 }
71 inline void setLastNode(int value)
72 {
73 lastNode_ = value;
74 }
76 inline void setSolutionCount(int value)
77 {
78 numberSolutions_ = value;
79 }
80
81protected:
82 // Data
83
101 char *used_;
102};
103#endif
104
105/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
106*/
LocalSearch class.
virtual CbcHeuristic * clone() const
Clone.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
int numberSuccesses_
Number of successes.
int numberTries_
Number of tries.
void setHowOften(int value)
Sets how often to do it.
void setLastNode(int value)
Resets lastNode.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
CbcHeuristicRINS(CbcModel &model)
char * used_
Whether a variable has been in a solution.
int howOften_
How often to do (code can change)
CbcHeuristicRINS(const CbcHeuristicRINS &)
int stateOfFixing_
State of fixing continuous variables - 0 - not tried +n - this divisor makes small enough -n - this d...
int numberSolutions_
Number of solutions so we can do something at solution.
CbcHeuristicRINS & operator=(const CbcHeuristicRINS &rhs)
Assignment operator.
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
void setSolutionCount(int value)
Resets number of solutions.
char * used() const
Used array so we can set.
int lastNode_
Node when last done.
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
Heuristic base class.
virtual int solution(double &objectiveValue, double *newSolution)=0
returns 0 if no solution, 1 if valid solution with better objective value than one passed in Sets sol...
Simple Branch and bound class.
Definition CbcModel.hpp:100