From da04ff1c413d7f50d00fb106ae5d273a4b75c473 Mon Sep 17 00:00:00 2001 From: Michael Schmid Date: Tue, 23 Feb 2021 14:52:34 +0100 Subject: [PATCH] small changes in edge generation --- src/main/java/mvd/jester/model/SystemManager.java | 12 +++++++----- src/main/java/mvd/jester/tests/FonsecaNelis.java | 1 - src/main/java/mvd/jester/tests/SchmidMottok.java | 1 - src/main/java/mvd/jester/tests/UeterAgrawal.java | 2 ++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/mvd/jester/model/SystemManager.java b/src/main/java/mvd/jester/model/SystemManager.java index d65e8f7..699f161 100644 --- a/src/main/java/mvd/jester/model/SystemManager.java +++ b/src/main/java/mvd/jester/model/SystemManager.java @@ -365,11 +365,13 @@ public class SystemManager implements SystemManagerInterface jobDag.addVertex(source); jobDag.addVertex(sink); for (Job j : jobDag) { - if (jobDag.inDegreeOf(j) == 0) { - edgePairs.put(source, j); - } - if (jobDag.outDegreeOf(j) == 0) { - edgePairs.put(j, sink); + if (j != source && j != sink) { + if (jobDag.inDegreeOf(j) == 0) { + edgePairs.put(source, j); + } + if (jobDag.outDegreeOf(j) == 0) { + edgePairs.put(j, sink); + } } } diff --git a/src/main/java/mvd/jester/tests/FonsecaNelis.java b/src/main/java/mvd/jester/tests/FonsecaNelis.java index 8621ba8..850a3c1 100644 --- a/src/main/java/mvd/jester/tests/FonsecaNelis.java +++ b/src/main/java/mvd/jester/tests/FonsecaNelis.java @@ -27,7 +27,6 @@ import mvd.jester.model.TreeJob; import mvd.jester.utils.DagUtils; import mvd.jester.priority.DeadlineMonotonic; import mvd.jester.priority.PriorityManager; -import mvd.jester.priority.RateMonotonic; import mvd.jester.utils.BinaryDecompositionTree; import mvd.jester.utils.BinaryDecompositionTree.Node; import mvd.jester.utils.BinaryDecompositionTree.NodeType; diff --git a/src/main/java/mvd/jester/tests/SchmidMottok.java b/src/main/java/mvd/jester/tests/SchmidMottok.java index 02e0c06..53c43f2 100644 --- a/src/main/java/mvd/jester/tests/SchmidMottok.java +++ b/src/main/java/mvd/jester/tests/SchmidMottok.java @@ -13,7 +13,6 @@ import mvd.jester.model.SystemManagerInterface; import mvd.jester.model.Task; import mvd.jester.priority.DeadlineMonotonic; import mvd.jester.priority.PriorityManager; -import mvd.jester.priority.RateMonotonic; /** * SchmidMottok diff --git a/src/main/java/mvd/jester/tests/UeterAgrawal.java b/src/main/java/mvd/jester/tests/UeterAgrawal.java index 052a970..8712000 100644 --- a/src/main/java/mvd/jester/tests/UeterAgrawal.java +++ b/src/main/java/mvd/jester/tests/UeterAgrawal.java @@ -136,6 +136,7 @@ public class UeterAgrawal extends AbstractTest { return false; } + @SuppressWarnings("unused") private boolean firstFitBinPackingOfTask(List bins, Task task) { Collections.sort(bins); Collections.reverse(bins); @@ -148,6 +149,7 @@ public class UeterAgrawal extends AbstractTest { return false; } + @SuppressWarnings("unused") private boolean worstFitBinPackingOfTask(List bins, Task task) { Collections.sort(bins); if (bins.get(0) + task.getDensity() <= 1) { -- libgit2 0.26.0