|
|
| 302 |
enbDevs = lteHelper->InstallEnbDevice (enbNodes); |
302 |
enbDevs = lteHelper->InstallEnbDevice (enbNodes); |
| 303 |
ueDevs = lteHelper->InstallUeDevice (ueNodes); |
303 |
ueDevs = lteHelper->InstallUeDevice (ueNodes); |
| 304 |
|
304 |
|
|
|
305 |
// Using the LTE helper, assign fixed random variable streams to the |
| 306 |
// underlying random variables, to avoid test portability problems |
| 307 |
int64_t streamIndex = 1; |
| 308 |
streamIndex += lteHelper->AssignStreams (enbDevs, streamIndex); |
| 309 |
streamIndex += lteHelper->AssignStreams (ueDevs, streamIndex); |
| 310 |
|
| 305 |
// Attach a UE to a eNB |
311 |
// Attach a UE to a eNB |
| 306 |
lteHelper->Attach (ueDevs, enbDevs.Get (0)); |
312 |
lteHelper->Attach (ueDevs, enbDevs.Get (0)); |
| 307 |
|
313 |
|
|
|
| 411 |
enbDevs = lteHelper->InstallEnbDevice (enbNodes); |
417 |
enbDevs = lteHelper->InstallEnbDevice (enbNodes); |
| 412 |
ueDevs = lteHelper->InstallUeDevice (ueNodes); |
418 |
ueDevs = lteHelper->InstallUeDevice (ueNodes); |
| 413 |
|
419 |
|
|
|
420 |
// Using the LTE helper, assign fixed random variable streams to the |
| 421 |
// underlying random variables, to avoid test portability problems |
| 422 |
int64_t streamIndex = 1; |
| 423 |
streamIndex += lteHelper->AssignStreams (enbDevs, streamIndex); |
| 424 |
streamIndex += lteHelper->AssignStreams (ueDevs, streamIndex); |
| 425 |
|
| 414 |
// Attach a UE to a eNB |
426 |
// Attach a UE to a eNB |
| 415 |
lteHelper->Attach (ueDevs, enbDevs.Get (0)); |
427 |
lteHelper->Attach (ueDevs, enbDevs.Get (0)); |
| 416 |
|
428 |
|
|
|
| 692 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
704 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
| 693 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
705 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
| 694 |
|
706 |
|
|
|
707 |
// Using the LTE helper, assign fixed random variable streams to the |
| 708 |
// underlying random variables, to avoid test portability problems |
| 709 |
int64_t streamIndex = 1; |
| 710 |
streamIndex += lteHelper->AssignStreams (enbDevs, streamIndex); |
| 711 |
streamIndex += lteHelper->AssignStreams (ueDevs1, streamIndex); |
| 712 |
streamIndex += lteHelper->AssignStreams (ueDevs2, streamIndex); |
| 713 |
|
| 695 |
// Attach a UE to a eNB |
714 |
// Attach a UE to a eNB |
| 696 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
715 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
| 697 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
716 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
|
|
| 867 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
886 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
| 868 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
887 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
| 869 |
|
888 |
|
|
|
889 |
// Using the LTE helper, assign fixed random variable streams to the |
| 890 |
// underlying random variables, to avoid test portability problems |
| 891 |
int64_t streamIndex = 1; |
| 892 |
streamIndex += lteHelper->AssignStreams (enbDevs, streamIndex); |
| 893 |
streamIndex += lteHelper->AssignStreams (ueDevs1, streamIndex); |
| 894 |
streamIndex += lteHelper->AssignStreams (ueDevs2, streamIndex); |
| 895 |
|
| 870 |
// Attach a UE to a eNB |
896 |
// Attach a UE to a eNB |
| 871 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
897 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
| 872 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
898 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
|
|
| 947 |
Simulator::Stop (Seconds (1.500)); |
973 |
Simulator::Stop (Seconds (1.500)); |
| 948 |
Simulator::Run (); |
974 |
Simulator::Run (); |
| 949 |
|
975 |
|
| 950 |
#if 0 |
|
|
| 951 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongDlRbg, false, |
976 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongDlRbg, false, |
| 952 |
"Scheduler used DL RBG muted by FFR Algorithm"); |
977 |
"Scheduler used DL RBG muted by FFR Algorithm"); |
| 953 |
|
978 |
|
| 954 |
#endif |
|
|
| 955 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongUlRbg, false, |
979 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongUlRbg, false, |
| 956 |
"Scheduler used UL RB muted by FFR Algorithm"); |
980 |
"Scheduler used UL RB muted by FFR Algorithm"); |
| 957 |
|
981 |
|
|
|
| 1055 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
1079 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
| 1056 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
1080 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
| 1057 |
|
1081 |
|
|
|
1082 |
// Using the LTE helper, assign fixed random variable streams to the |
| 1083 |
// underlying random variables, to avoid test portability problems |
| 1084 |
int64_t streamIndex = 1; |
| 1085 |
streamIndex += lteHelper->AssignStreams (enbDevs, streamIndex); |
| 1086 |
streamIndex += lteHelper->AssignStreams (ueDevs1, streamIndex); |
| 1087 |
streamIndex += lteHelper->AssignStreams (ueDevs2, streamIndex); |
| 1088 |
|
| 1058 |
// Attach a UE to a eNB |
1089 |
// Attach a UE to a eNB |
| 1059 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
1090 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
| 1060 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
1091 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
|
|
| 1276 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
1307 |
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1); |
| 1277 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
1308 |
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2); |
| 1278 |
|
1309 |
|
|
|
1310 |
// Using the LTE helper, assign fixed random variable streams to the |
| 1311 |
// underlying random variables, to avoid test portability problems |
| 1312 |
int64_t streamIndex = 1; |
| 1313 |
streamIndex += lteHelper->AssignStreams (enbDevs, streamIndex); |
| 1314 |
streamIndex += lteHelper->AssignStreams (ueDevs1, streamIndex); |
| 1315 |
streamIndex += lteHelper->AssignStreams (ueDevs2, streamIndex); |
| 1316 |
|
| 1279 |
// Attach a UE to a eNB |
1317 |
// Attach a UE to a eNB |
| 1280 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
1318 |
lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
| 1281 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
1319 |
lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
|
|
| 1435 |
UintegerValue (0)); |
1473 |
UintegerValue (0)); |
| 1436 |
|
1474 |
|
| 1437 |
uint8_t bandwidth = 25; |
1475 |
uint8_t bandwidth = 25; |
|
|
1476 |
int64_t streamIndex = 1; |
| 1438 |
|
1477 |
|
| 1439 |
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); |
1478 |
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); |
| 1440 |
Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> (); |
1479 |
Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> (); |
|
|
| 1449 |
Ptr<Node> remoteHost = remoteHostContainer.Get (0); |
1488 |
Ptr<Node> remoteHost = remoteHostContainer.Get (0); |
| 1450 |
InternetStackHelper internet; |
1489 |
InternetStackHelper internet; |
| 1451 |
internet.Install (remoteHostContainer); |
1490 |
internet.Install (remoteHostContainer); |
|
|
1491 |
streamIndex += internet.AssignStreams (remoteHostContainer, streamIndex); |
| 1452 |
|
1492 |
|
| 1453 |
// Create the Internet |
1493 |
// Create the Internet |
| 1454 |
PointToPointHelper p2ph; |
1494 |
PointToPointHelper p2ph; |
|
|
| 1529 |
ueLteDevs.Add (ueDevs1); |
1569 |
ueLteDevs.Add (ueDevs1); |
| 1530 |
ueLteDevs.Add (ueDevs2); |
1570 |
ueLteDevs.Add (ueDevs2); |
| 1531 |
|
1571 |
|
|
|
1572 |
// Using the LTE helper, assign fixed random variable streams to the |
| 1573 |
// underlying random variables, to avoid test portability problems |
| 1574 |
streamIndex += lteHelper->AssignStreams (enbDevs, streamIndex); |
| 1575 |
streamIndex += lteHelper->AssignStreams (ueDevs1, streamIndex); |
| 1576 |
streamIndex += lteHelper->AssignStreams (ueDevs2, streamIndex); |
| 1577 |
|
| 1532 |
// Add X2 inteface |
1578 |
// Add X2 inteface |
| 1533 |
lteHelper->AddX2Interface (enbNodes); |
1579 |
lteHelper->AddX2Interface (enbNodes); |
| 1534 |
|
1580 |
|
| 1535 |
// Install the IP stack on the UEs |
1581 |
// Install the IP stack on the UEs |
| 1536 |
internet.Install (ueNodes); |
1582 |
internet.Install (ueNodes); |
|
|
1583 |
streamIndex += internet.AssignStreams (ueNodes, streamIndex); |
| 1537 |
Ipv4InterfaceContainer ueIpIfaces; |
1584 |
Ipv4InterfaceContainer ueIpIfaces; |
| 1538 |
ueIpIfaces = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevs)); |
1585 |
ueIpIfaces = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevs)); |
| 1539 |
// Assign IP address to UEs, and install applications |
1586 |
// Assign IP address to UEs, and install applications |
|
|
| 1560 |
Ptr<UniformRandomVariable> startTimeSeconds = CreateObject<UniformRandomVariable> (); |
1607 |
Ptr<UniformRandomVariable> startTimeSeconds = CreateObject<UniformRandomVariable> (); |
| 1561 |
startTimeSeconds->SetAttribute ("Min", DoubleValue (0)); |
1608 |
startTimeSeconds->SetAttribute ("Min", DoubleValue (0)); |
| 1562 |
startTimeSeconds->SetAttribute ("Max", DoubleValue (0.010)); |
1609 |
startTimeSeconds->SetAttribute ("Max", DoubleValue (0.010)); |
|
|
1610 |
startTimeSeconds->SetStream (streamIndex++); |
| 1563 |
|
1611 |
|
| 1564 |
for (uint32_t u = 0; u < ueNodes.GetN (); ++u) |
1612 |
for (uint32_t u = 0; u < ueNodes.GetN (); ++u) |
| 1565 |
{ |
1613 |
{ |
|
|
| 1705 |
Simulator::Stop (Seconds (2.500)); |
1753 |
Simulator::Stop (Seconds (2.500)); |
| 1706 |
Simulator::Run (); |
1754 |
Simulator::Run (); |
| 1707 |
|
1755 |
|
| 1708 |
#if 0 |
|
|
| 1709 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongDlRbg, false, |
1756 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongDlRbg, false, |
| 1710 |
"Scheduler used DL RBG muted by FFR Algorithm"); |
1757 |
"Scheduler used DL RBG muted by FFR Algorithm"); |
| 1711 |
#endif |
|
|
| 1712 |
|
1758 |
|
| 1713 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongUlRbg, false, |
1759 |
NS_TEST_ASSERT_MSG_EQ (m_usedWrongUlRbg, false, |
| 1714 |
"Scheduler used UL RB muted by FFR Algorithm"); |
1760 |
"Scheduler used UL RB muted by FFR Algorithm"); |