src/lte/examples/lena-profiling.cc
changeset 8601 105d17d0138b
parent 8561 89164d840d69
child 8769 292e9e8345cf
equal deleted inserted replaced
8595:5d193f3e4195 8601:105d17d0138b
   106           for (uint32_t column = 0; column < nRooms && plantedEnb < nEnbPerFloor; column++, plantedEnb++)
   106           for (uint32_t column = 0; column < nRooms && plantedEnb < nEnbPerFloor; column++, plantedEnb++)
   107             {
   107             {
   108               Vector v (roomLength * (column + 0.5), roomLength * (row + 0.5), nodeHeight);
   108               Vector v (roomLength * (column + 0.5), roomLength * (row + 0.5), nodeHeight);
   109               positionAlloc->Add (v);
   109               positionAlloc->Add (v);
   110               enbPosition.push_back (v);
   110               enbPosition.push_back (v);
   111               mobility.Install (ueNodes[plantedEnb]);
   111               mobility.Install (ueNodes.at(plantedEnb));
   112             }
   112             }
   113         }
   113         }
   114       mobility.SetPositionAllocator (positionAlloc);
   114       mobility.SetPositionAllocator (positionAlloc);
   115       mobility.Install (enbNodes);
   115       mobility.Install (enbNodes);
   116 
   116 
   117       // Position of UEs attached to eNB
   117       // Position of UEs attached to eNB
   118       for (uint32_t i = 0; i < nEnb; i++)
   118       for (uint32_t i = 0; i < nEnb; i++)
   119         {
   119         {
   120           UniformVariable posX (enbPosition[i].x - roomLength * 0.5,
   120           UniformVariable posX (enbPosition.at(i).x - roomLength * 0.5,
   121                                 enbPosition[i].x + roomLength * 0.5);
   121                                 enbPosition.at(i).x + roomLength * 0.5);
   122           UniformVariable posY (enbPosition[i].y - roomLength * 0.5,
   122           UniformVariable posY (enbPosition.at(i).y - roomLength * 0.5,
   123                                 enbPosition[i].y + roomLength * 0.5);
   123                                 enbPosition.at(i).y + roomLength * 0.5);
   124           positionAlloc = CreateObject<ListPositionAllocator> ();
   124           positionAlloc = CreateObject<ListPositionAllocator> ();
   125           for (uint32_t j = 0; j < nUe; j++)
   125           for (uint32_t j = 0; j < nUe; j++)
   126             {
   126             {
   127               positionAlloc->Add (Vector (posX.GetValue (), posY.GetValue (), nodeHeight));
   127               positionAlloc->Add (Vector (posX.GetValue (), posY.GetValue (), nodeHeight));
   128               mobility.SetPositionAllocator (positionAlloc);
   128               mobility.SetPositionAllocator (positionAlloc);
   129             }
   129             }
   130           mobility.Install (ueNodes[i]);
   130           mobility.Install (ueNodes.at(i));
   131         }
   131         }
   132 
   132 
   133     }
   133     }
   134   else
   134   else
   135     {
   135     {
   162                   mmEnb->SetFloorNumber (floor);
   162                   mmEnb->SetFloorNumber (floor);
   163                   mmEnb->SetRoomNumberX (row);
   163                   mmEnb->SetRoomNumberX (row);
   164                   mmEnb->SetRoomNumberY (column);
   164                   mmEnb->SetRoomNumberY (column);
   165 
   165 
   166                   // Positioning UEs attached to eNB
   166                   // Positioning UEs attached to eNB
   167                   mobility.Install (ueNodes[plantedEnb]);
   167                   mobility.Install (ueNodes.at(plantedEnb));
   168                   for (uint32_t ue = 0; ue < nUe; ue++)
   168                   for (uint32_t ue = 0; ue < nUe; ue++)
   169                     {
   169                     {
   170                       Ptr<BuildingsMobilityModel> mmUe = ueNodes[plantedEnb].Get (ue)->GetObject<BuildingsMobilityModel> ();
   170                       Ptr<BuildingsMobilityModel> mmUe = ueNodes.at(plantedEnb).Get (ue)->GetObject<BuildingsMobilityModel> ();
   171                       Vector vUe (v.x, v.y, v.z);
   171                       Vector vUe (v.x, v.y, v.z);
   172                       mmUe->SetPosition (vUe);
   172                       mmUe->SetPosition (vUe);
   173                       mmUe->SetIndoor (building);
   173                       mmUe->SetIndoor (building);
   174                       mmUe->SetFloorNumber (floor);
   174                       mmUe->SetFloorNumber (floor);
   175                       mmUe->SetRoomNumberX (row);
   175                       mmUe->SetRoomNumberX (row);
   189   NetDeviceContainer enbDevs;
   189   NetDeviceContainer enbDevs;
   190   vector < NetDeviceContainer > ueDevs;
   190   vector < NetDeviceContainer > ueDevs;
   191   enbDevs = lteHelper->InstallEnbDevice (enbNodes);
   191   enbDevs = lteHelper->InstallEnbDevice (enbNodes);
   192   for (uint32_t i = 0; i < nEnb; i++)
   192   for (uint32_t i = 0; i < nEnb; i++)
   193     {
   193     {
   194       NetDeviceContainer ueDev = lteHelper->InstallUeDevice (ueNodes[i]);
   194       NetDeviceContainer ueDev = lteHelper->InstallUeDevice (ueNodes.at(i));
   195       ueDevs.push_back (ueDev);
   195       ueDevs.push_back (ueDev);
   196       lteHelper->Attach (ueDev, enbDevs.Get (i));
   196       lteHelper->Attach (ueDev, enbDevs.Get (i));
   197       enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
   197       enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
   198       EpsBearer bearer (q);
   198       EpsBearer bearer (q);
   199       lteHelper->ActivateEpsBearer (ueDev, bearer, EpcTft::Default ());
   199       lteHelper->ActivateEpsBearer (ueDev, bearer, EpcTft::Default ());