private static double delayedLognormal(int time, double tau, double mean, double var) {
		double delay = time - tau;
		if(delay <= 0 || var == 0) return 0.0;
		else if(delay < 1) delay = 1;
		double denom = Math.sqrt(2*Math.PI*var) * delay;
		double gap = Math.log(delay) - mean;
		double ret = Math.exp(-0.5*gap*gap/var)/denom; 
		if(!Double.isNaN(ret)) return ret;
		else return 0.0;
	}