blob: b333b4476e13b5dab8af0c9051bc6c3928fe3049 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
--- src/anneal.h 27 Jan 2007 05:00:39 -0000 1.2
+++ src/anneal.h 3 Feb 2007 09:27:30 -0000
@@ -235,13 +235,25 @@
Pi = new double[kMax];
}
+ // dangelo: HACK to work around NaN numbers
+ // force kMax to be > 2 (temporarily)
+ // I'm not sure what the real cause for this is.
+ int kMaxOrig = kMax;
+ if (kMax <= 2) kMax = 15;
tau = 0.75;
deltaEMax = 7000.0;
deltaEMin = 5.0;
double epsilon = 1.0 / (kMax * kMax);
tInitial = ceil(deltaEMax / log((kMax - 1 + (kMax * kMax * epsilon)) / (kMax - 1 - (kMax * kMax * epsilon))));
+
tFinal = deltaEMin / log((kMax - (kMax * epsilon) - 1) / (kMax * epsilon));
+ kMax = kMaxOrig;
+
+ if (Verbose > VERBOSE_GDA_MESSAGES) {
+ cout << endl << "tInitial=" << tInitial << " tFinal=" << tFinal << " epsilon=" << epsilon << " kMax=" << kMax;
+ cout.flush();
+ }
}
~GDAConfiguration() {
@@ -264,6 +276,11 @@
tCurrent = tInitial;
+ if (Verbose > VERBOSE_GDA_MESSAGES) {
+ cout << endl << "tInitial=" << tCurrent << " numIterations=" << numIterations;
+ cout.flush();
+ }
+
while (tCurrent > tFinal) {
double epsilon = 1.0 / kMax;
unsigned int eta = (unsigned int)ceil(log(epsilon)
|