Esempio n. 1
0
 // earliest job?
 public static int getIndexOfNextJob(List<PrioRuleTarget> additionalJobs) {
   PrioRuleTarget nextJob = additionalJobs.get(0);
   int nextJobIndex = 0;
   for (int i = 1; i < additionalJobs.size(); i++) {
     PrioRuleTarget job = additionalJobs.get(i);
     if (job.getCurrMachine().againIdle() < nextJob.getCurrMachine().againIdle()) {
       nextJobIndex = i;
       nextJob = job;
     }
   }
   return nextJobIndex;
 }
Esempio n. 2
0
  public static double ift(PrioRuleTarget j) {
    WorkStation machine = j.getCurrMachine();
    double PT = j.getCurrentOperation().procTime;

    double additionalFT = 0.0;
    for (int i = 0; i < machine.queue.size(); i++) {
      PrioRuleTarget j2 = machine.queue.get(i);
      if (!j2.isFuture()) {
        double PTDifferenz = PT - j2.getCurrentOperation().procTime;
        if (PTDifferenz > 0) additionalFT += PTDifferenz;
      }
    }
    return additionalFT;
  }
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;
    }
  }
Esempio n. 4
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. 5
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. 6
0
 @Override
 public double calcPrio(PrioRuleTarget job) {
   return -job.getCurrentOperation().procTime;
 }
Esempio n. 7
0
 @Override
 public double calcPrio(PrioRuleTarget j) {
   return -getOwner()
       .getSetupMatrix()[getOwner().currMachine.setupState][j.getCurrentOperation().setupState];
 }
Esempio n. 8
0
 @Override
 public double calcPrio(PrioRuleTarget job) {
   return -Math.max(job.currProcTime(), job.getCurrentOperationDueDate() - job.getShop().simTime())
       / job.getWeight();
 }