alloc: Only use common UL slots when calculating the capacity
Currently al possible UL slots are included in the capacity
calculation which is the base of the slot selection. Nevertheless
UL-only slots will never be used, since only one uplink slot (which
must be a common slot) will be used.
This patch changes the code to only include common slots in the
capacity sum.
Note that this might not be optimal if algorithm B supported
multiple uplink slots.
Sponsored-by: On-Waves ehf
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 187b88a..b804aab 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -567,11 +567,11 @@
test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL,
32, "algorithm B class 10 (UL and DL)");
test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL,
- 29, "algorithm B class 12 (UL and DL)");
+ 32, "algorithm B class 12 (UL and DL)");
test_successive_allocation(alloc_algorithm_b, 1, 12, TEST_MODE_UL_AND_DL,
- 31, "algorithm B class 1-12 (UL and DL)");
+ 32, "algorithm B class 1-12 (UL and DL)");
test_successive_allocation(alloc_algorithm_b, 1, 29, TEST_MODE_UL_AND_DL,
- 24, "algorithm B class 1-29 (UL and DL)");
+ 31, "algorithm B class 1-29 (UL and DL)");
test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AND_UL,
32, "algorithm A (DL and UL)");