Exemplo n.º 1
0
  public List<PSToken> getConflictSet(int t) {
    List<PSToken> retval = new Vector<PSToken>();

    PSTimePointList tokKeys = res_.getOrderingChoices(t);
    for (int i = 0; i < tokKeys.size(); i++) {
      PSToken tok = psengine_.getTokenByKey(tokKeys.get(i));
      retval.add(tok);
    }

    return retval;
  }
Exemplo n.º 2
0
  public int getMostViolatedTime() {
    int t = -1;
    double lowestLevel = Double.MAX_VALUE;

    PSResourceProfile prof = res_.getLevels();
    PSTimePointList times = prof.getTimes();
    for (int i = 0; i < times.size(); i++) {
      double level = prof.getLowerBound(times.get(i));
      if (level < lowestLevel) {
        lowestLevel = level;
        if (level < 0) t = times.get(i);
      }
    }

    if (t >= 0)
      RCPSPUtil.dbgout("MaxViolation for " + res_.getName() + " " + lowestLevel + " at time " + t);

    return t;
  }