20 #include "ns3/config-store.h"
21 #include "ns3/core-module.h"
22 #include "ns3/mobility-module.h"
23 #include "ns3/network-module.h"
24 #include <ns3/buildings-helper.h>
25 #include <ns3/constant-position-mobility-model.h>
26 #include <ns3/hybrid-buildings-propagation-loss-model.h>
36 main(
int argc,
char* argv[])
40 bool enbIndoor =
false;
41 bool ueIndoor =
false;
44 cmd.AddValue(
"hEnb",
"Height of the eNB", hEnb);
45 cmd.AddValue(
"hUe",
"Height of UE", hUe);
46 cmd.AddValue(
"enbIndoor",
"Boolean for eNB Indoor/Outdoor selection", enbIndoor);
47 cmd.AddValue(
"ueIndoor",
"Boolean for UE Indoor/Outdoor selection", ueIndoor);
48 cmd.Parse(argc, argv);
54 cmd.Parse(argc, argv);
56 std::ofstream outFile;
57 outFile.open(
"buildings-pathloss-profiler.out");
58 if (!outFile.is_open())
64 mmEnb->SetPosition(Vector(0.0, 0.0, hEnb));
67 Ptr<Building> building1 = CreateObject<Building>(-2, 2, -2, 2, 0.0, 20.0);
73 mmEnb->AggregateObject(buildingInfoEnb);
74 buildingInfoEnb->MakeConsistent(mmEnb);
77 CreateObject<HybridBuildingsPropagationLossModel>();
79 propagationLossModel->SetAttribute(
"ShadowSigmaOutdoor",
DoubleValue(0.0));
80 propagationLossModel->SetAttribute(
"ShadowSigmaIndoor",
DoubleValue(0.0));
81 propagationLossModel->SetAttribute(
"ShadowSigmaExtWalls",
DoubleValue(0.0));
86 for (uint32_t i = 1; i < 2300; i++)
89 mmUe->SetPosition(Vector(i, 0.0, hUe));
91 mmUe->AggregateObject(buildingInfoUe);
92 buildingInfoUe->MakeConsistent(mmUe);
93 double loss = propagationLossModel->GetLoss(mmEnb, mmUe);
94 outFile << i <<
"\t" << loss << std::endl;
Parse command-line arguments.
void ConfigureDefaults()
Configure the default values.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Smart pointer class similar to boost::intrusive_ptr.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Every class exported by the ns3 library is enclosed in the ns3 namespace.