Esempio n. 1
0
  void testCvg() {
    GameQuickTest wo = new GameQuickTest();
    GameQuick gq = (GameQuick) wo.test3consistent();
    long tw1 = System.currentTimeMillis();

    gq.scheduleOnce();
    System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw1));
    System.out.println("Makespan% = " + 100);
    System.out.println();

    for (int i = 0; i < gq.getVExeTime().size(); i++) {
      System.out.println((i + 1) + " " + gq.getVExeTime().get(i));
    }
  }
Esempio n. 2
0
  void testFinal() {
    for (int s = 0; s < 1; s++) {
      GameQuickTest wo = new GameQuickTest();
      GameQuick gq = (GameQuick) wo.test3consistent();
      long tw1 = System.currentTimeMillis();
      gq.setBPrint(false);
      gq.schedule();
      double t1 = gq.getDTotalExecutionTime();
      System.out.println("Makespan GQ = " + gq.getDFinalMakespan());
      System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw1));
      System.out.println("Makespan% = " + 100);
      System.out.println("SystemEfficiency = " + gq.getdSystemEfficiency());
      System.out.println();

      OLB mt = new OLB(gq.getIClass(), gq.getISite());
      mt.init(gq);
      long tw2 = System.currentTimeMillis();
      double t2 = mt.olbStart();
      System.out.println("OLB Time% = " + t2 / t1 * 100);
      System.out.println("Makespan% = " + mt.getDFinalMakespan() / gq.getDFinalMakespan() * 100);
      System.out.println("Fairness% = " + mt.getDFairness() / gq.getDFairness() * 100);
      System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw2));
      System.out.println("SystemEfficiency = " + mt.getdSystemEfficiency());
      System.out.println();

      MCT mctime = new MCT();
      mctime.init(gq);
      long tw4 = System.currentTimeMillis();
      double t4 = mctime.minct();
      System.out.println("MCT Time% = " + t4 / t1 * 100);
      System.out.println(
          "Makespan% = " + mctime.getDFinalMakespan() / gq.getDFinalMakespan() * 100);
      System.out.println("Fairness% = " + mctime.getDFairness() / gq.getDFairness() * 100);
      System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw4));
      System.out.println("SystemEfficiency = " + mctime.getdSystemEfficiency());
      System.out.println();

      MinMin minmin = new MinMin(gq.getIClass(), gq.getISite());
      minmin.init(gq);
      long tw3 = System.currentTimeMillis();
      minmin.schedule();
      double t3 = minmin.getDTime();
      System.out.println("MinMin Time%     = " + t3 / t1 * 100);
      System.out.println(
          "Makespan% = " + minmin.getDFinalMakespan() / gq.getDFinalMakespan() * 100);
      System.out.println("Fairness% = " + minmin.getDFairness() / gq.getDFairness() * 100);
      System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw3));
      System.out.println("SystemEfficiency = " + minmin.getdSystemEfficiency());
      System.out.println();

      MaxMin mat = new MaxMin();
      mat.init(gq);
      long tw5 = System.currentTimeMillis();
      double t5 = mat.maxmin();
      System.out.println("MaxMin Time% = " + t5 / t1 * 100);
      System.out.println("Makespan% = " + mat.getDFinalMakespan() / gq.getDFinalMakespan() * 100);
      System.out.println("Fairness% = " + mat.getDFairness() / gq.getDFairness() * 100);
      System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw5));
      System.out.println("SystemEfficiency = " + mat.getdSystemEfficiency());
      System.out.println();

      Sufferage minsuff = new Sufferage(gq.getIClass(), gq.getISite());
      minsuff.init(gq);
      long tw6 = System.currentTimeMillis();
      double t6 = minsuff.minSufferage();
      System.out.println("Sufferage Time% = " + t6 / t1 * 100);
      System.out.println(
          "Makespan% = " + minsuff.getDFinalMakespan() / gq.getDFinalMakespan() * 100);
      System.out.println("Fairness% = " + minsuff.getDFairness() / gq.getDFairness() * 100);
      System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw6));
      System.out.println("SystemEfficiency = " + minsuff.getdSystemEfficiency());
      System.out.println();

      MET met = new MET(gq.getIClass(), gq.getISite());
      met.init(gq);
      long tw7 = System.currentTimeMillis();
      double t7 = met.minet();
      System.out.println("MET Time% = " + t7 / t1 * 100);
      System.out.println("Makespan% = " + met.getDFinalMakespan() / gq.getDFinalMakespan() * 100);
      System.out.println("Fairness% = " + met.getDFairness() / gq.getDFairness() * 100);
      System.out.println("AlgExeTime= " + (System.currentTimeMillis() - tw7));
      System.out.println("SystemEfficiency = " + met.getdSystemEfficiency());
      System.out.println();
    }
  }