forked from science-ation/science-ation
Committing a comment to the annealer to look at down the road, ideas from Kris to speed up the scheduler when the cost isnt changing, instead of waiting for the temperature to fall slowly, speed it up when the acceptance rate is really good or really bad
This commit is contained in:
parent
4b3455f730
commit
b3bbd801ef
@ -275,6 +275,34 @@ class annealer {
|
||||
break;
|
||||
// TRACE("Cost is {$this->cost}\n");
|
||||
$temperature *= $this->rate;
|
||||
/*
|
||||
FIXME: README: NOTE: TODO:
|
||||
From Kris, 2009-03-24
|
||||
Dave do you think we should consider something like this?
|
||||
|
||||
<Kris_School_1> here's the schedule i use in my academic annealer:
|
||||
if( _params._useVPRTempSchedule ) {
|
||||
// This is VPR's temperature schedule...
|
||||
if( successRate > 0.96 ) {
|
||||
_temp *= 0.5;
|
||||
} else if( successRate > 0.8 ) {
|
||||
_temp *= 0.9;
|
||||
} else if( successRate > 0.15 || !windowsSized ) {
|
||||
_temp *= 0.95;
|
||||
} else {
|
||||
_temp *= 0.8;
|
||||
}
|
||||
} else {
|
||||
// This is identical to Aaarts and Van Laarhaven.
|
||||
real64 kappa = _params._tempReduction; // 1.0 == slow, 10 = reasonable, 100 == fast
|
||||
real64 sqrvar = std::sqrt( variance );
|
||||
if( variance <= EPSNEG || sqrvar <= EPSNEG ) {
|
||||
_temp = 0.;
|
||||
} else {
|
||||
_temp = _temp * ( sqrvar / ( sqrvar + kappa * _temp ) );
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
TRACE("Annealing complete. {$this->iterations} iterations. Final cost is {$this->cost}\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user