All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aima.core.search.local.Scheduler Maven / Gradle / Ivy

Go to download

AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.

The newest version!
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 - 2024 Weber Informatics LLC | Privacy Policy