From b2862c9a9ff8c77e426c07aa0527d986bc35eec3 Mon Sep 17 00:00:00 2001 From: iboyeau Date: Thu, 30 Mar 2023 09:53:41 +0200 Subject: [PATCH] update --- src/main/java/fr/ntr/AccessPoint.java | 4 ++-- src/main/java/fr/ntr/Cell.java | 4 ---- src/main/java/fr/ntr/Main.java | 6 +++++- src/main/java/fr/ntr/Reuse/Reuse3.java | 6 ------ 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main/java/fr/ntr/AccessPoint.java b/src/main/java/fr/ntr/AccessPoint.java index dd55c6a..6548c5c 100644 --- a/src/main/java/fr/ntr/AccessPoint.java +++ b/src/main/java/fr/ntr/AccessPoint.java @@ -48,8 +48,8 @@ public class AccessPoint { List cellList = null; cellList.add(cell1); cellList.add(cell2); - Reuse1.BandwithReuse1(cellList,ticks); - //Reuse3.BandwithReuse3(cellList,ticks); + cell1.updateBandwidth(ticks); + cell2.updateBandwidth(ticks); cell1.schedule(); cell2.schedule(); diff --git a/src/main/java/fr/ntr/Cell.java b/src/main/java/fr/ntr/Cell.java index fee900a..b7227ad 100644 --- a/src/main/java/fr/ntr/Cell.java +++ b/src/main/java/fr/ntr/Cell.java @@ -78,10 +78,6 @@ public class Cell { return frame; } - public void setFrameSize(ResourceBlock[][] frame) { - this.frame=frame; - } - public static int getTimeSlotNb() { return timeSlotNb; } diff --git a/src/main/java/fr/ntr/Main.java b/src/main/java/fr/ntr/Main.java index 69b7bd2..ace0947 100644 --- a/src/main/java/fr/ntr/Main.java +++ b/src/main/java/fr/ntr/Main.java @@ -27,11 +27,15 @@ public class Main { int subCarrierNb = 100; for(int i = 2; i < maximumLoad; i += 2) { List users = generateUsers(i, timeSlotNb, subCarrierNb); - ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb]; + + //TODO reuse choise + + ResourceBlock[][] frame = new ResourceBlock[timeSlotNb/2][subCarrierNb]; //TODO : changes schedulers Scheduler schedulerCell1 = new MaxSNR(frame, users); Scheduler schedulerCell2 = new MaxSNR(frame, users); //TODO : modify cells parameters ? + Cell cell1 = new Cell(schedulerCell1, frame, users, timeSlotNb, subCarrierNb, 0, 50); Cell cell2 = new Cell(schedulerCell2, frame, users, timeSlotNb, subCarrierNb, 0, 50); AccessPoint accessPoint = new AccessPoint(cell1, cell2); diff --git a/src/main/java/fr/ntr/Reuse/Reuse3.java b/src/main/java/fr/ntr/Reuse/Reuse3.java index 31e9480..bdacd93 100644 --- a/src/main/java/fr/ntr/Reuse/Reuse3.java +++ b/src/main/java/fr/ntr/Reuse/Reuse3.java @@ -7,15 +7,9 @@ import java.util.List; public class Reuse3 { - //TODO Reuse3 - - public static void BandwithReuse3(List cellList, int tick) { for (Cell cell : cellList) { - //TODO set size - //cell.setFrameSize(cellList.size()); - cell.updateBandwidth(tick); } }