Exemplo n.º 1
0
  public double getExpectedValueForTime(double time) {
    if (!Double.isNaN(dVal)) return currentValue;

    if (monthVal != null) return currentValue;

    if (probVal != null) return probVal.getExpectedValue();
    return monthProbVal.get(Clock.getMonthIndex(time)).getExpectedValue();
  }
Exemplo n.º 2
0
  public void initialize() {

    if (probVal != null) {
      probVal.initialize();
    }
    if (monthProbVal != null) {
      for (ProbabilityDistribution each : monthProbVal) {
        each.initialize();
      }
    }

    // Initialize the current value
    if (!Double.isNaN(dVal)) currentValue = dVal;

    if (monthVal != null) currentValue = monthVal.get(Clock.getMonthIndex(0));

    if (probVal != null) currentValue = probVal.getExpectedValue();
  }