Cbc 2.10.12
Loading...
Searching...
No Matches
CbcHeuristicDINS.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// edwin 12/5/09 carved out of CbcHeuristicRINS
7
8#ifndef CbcHeuristicDINS_H
9#define CbcHeuristicDINS_H
10
11#include "CbcHeuristic.hpp"
12
14public:
15 // Default Constructor
17
18 /* Constructor with model - assumed before cuts
19 Initial version does not do Lps
20 */
22
23 // Copy constructor
25
26 // Destructor
28
30 virtual CbcHeuristic *clone() const;
31
34
36 virtual void generateCpp(FILE *fp);
37
39 virtual void resetModel(CbcModel *model);
40
42 virtual void setModel(CbcModel *model);
43
49 virtual int solution(double &objectiveValue,
50 double *newSolution);
52 int solutionFix(double &objectiveValue,
53 double *newSolution,
54 const int *keep);
55
57 inline void setHowOften(int value)
58 {
59 howOften_ = value;
60 }
62 inline void setMaximumKeep(int value)
63 {
65 }
67 inline void setConstraint(int value)
68 {
69 localSpace_ = value;
70 }
71
72protected:
73 // Data
74
92 int **values_;
93};
94
95#endif
96
97/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
98*/
CbcHeuristicDINS & operator=(const CbcHeuristicDINS &rhs)
Assignment operator.
int numberSuccesses_
Number of successes.
void setMaximumKeep(int value)
Sets maximum number of solutions kept.
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
int localSpace_
Local parameter.
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
int numberIntegers_
Number of integer variables.
void setConstraint(int value)
Sets tightness of extra constraint.
int numberTries_
Number of tries.
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
virtual CbcHeuristic * clone() const
Clone.
int ** values_
Values of integer variables.
int maximumKeepSolutions_
Maximum number of solutions to keep.
int numberSolutions_
Number of solutions so we can do something at solution.
int numberKeptSolutions_
Number of solutions kept.
CbcHeuristicDINS(const CbcHeuristicDINS &)
int howOften_
How often to do (code can change)
CbcHeuristicDINS(CbcModel &model)
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
void setHowOften(int value)
Sets how often to do it.
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