Commit d07997d2 by Michael Schmid

intermediate commit before working with statistics library

parent 4f834394
...@@ -35,18 +35,18 @@ public class ResultCollector { ...@@ -35,18 +35,18 @@ public class ResultCollector {
public void logAll() { public void logAll() {
if (!testResults.isEmpty()) { if (!testResults.isEmpty()) {
logResults(testResults, "test"); logFeasibility(testResults, "test");
logMeanTardiness(simulatorResults, "test"); logTardinessStatistics(simulatorResults, "test");
logFailedTardiness(testResults, "test"); logFailedTardiness(testResults, "test");
} }
if (!simulatorResults.isEmpty()) { if (!simulatorResults.isEmpty()) {
logResults(simulatorResults, "sim"); logFeasibility(simulatorResults, "sim");
logMeanTardiness(simulatorResults, "sim"); logTardinessStatistics(simulatorResults, "sim");
logFailedTardiness(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) { Table<Long, Pair<T>, Set<SchedulingInfo>> results, String type) {
LocalTime date = LocalTime.now(); LocalTime date = LocalTime.now();
Logger log = new Logger("./results/results_" + type + "_" + numberOfProcessors + "_" Logger log = new Logger("./results/results_" + type + "_" + numberOfProcessors + "_"
...@@ -117,11 +117,11 @@ public class ResultCollector { ...@@ -117,11 +117,11 @@ public class ResultCollector {
log.finalize(); log.finalize();
} }
public <T extends PairInterface> void logMeanTardiness( public <T extends PairInterface> void logTardinessStatistics(
Table<Long, Pair<T>, Set<SchedulingInfo>> results, String type) { Table<Long, Pair<T>, Set<SchedulingInfo>> results, String type) {
LocalTime date = LocalTime.now(); LocalTime date = LocalTime.now();
Logger log = new Logger("./results/mean_tardiness_" + type + "_" + numberOfProcessors + "_" Logger log = new Logger("./results/statistics_tardiness_" + type + "_" + numberOfProcessors
+ date.getHour() + ":" + date.getMinute() + ".txt"); + "_" + date.getHour() + ":" + date.getMinute() + ".txt");
String firstLine = new String("Utilization\tTotal"); String firstLine = new String("Utilization\tTotal");
if (!results.isEmpty()) { if (!results.isEmpty()) {
...@@ -136,7 +136,7 @@ public class ResultCollector { ...@@ -136,7 +136,7 @@ public class ResultCollector {
String.valueOf((double) kv / 10) + "\t" + totalNumberOfTasksets.get(kv); String.valueOf((double) kv / 10) + "\t" + totalNumberOfTasksets.get(kv);
for (Pair<T> pair : results.columnKeySet()) { for (Pair<T> pair : results.columnKeySet()) {
Set<SchedulingInfo> simulationInfos = results.get(kv, pair); Set<SchedulingInfo> simulationInfos = results.get(kv, pair);
List<Long> values = new ArrayList<>(); List<Long> values = ArrayList<>();
for (SchedulingInfo s : simulationInfos) { for (SchedulingInfo s : simulationInfos) {
for (TerminationInfo t : s.getTerminationInfos()) { 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