Example #1
0
  public double getMaxValueForEntity_AtTime(T ent, double t) {

    TimeValue val = this.get(ent);
    if (val == null) return defaultValue.getMaxValueFor(t);

    return val.getMaxValueFor(t);
  }
Example #2
0
  public double getCurrentValueForEntity(T ent) {

    TimeValue val = this.get(ent);
    if (val == null) return defaultValue.getCurrentValue();

    return val.getCurrentValue();
  }
Example #3
0
  public double getFirstNonZeroExpectedValueForTime(double t) {

    // find the first non zero entry
    for (TimeValue each : this.values()) {
      if (each.getExpectedValueForTime(t) > 0) {
        return each.getExpectedValueForTime(t);
      }
    }

    return defaultValue.getExpectedValueForTime(t);
  }
Example #4
0
  public boolean hasNonZeroExpectedValueForTime(double t) {

    // find the first non zero entry
    for (TimeValue each : this.values()) {
      if (each.getExpectedValueForTime(t) > 0) {
        return true;
      }
    }

    if (defaultValue.getExpectedValueForTime(t) > 0) return true;

    return false;
  }
Example #5
0
 public void initialize() {
   for (TimeValue each : this.values()) {
     each.initialize();
   }
   defaultValue.initialize();
 }