001 /* 002 * Created on Sep 14, 2004 003 * 004 */ 005 package aima.search.informed; 006 007 /** 008 * @author Ravi Mohan 009 * 010 */ 011 012 public class Scheduler { 013 014 private final int k, limit; 015 016 private final double lam; 017 018 public Scheduler(int k, double lam, int limit) { 019 this.k = k; 020 this.lam = lam; 021 this.limit = limit; 022 } 023 024 public Scheduler() { 025 this.k = 20; 026 this.lam = 0.045; 027 this.limit = 100; 028 } 029 030 public double getTemp(int t) { 031 if (t < limit) { 032 double res = k * Math.exp((-1) * lam * t); 033 return res; 034 } else { 035 return 0.0; 036 } 037 } 038 }