--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/buildings/examples/buildings-pathloss-profiler.cc Fri Feb 17 13:29:01 2012 +0100
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as
+* published by the Free Software Foundation;
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*
+* Author: Marco Miozzo <marco.miozzo@cttc.es>
+*/
+
+#include "ns3/core-module.h"
+#include "ns3/network-module.h"
+#include "ns3/mobility-module.h"
+#include "ns3/lte-module.h"
+#include "ns3/config-store.h"
+#include <ns3/buildings-propagation-loss-model.h>
+
+#include <iomanip>
+#include <string>
+#include <vector>
+
+using namespace ns3;
+using std::vector;
+
+int
+main (int argc, char *argv[])
+{
+
+ double hEnb = 30.0;
+ double hUe = 1.0;
+ bool enbIndoor = false;
+ bool ueIndoor = false;
+ CommandLine cmd;
+
+ cmd.AddValue("hEnb", "Height of the eNB", hEnb);
+ cmd.AddValue("hUe", "Height of UE", hUe);
+ cmd.AddValue("enbIndoor", "Boolean for eNB Indoor/Outdoor selection", enbIndoor);
+ cmd.AddValue("ueIndoor", "Boolean for UE Indoor/Outdoor selection", ueIndoor);
+ cmd.Parse(argc, argv);
+
+ ConfigStore inputConfig;
+ inputConfig.ConfigureDefaults ();
+
+
+ // parse again so you can override default values from the command line
+ cmd.Parse (argc, argv);
+
+
+ std::ofstream outFile;
+ outFile.open ("buildings-pathloss-profiler.out");
+ if (!outFile.is_open ())
+ {
+ NS_FATAL_ERROR ("Can't open output file");
+ }
+
+ Ptr<BuildingsMobilityModel> mmEnb = CreateObject<BuildingsMobilityModel> ();
+ mmEnb->SetPosition (Vector (0.0, 0.0, hEnb));
+ if (enbIndoor)
+ {
+ static Ptr<Building> building1 = Create<Building> (0.0, 10.0, 0.0, 10.0, 0.0, 20.0 /*, 1, 1, 1*/);
+ building1->SetBuildingType (Building::Residential);
+ building1->SetExtWallsType (Building::ConcreteWithWindows);
+ mmEnb->SetIndoor (building1);
+ }
+
+ Ptr<BuildingsPropagationLossModel> propagationLossModel = CreateObject<BuildingsPropagationLossModel> ();
+ // cancel shadowing effect
+ propagationLossModel->SetAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0));
+ propagationLossModel->SetAttribute ("ShadowSigmaIndoor", DoubleValue (0.0));
+ propagationLossModel->SetAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0));
+
+// propagationLossModel->SetAttribute ("Los2NlosThr", DoubleValue (1550.0));
+
+ //for (uint8_t i = 0; i < 23; i++)
+ for (uint32_t i = 1; i < 2300; i++)
+ {
+ Ptr<BuildingsMobilityModel> mmUe = CreateObject<BuildingsMobilityModel> ();
+ mmUe->SetPosition (Vector (i, 0.0, hUe));
+ double loss = propagationLossModel->GetLoss (mmEnb, mmUe);
+ outFile << i << "\t"
+ << loss
+ << std::endl;
+ }
+
+ Simulator::Destroy ();
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/buildings/examples/wscript Fri Feb 17 13:29:01 2012 +0100
@@ -0,0 +1,6 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+ obj = bld.create_ns3_program('buildings-pathloss-profiler',
+ ['buildings'])
+ obj.source = 'buildings-pathloss-profiler.cc'
--- a/src/buildings/wscript Tue Feb 14 16:44:27 2012 +0100
+++ b/src/buildings/wscript Fri Feb 17 13:29:01 2012 +0100
@@ -2,7 +2,7 @@
def build(bld):
- module = bld.create_ns3_module('buildings', ['mobility', 'propagation'])
+ module = bld.create_ns3_module('buildings', ['mobility', 'propagation', 'config-store'])
module.source = [
'model/building.cc',
'model/building-list.cc',
@@ -30,8 +30,8 @@
'test/buildings-shadowing-test.h',
]
-# if (bld.env['ENABLE_EXAMPLES']):
-# bld.add_subdirs('examples')
+ if (bld.env['ENABLE_EXAMPLES']):
+ bld.add_subdirs('examples')
bld.ns3_python_bindings()
--- a/src/lte/doc/source/lte-design.rst Tue Feb 14 16:44:27 2012 +0100
+++ b/src/lte/doc/source/lte-design.rst Fri Feb 17 13:29:01 2012 +0100
@@ -1168,7 +1168,7 @@
CBLER_i = \frac{1}{2}\left[1-erf\left(\frac{x-b_{ECR}}{\sqrt{2}c_{ECR}} \right) \right]
-where :math:`x` is the MI of the TB, :math:`b_{ECR}` represents the "transition center" and :math:`c_{ECR}` is related to the "transition width" of the Gaussian cumulative distribution for each Effective Code Rate (ECR) which is the actual transmission rate according to the channel coding and MCS. For limiting the computational complexity of the model we considered only a subset of the possible ECRs in fact we would have potentially 5076 possible ECRs (i.e., 27 MCSs and 188 CB sizes). On this respect, we will limit the CB sizes to some representative values (i.e., 40, 140, 256, 512, 1024, 2048, 4032, 6144), while for the others the worst one approximating the real one will be used (i.e., the smaller CB size value available respect to the real one). This choice is aligned to the typical performance of turbo codes, where the CB size is not strongly impacting on the BLER. However, it is to be notes that for CB sizes lower than 1000 bits the effect might be relevant (i.e., till 2 dB); therefore, we adopt this unbalanced sampling interval for having more precision where it is necessary. This behaviour is confirmed by the figures presented in the Annes Section.
+where :math:`x` is the MI of the TB, :math:`b_{ECR}` represents the "transition center" and :math:`c_{ECR}` is related to the "transition width" of the Gaussian cumulative distribution for each Effective Code Rate (ECR) which is the actual transmission rate according to the channel coding and MCS. For limiting the computational complexity of the model we considered only a subset of the possible ECRs in fact we would have potentially 5076 possible ECRs (i.e., 27 MCSs and 188 CB sizes). On this respect, we will limit the CB sizes to some representative values (i.e., 40, 140, 160, 256, 512, 1024, 2048, 4032, 6144), while for the others the worst one approximating the real one will be used (i.e., the smaller CB size value available respect to the real one). This choice is aligned to the typical performance of turbo codes, where the CB size is not strongly impacting on the BLER. However, it is to be notes that for CB sizes lower than 1000 bits the effect might be relevant (i.e., till 2 dB); therefore, we adopt this unbalanced sampling interval for having more precision where it is necessary. This behaviour is confirmed by the figures presented in the Annes Section.
Link Layer Performance
--- a/src/lte/model/lte-rlc-um.cc Tue Feb 14 16:44:27 2012 +0100
+++ b/src/lte/model/lte-rlc-um.cc Fri Feb 17 13:29:01 2012 +0100
@@ -671,7 +671,57 @@
break;
case (LteRlcHeader::NO_FIRST_BYTE | LteRlcHeader::LAST_BYTE):
+ m_reassemblingState = WAITING_S0_FULL;
+
+ /**
+ * Discard SI or SN
+ */
+ m_sdusBuffer.pop_front ();
+
+ /**
+ * Deliver zero, one or multiple PDUs
+ */
+ while ( ! m_sdusBuffer.empty () )
+ {
+ m_rlcSapUser->ReceivePdcpPdu (m_sdusBuffer.front ());
+ m_sdusBuffer.pop_front ();
+ }
+ break;
+
case (LteRlcHeader::NO_FIRST_BYTE | LteRlcHeader::NO_LAST_BYTE):
+ if ( m_sdusBuffer.size () == 1 )
+ {
+ m_reassemblingState = WAITING_S0_FULL;
+ }
+ else
+ {
+ m_reassemblingState = WAITING_SI_SF;
+ }
+
+ /**
+ * Discard SI or SN
+ */
+ m_sdusBuffer.pop_front ();
+
+ if ( m_sdusBuffer.size () > 0 )
+ {
+ /**
+ * Deliver zero, one or multiple PDUs
+ */
+ while ( m_sdusBuffer.size () > 1 )
+ {
+ m_rlcSapUser->ReceivePdcpPdu (m_sdusBuffer.front ());
+ m_sdusBuffer.pop_front ();
+ }
+
+ /**
+ * Keep S0
+ */
+ m_keepS0 = m_sdusBuffer.front ();
+ m_sdusBuffer.pop_front ();
+ }
+ break;
+
default:
/**
* ERROR: Transition not possible