<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"></p>
<div class="_rp_V4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, "EmojiFont";">
<div>
<div dir="ltr">
<div id="divtagdefaultwrapper"><font color="black" size="3" face="Calibri,Helvetica,sans-serif"><span style="font-size:12pt;" id="divtagdefaultwrapper">
<div style="margin-top:0;margin-bottom:0;">thank you sir for your reply</div>
<div style="margin-top:0;margin-bottom:0;">actually i have modified the code and implement more than one producer and try to change the forwarding strategy but i get the same metrics, even i delete this instruction
<br>
</div>
<div style="margin-top:0;margin-bottom:0;"><font color="black" size="3" face="Calibri,Helvetica,sans-serif"><span style="font-size:12pt;" id="divtagdefaultwrapper">   ndn::StrategyChoiceHelper::Install(nodes, "/", "/localhost/nfd/strategy/best-route");<br>
</span></font>it run normally but i get the results.</div>
<div style="margin-top:0;margin-bottom:0;">BTW my scenario apply on Wireless sensor network
<br>
</div>
<div style="margin-top:0;margin-bottom:0;">this is my code .. please have a look of my code:<br>
</div>
<div style="margin-top:0;margin-bottom:0;"> </div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>#include "ns3/core-module.h"<br>
#include "ns3/network-module.h"<br>
#include "ns3/applications-module.h"<br>
#include "ns3/wifi-module.h"<br>
#include "ns3/mobility-module.h"<br>
#include "ns3/internet-module.h"<br>
<br>
#include "ns3/ndnSIM-module.h"<br>
<br>
using namespace std;<br>
namespace ns3 {<br>
<br>
NS_LOG_COMPONENT_DEFINE("ndn.WifiExample");<br>
<br>
//<br>
// DISCLAIMER:  Note that this is an extremely simple example, containing just 2 wifi nodes<br>
// communicating directly over AdHoc channel.<br>
//<br>
<br>
// Ptr<ndn::NetDeviceFace><br>
// MyNetDeviceFaceCallback (Ptr<Node> node, Ptr<ndn::L3Protocol> ndn, Ptr<NetDevice> device)<br>
// {<br>
//   // NS_LOG_DEBUG ("Create custom network device " << node->GetId ());<br>
//   Ptr<ndn::NetDeviceFace> face = CreateObject<ndn::MyNetDeviceFace> (node, device);<br>
//   ndn->AddFace (face);<br>
//   return face;<br>
// }<br>
<br>
int<br>
main(int argc, char* argv[])<br>
{<br>
  // disable fragmentation<br>
  Config::SetDefault("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue("2200"));<br>
  Config::SetDefault("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue("2200"));<br>
  Config::SetDefault("ns3::WifiRemoteStationManager::NonUnicastMode",<br>
                     StringValue("OfdmRate24Mbps"));<br>
<br>
  CommandLine cmd;<br>
  cmd.Parse(argc, argv);<br>
<br>
  //////////////////////<br>
  //////////////////////<br>
  //////////////////////<br>
  WifiHelper wifi = WifiHelper::Default();<br>
  // wifi.SetRemoteStationManager ("ns3::AarfWifiManager");<br>
  wifi.SetStandard(WIFI_PHY_STANDARD_80211a);<br>
  wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "DataMode",<br>
                               StringValue("OfdmRate24Mbps"));<br>
<br>
  YansWifiChannelHelper wifiChannel; // = YansWifiChannelHelper::Default ();<br>
  wifiChannel.SetPropagationDelay("ns3::ConstantSpeedPropagationDelayModel");<br>
  wifiChannel.AddPropagationLoss("ns3::ThreeLogDistancePropagationLossModel");<br>
  wifiChannel.AddPropagationLoss("ns3::NakagamiPropagationLossModel");<br>
<br>
  // YansWifiPhy wifiPhy = YansWifiPhy::Default();<br>
  YansWifiPhyHelper wifiPhyHelper = YansWifiPhyHelper::Default();<br>
  wifiPhyHelper.SetChannel(wifiChannel.Create());<br>
  wifiPhyHelper.Set("TxPowerStart", DoubleValue(5));<br>
  wifiPhyHelper.Set("TxPowerEnd", DoubleValue(5));<br>
<br>
  NqosWifiMacHelper wifiMacHelper = NqosWifiMacHelper::Default();<br>
  wifiMacHelper.SetType("ns3::AdhocWifiMac");<br>
<br>
  Ptr<UniformRandomVariable> randomizer = CreateObject<UniformRandomVariable>();<br>
  randomizer->SetAttribute("Min", DoubleValue(10));<br>
  randomizer->SetAttribute("Max", DoubleValue(100));<br>
<br>
  MobilityHelper mobility;<br>
  mobility.SetPositionAllocator("ns3::RandomBoxPositionAllocator", "X", PointerValue(randomizer),<br>
                                "Y", PointerValue(randomizer), "Z", PointerValue(randomizer));<br>
<br>
  mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");<br>
<br>
  NodeContainer nodes;<br>
  nodes.Create(10);<br>
<br>
  ////////////////<br>
  // 1. Install Wifi<br>
  NetDeviceContainer wifiNetDevices = wifi.Install(wifiPhyHelper, wifiMacHelper, nodes);<br>
<br>
  // 2. Install Mobility model<br>
  mobility.Install(nodes);<br>
<br>
  // 3. Install NDN stack<br>
  NS_LOG_INFO("Installing NDN stack");<br>
  ndn::StackHelper ndnHelper;<br>
  // ndnHelper.AddNetDeviceFaceCreateCallback (WifiNetDevice::GetTypeId (), MakeCallback<br>
  // (MyNetDeviceFaceCallback));<br>
  ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "1000");<br>
  ndnHelper.SetDefaultRoutes(true);<br>
  ndnHelper.Install(nodes);<br>
<br>
  // Set BestRoute strategy<br>
  ndn::StrategyChoiceHelper::Install(nodes, "/", "/localhost/nfd/strategy/best-route");<br>
<br>
  ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;<br>
<br>
  ndnGlobalRoutingHelper.InstallAll();<br>
<br>
  // 4. Set up applications<br>
  NS_LOG_INFO("Installing Applications");<br>
<br>
 for(int i=0;i<2;i++)  <br>
{<br>
  ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");<br>
  consumerHelper.SetPrefix("/test/prefix");<br>
  consumerHelper.SetAttribute("Frequency", DoubleValue(10.0));<br>
  consumerHelper.Install(nodes.Get(i));<br>
<br>
}<br>
for(int i=2;i<10;i++)  <br>
{<br>
  ndn::AppHelper producerHelper("ns3::ndn::Producer");<br>
  producerHelper.SetPrefix("/");<br>
  producerHelper.SetAttribute("PayloadSize", StringValue("1200"));<br>
  producerHelper.Install(nodes.Get(i));<br>
<br>
 }<br>
  ////////////////<br>
<br>
ndn::GlobalRoutingHelper::CalculateRoutes();<br>
  Simulator::Stop(Seconds(60.0));<br>
ndn::CsTracer::InstallAll("cs-best-route.txt", Seconds(1));<br>
<br>
  Simulator::Run();<br>
  Simulator::Destroy();<br>
<br>
  return 0;<br>
}<br>
<br>
} // namespace ns3<br>
<br>
int<br>
main(int argc, char* argv[])<br>
{<br>
  return ns3::main(argc, argv);<br>
}</div>
<div><br>
</div>
<div><br>
</div>
</span></font></div>
</div>
</div>
</div>
<br>
<p></p>
</div>
</body>
</html>