Ejemplo 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;
 }
Ejemplo 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;
  }
Ejemplo n.º 3
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;
  }
Ejemplo 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;
  }