Beispiel #1
0
  public static double getExtendedWINQ(PrioRuleTarget job) {
    int nextTask = job.getTaskNumber() + 1;
    assert (nextTask < job.numOps());
    WorkStation mNext = job.getOps()[nextTask].machine;

    double winq = mNext.workContent(false);

    List<PrioRuleTarget> additionalJobs =
        findLookAheadJobs(mNext, job.getCurrentOperation().procTime + 1);
    while (additionalJobs.size() > 0) {
      int index = getIndexOfNextJob(additionalJobs);
      PrioRuleTarget nextJob = additionalJobs.remove(index);
      double jobArrivingIn = nextJob.getCurrMachine().againIdleIn();
      if (jobArrivingIn <= winq) winq += nextJob.getCurrentOperation().procTime;
      else winq = jobArrivingIn + nextJob.getCurrentOperation().procTime;
    }
    return winq;
  }
Beispiel #2
0
  private static List<PrioRuleTarget> findLookAheadJobs(WorkStation m, double threshold) {
    threshold += m.shop().simTime();

    ArrayList<PrioRuleTarget> res = new ArrayList<PrioRuleTarget>();
    PriorityQueue<Job> q = m.queue;
    for (int i = 0, n = q.size(); i < n; i++) {
      Job j = q.get(i);
      if (j.isFuture() && j.getArriveTime() < threshold) res.add(j);
    }
    return res;
  }