Fix reuse

This commit is contained in:
Quentin Legot 2023-04-07 11:39:35 +02:00
parent 54f5c1636f
commit 825f4f26c7

View File

@ -29,9 +29,9 @@ public class AccessPoint {
cell1.preScheduling();
cell2.preScheduling();
for(int ts = 0; ts < Cell.getTimeSlotNb(); ts++) {
for (int sp = 0; sp < (reuse3 ? Cell.getSubCarrierNb() : Cell.getSubCarrierNb()/2); sp++) {
for (int sp = 0; sp < (reuse3 ? Cell.getSubCarrierNb() / 2 : Cell.getSubCarrierNb()); sp++) {
User user1 = cell1.schedule(ticks, ts, sp);
User user2 = cell2.schedule(ticks, ts, reuse3 ? 0 : 50 + sp);
User user2 = cell2.schedule(ticks, ts, (reuse3 ? 50 : 0) + sp);
boolean haveInterference = user1 == user2 && user1 != null;
cell1.consumeResource(ticks, ts, sp, haveInterference);
cell2.consumeResource(ticks, ts, sp, haveInterference);