--- 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)