コード例 #1
0
ファイル: RunMain.java プロジェクト: Mir1001/EARS
 /**
  * In the end algorithms are sorted by their rating. Best is first!
  *
  * @param repeat number of repetitions
  */
 public void run(int repeat) {
   long stTime = System.currentTimeMillis();
   RatingBenchmark.debugPrint = printDebug; // prints one on one results
   RatingBenchmark.printSingleRunDuration = printSingleRunDuration;
   benchMark.run(ra, allSingleProblemRunResults, repeat);
   ra.recalcRangs();
   Collections.sort(listAll, new Player.RatingComparator());
   long endTime = System.currentTimeMillis();
   duration = endTime - stTime;
   // System.out.println("Benchmark DURATION: "+duration/1000+"s");
 }
コード例 #2
0
ファイル: RunMain.java プロジェクト: Mir1001/EARS
  /**
   * Add algorithms in arena. Then run!
   *
   * @param al
   * @param startRating
   */
  public void addAlgorithm(Algorithm al, Rating startRating) {

    players.add(al);
    if (al == null) System.out.println("Add null algorithm");
    if (al.getAlgorithmInfo() == null)
      System.out.println("Add algorithm with null AlgorithmInfo " + al.getClass().getName());
    if (al.getImplementationAuthor() == null)
      System.out.println("Add algorithm with null Author " + al.getClass().getName());
    PlayerAlgorithmExport tmp;
    tmp = new PlayerAlgorithmExport(al, startRating, 0, 0, 0);
    listAll.add(tmp);
    ra.addPlayer(tmp);
    benchMark.registerAlgorithm(al);
  }