コード例 #1
0
 public void printStatistics(String filename) {
   PrintWriter out = IO.getPrintWriter(filename);
   out.println("value\tmean\tvariance\tstdev\tmin\tmax\tcount");
   out.println("taskWeight\t" + taskWeight.statisticsString());
   out.println("sensorAvailNeed\t" + sensorAvailNeed.statisticsString());
   out.println("SSRneed\t" + SSRneed.statisticsString());
   out.println("accessWindowWeight\t" + accessWindowWeight.statisticsString());
   out.println("sensorAvailContention\t" + sensorAvailContention.statisticsString());
   out.println("sensorAvailContender count\t" + sensorAvailContenders.statisticsString());
   out.println("SSRcontention\t" + SSRcontention.statisticsString());
   out.println("sensorAvailDifficulty\t" + sensorAvailDifficulty.statisticsString());
   out.println("SSRdifficulty\t" + SSRdifficulty.statisticsString());
   out.println("SSRcontenders task count\t" + SSRCtaskCount.statisticsString());
   out.println("SSRcontenders access window count\t" + SSRCaccessWindowCount.statisticsString());
   out.println("SSRcontenders SSRneedSum\t" + SSRCneedSum.statisticsString());
   out.println("SSRcontenders SSRCcontention\t" + SSRCcontention.statisticsString());
   out.close();
 }
コード例 #2
0
 public void gatherData() {
   for (int i = 0; i < taskList.getInitialSize(); i++) {
     TaskWeight t = taskList.getTaskWeight(i);
     taskWeight.addDatum(t.getWeight());
     sensorAvailNeed.addDatum(t.getSensorAvailNeed());
     SSRneed.addDatum(t.getSSRneed());
     sensorAvailDifficulty.addDatum(t.getSensorAvailDifficulty());
     SSRdifficulty.addDatum(t.getSSRdifficulty());
     for (int j = 0; j < t.getNumberOfAccessWindows(); j++) {
       AccessWindowWeight aw = taskList.getAccessWindowWeight(i, j);
       accessWindowWeight.addDatum(aw.getWeight());
       sensorAvailContention.addDatum(aw.getSensorAvailContention());
       sensorAvailContenders.addDatum(aw.getSensorAvailContenders().size());
       SSRcontention.addDatum(aw.getSSRcontention());
     }
   }
   SSRcontenders[][] ssr = taskList.allSSRcontenders.theSSRcontenders;
   for (int i = 0; i < ssr.length; i++)
     for (int j = 0; j < ssr[i].length; j++) {
       SSRcontenders s = ssr[i][j];
       SSRCtaskCount.addDatum(s.getCurrentTaskWeightCount());
       SSRCaccessWindowCount.addDatum(s.getCurrentAccessWeightCount());
       SSRCneedSum.addDatum(s.getSSRneedSum());
       SSRCcontention.addDatum(s.getSSRcontention());
     }
 }