Rate rate = taskUtils.getRate(task); Scalar scalar = (Scalar)rate.computeNumerator(durationArray[days_spanned]); return taskUtils.getDouble(scalar);
if ((days_spanned > 0) && !(days_spanned > bucketSize)) { Rate rate = taskUtils.getRate(task); Duration d = durationArray[days_spanned]; Scalar scalar = (Scalar)rate.computeNumerator(d); return taskUtils.getDouble(scalar); } return 0.0;
  public double getProjectionTaskDemand(Task task, int bucket, long start, long end) {    int days_spanned = getDaysSpanned(bucket, start, end);    Rate rate = taskUtils.getRate(task);    Scalar scalar = (Scalar)rate.computeNumerator(durationArray[days_spanned]);    return taskUtils.getDouble(scalar);  }