
aima.core.search.local.Scheduler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aima-core Show documentation
Show all versions of aima-core Show documentation
AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.
package aima.core.search.local;
/**
* @author Ravi Mohan
*
*/
public class Scheduler {
private final int k, limit;
private final double lam;
public Scheduler(int k, double lam, int limit) {
this.k = k;
this.lam = lam;
this.limit = limit;
}
public Scheduler() {
this.k = 20;
this.lam = 0.045;
this.limit = 100;
}
public double getTemp(int t) {
if (t < limit) {
double res = k * Math.exp((-1) * lam * t);
return res;
} else {
return 0.0;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy