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

    List<PrioRuleTarget> additionalJobs =
        findLookAheadJobs(mNext, Double.MAX_VALUE - job.getShop().simTime());
    double earliestArrival = Double.MAX_VALUE;
    for (int i = 0; i < additionalJobs.size(); i++) {
      PrioRuleTarget lookaheadJob = additionalJobs.get(i);
      double arrivingIn = lookaheadJob.getCurrMachine().againIdleIn();
      if (arrivingIn > job.getCurrentOperation().procTime && arrivingIn < earliestArrival)
        earliestArrival = arrivingIn;
    }
    return earliestArrival;
  }
Esempio n. 2
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;
  }
Esempio n. 3
0
  public static double utilisedIdleTime(PrioRuleTarget job) {
    double currPT = job.getCurrentOperation().procTime;

    int nextTask = job.getTaskNumber() + 1;
    if (nextTask >= job.numOps()) return 0;
    double nextPT = job.getOps()[nextTask].procTime;

    double winq = getExtendedWINQ(job);

    double earliestArrival = getEarliestArrivalAfter(job);

    if (winq < currPT) {
      if (currPT + nextPT <= earliestArrival) return nextPT;
      else return earliestArrival - currPT;
    } else if (winq < currPT + nextPT) {
      if (currPT + nextPT <= earliestArrival) return nextPT + (currPT - winq);
      else return earliestArrival - winq;
    } else {
      return 0;
    }
  }