Skip to content

Commit ffdb25a

Browse files
committed
Fix outage condition
1 parent 216fa05 commit ffdb25a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed
-598 Bytes
Loading
136 Bytes
Loading

docs/source/examples/siso_dl_noma.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"rate_f = np.log2(1 + UEf.sinr)\n",
276276
"\n",
277277
"# Rate thresholds\n",
278-
"thresh_n = 3\n",
278+
"thresh_n = 1\n",
279279
"thresh_f = 1\n",
280280
"\n",
281281
"# JIT compiled as mc can be very large (>> 10000)\n",
@@ -286,7 +286,7 @@
286286
"\n",
287287
" for i in range(len(Pt)):\n",
288288
" for k in range(mc):\n",
289-
" if rate_fn[i, k] < thresh_f and rate_n[i, k] < thresh_n:\n",
289+
" if rate_fn[i, k] < thresh_f or rate_n[i, k] < thresh_n:\n",
290290
" outage_n[i] += 1\n",
291291
" if rate_f[i, k] < thresh_f:\n",
292292
" outage_f[i] += 1\n",

docs/source/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,13 @@ for i, p in enumerate(Pt_lin):
178178
)
179179
UEn.sinr[i, :] = (BS.allocations["UEn"] * p * gain_n) / N0_lin
180180

181-
# Shannon capacity
181+
182182
rate_fn = np.log2(1 + UEn.sinr_pre)
183183
rate_n = np.log2(1 + UEn.sinr)
184184
rate_f = np.log2(1 + UEf.sinr)
185185

186186
# Rate thresholds
187-
thresh_n = 3
187+
thresh_n = 1
188188
thresh_f = 1
189189

190190
# JIT compiled as mc can be very large (>> 10000)
@@ -195,7 +195,7 @@ def get_outage(rate_fn, rate_n, rate_f, thresh_n, thresh_f):
195195

196196
for i in range(len(Pt)):
197197
for k in range(mc):
198-
if rate_fn[i, k] < thresh_f and rate_n[i, k] < thresh_n:
198+
if rate_fn[i, k] < thresh_f or rate_n[i, k] < thresh_n:
199199
outage_n[i] += 1
200200
if rate_f[i, k] < thresh_f:
201201
outage_f[i] += 1

examples/siso_dl_noma.ipynb

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)