From 00945a67f551b90c528438bd24b6573abe603050 Mon Sep 17 00:00:00 2001 From: mjkwiatkowski Date: Fri, 26 Jun 2026 13:33:10 +0200 Subject: feat: added the third experiment --- .../kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'opendc-compute') diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt index 42b652a7..237344f2 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/scheduler/SmartScheduler.kt @@ -68,6 +68,7 @@ public class SmartScheduler : ComputeScheduler { override fun select(iter: MutableIterator): SchedulingResult { client?.checkForInsights() + var unluckyHost = listOf("") if (numHosts == 0) { return SchedulingResult(SchedulingResultType.FAILURE) @@ -94,6 +95,11 @@ public class SmartScheduler : ComputeScheduler { for (chosenListIndex in minAvailableHost until hostsQueue.size) { chosenList = hostsQueue[chosenListIndex] for (host in chosenList) { + if(unluckyHost.isNotEmpty()){ + if(host.host.getName() in unluckyHost){ + continue + } + } // Here be filtering, but for now we remove it completely. iter.remove() chosenHost = host -- cgit v1.2.3