Commit d07997d2 by Michael Schmid

intermediate commit before working with statistics library

parent 4f834394
......@@ -35,18 +35,18 @@ public class ResultCollector {
public void logAll() {
if (!testResults.isEmpty()) {
logResults(testResults, "test");
logMeanTardiness(simulatorResults, "test");
logFeasibility(testResults, "test");
logTardinessStatistics(simulatorResults, "test");
logFailedTardiness(testResults, "test");
}
if (!simulatorResults.isEmpty()) {
logResults(simulatorResults, "sim");
logMeanTardiness(simulatorResults, "sim");
logFeasibility(simulatorResults, "sim");
logTardinessStatistics(simulatorResults, "sim");
logFailedTardiness(simulatorResults, "sim");
}
}
public <T extends PairInterface> void logResults(
public <T extends PairInterface> void logFeasibility(
Table<Long, Pair<T>, Set<SchedulingInfo>> results, String type) {
LocalTime date = LocalTime.now();
Logger log = new Logger("./results/results_" + type + "_" + numberOfProcessors + "_"
......@@ -117,11 +117,11 @@ public class ResultCollector {
log.finalize();
}
public <T extends PairInterface> void logMeanTardiness(
public <T extends PairInterface> void logTardinessStatistics(
Table<Long, Pair<T>, Set<SchedulingInfo>> results, String type) {
LocalTime date = LocalTime.now();
Logger log = new Logger("./results/mean_tardiness_" + type + "_" + numberOfProcessors + "_"
+ date.getHour() + ":" + date.getMinute() + ".txt");
Logger log = new Logger("./results/statistics_tardiness_" + type + "_" + numberOfProcessors
+ "_" + date.getHour() + ":" + date.getMinute() + ".txt");
String firstLine = new String("Utilization\tTotal");
if (!results.isEmpty()) {
......@@ -136,7 +136,7 @@ public class ResultCollector {
String.valueOf((double) kv / 10) + "\t" + totalNumberOfTasksets.get(kv);
for (Pair<T> pair : results.columnKeySet()) {
Set<SchedulingInfo> simulationInfos = results.get(kv, pair);
List<Long> values = new ArrayList<>();
List<Long> values = ArrayList<>();
for (SchedulingInfo s : simulationInfos) {
for (TerminationInfo t : s.getTerminationInfos()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment