From e89eefa529b6e18edf0aabbcf4090c0a7edf91fb Mon Sep 17 00:00:00 2001 From: Tr1xt4n Date: Fri, 17 Mar 2023 10:42:51 +0100 Subject: [PATCH] maj MAXSnr --- src/main/java/fr/ntr/scheduler/MaxSNR.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/fr/ntr/scheduler/MaxSNR.java b/src/main/java/fr/ntr/scheduler/MaxSNR.java index c346bfd..0fc7211 100644 --- a/src/main/java/fr/ntr/scheduler/MaxSNR.java +++ b/src/main/java/fr/ntr/scheduler/MaxSNR.java @@ -1,18 +1,28 @@ package fr.ntr.scheduler; import java.util.List; +import fr.ntr.ResourceBlock; import fr.ntr.User; public class MaxSNR extends Scheduler { private List users; + private ResourceBlock[][] frame; + @Override public void scheduling() { User userMax = null; for(int ts = 0; ts < 2; ts++){ for(int sp = 0; sp < 100; sp++){ userMax = selectionUtilisateur(sp, ts, users); + if (userMax.getPacketsToSend() == null) { + users.remove(userMax); + }else{ + //sub the packet send need Set packet + userMax.getPacketsToSend(); + } + frame[ts][sp].setUser(selectionUtilisateur(sp, ts, users)); } } }