Cbc
2.10.13
Toggle main menu visibility
Loading...
Searching...
No Matches
Cbc
src
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
13
class
CbcHeuristicDINS
:
public
CbcHeuristic
{
14
public
:
15
// Default Constructor
16
CbcHeuristicDINS
();
17
18
/* Constructor with model - assumed before cuts
19
Initial version does not do Lps
20
*/
21
CbcHeuristicDINS
(
CbcModel
&
model
);
22
23
// Copy constructor
24
CbcHeuristicDINS
(
const
CbcHeuristicDINS
&);
25
26
// Destructor
27
~CbcHeuristicDINS
();
28
30
virtual
CbcHeuristic
*
clone
()
const
;
31
33
CbcHeuristicDINS
&
operator=
(
const
CbcHeuristicDINS
&rhs);
34
36
virtual
void
generateCpp
(FILE *fp);
37
39
virtual
void
resetModel
(
CbcModel
*
model
);
40
42
virtual
void
setModel
(
CbcModel
*
model
);
43
44
using
CbcHeuristic::solution
;
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
}
61
62
inline
void
setMaximumKeep
(
int
value)
63
{
64
maximumKeepSolutions_
= value;
65
}
66
67
inline
void
setConstraint
(
int
value)
68
{
69
localSpace_
= value;
70
}
71
72
protected
:
73
// Data
74
76
int
numberSolutions_
;
78
int
howOften_
;
80
int
numberSuccesses_
;
82
int
numberTries_
;
84
int
maximumKeepSolutions_
;
86
int
numberKeptSolutions_
;
88
int
numberIntegers_
;
90
int
localSpace_
;
92
int
**
values_
;
93
};
94
95
#endif
96
97
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
98
*/
CbcHeuristic.hpp
objectiveValue
double objectiveValue() const
Definition
CbcNode.hpp:221
model
CbcModel * model() const
Return model.
Definition
CbcObject.hpp:252
CbcHeuristicDINS::operator=
CbcHeuristicDINS & operator=(const CbcHeuristicDINS &rhs)
Assignment operator.
CbcHeuristicDINS::numberSuccesses_
int numberSuccesses_
Number of successes.
Definition
CbcHeuristicDINS.hpp:80
CbcHeuristicDINS::setMaximumKeep
void setMaximumKeep(int value)
Sets maximum number of solutions kept.
Definition
CbcHeuristicDINS.hpp:62
CbcHeuristicDINS::resetModel
virtual void resetModel(CbcModel *model)
Resets stuff if model changes.
CbcHeuristicDINS::~CbcHeuristicDINS
~CbcHeuristicDINS()
CbcHeuristicDINS::generateCpp
virtual void generateCpp(FILE *fp)
Create C++ lines to get to current state.
CbcHeuristicDINS::localSpace_
int localSpace_
Local parameter.
Definition
CbcHeuristicDINS.hpp:90
CbcHeuristicDINS::solutionFix
int solutionFix(double &objectiveValue, double *newSolution, const int *keep)
This version fixes stuff and does IP.
CbcHeuristicDINS::numberIntegers_
int numberIntegers_
Number of integer variables.
Definition
CbcHeuristicDINS.hpp:88
CbcHeuristicDINS::setConstraint
void setConstraint(int value)
Sets tightness of extra constraint.
Definition
CbcHeuristicDINS.hpp:67
CbcHeuristicDINS::numberTries_
int numberTries_
Number of tries.
Definition
CbcHeuristicDINS.hpp:82
CbcHeuristicDINS::setModel
virtual void setModel(CbcModel *model)
update model (This is needed if cliques update matrix etc)
CbcHeuristicDINS::clone
virtual CbcHeuristic * clone() const
Clone.
CbcHeuristicDINS::values_
int ** values_
Values of integer variables.
Definition
CbcHeuristicDINS.hpp:92
CbcHeuristicDINS::maximumKeepSolutions_
int maximumKeepSolutions_
Maximum number of solutions to keep.
Definition
CbcHeuristicDINS.hpp:84
CbcHeuristicDINS::numberSolutions_
int numberSolutions_
Number of solutions so we can do something at solution.
Definition
CbcHeuristicDINS.hpp:76
CbcHeuristicDINS::numberKeptSolutions_
int numberKeptSolutions_
Number of solutions kept.
Definition
CbcHeuristicDINS.hpp:86
CbcHeuristicDINS::CbcHeuristicDINS
CbcHeuristicDINS(const CbcHeuristicDINS &)
CbcHeuristicDINS::howOften_
int howOften_
How often to do (code can change).
Definition
CbcHeuristicDINS.hpp:78
CbcHeuristicDINS::CbcHeuristicDINS
CbcHeuristicDINS()
CbcHeuristicDINS::CbcHeuristicDINS
CbcHeuristicDINS(CbcModel &model)
CbcHeuristicDINS::solution
virtual int solution(double &objectiveValue, double *newSolution)
returns 0 if no solution, 1 if valid solution.
CbcHeuristicDINS::setHowOften
void setHowOften(int value)
Sets how often to do it.
Definition
CbcHeuristicDINS.hpp:57
CbcHeuristic::solution
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...
CbcHeuristic::CbcHeuristic
CbcHeuristic()
CbcModel
Simple Branch and bound class.
Definition
CbcModel.hpp:100
Generated by
1.17.0