Reply to ns-3-users › Adding CLWPR Protocol to ns3.24

40 views
Skip to first unread message

Kunle Olutomilayo | Michigan Tech

unread,
Apr 2, 2018, 1:49:29 AM4/2/18
to ns-3-...@googlegroups.com
Replace lines 290-295 of scratch/hwits-nlos/vanet-routing-compare.cc
with lines 221-225 of src/clwpr/examples/simple-clwpr-example.cc

./scratch/visibility.txt becomes ./scratch/grid-visibility.txt

Add these where necessary:
  #include "ns3/winner-models-module.h"
  double distance = 500;  // m

Replace &wpMap entries with &gridMap



압둘하미드이드리스

unread,
Sep 4, 2025, 3:21:45 AM (9 days ago) Sep 4
to ns-3-users
Greetings Kunle,

I am using 'ns-3.45' now, but I need to implement the "Winner II B1 channel" plus V2P in Q-learning. How do I?

Here is my snippet:

    // === Internet stack & IPs (required for FlowMonitor) ===
    InternetStackHelper internet;
    internet.Install(vehicleNodes);
    internet.Install(pedestrianNodes);

    Ipv4AddressHelper ipv4;
    ipv4.SetBase("10.0.0.0", "255.255.255.0");

    // === NR-V2X helper & devices ===
    Ptr<NrHelper> nrHelper = CreateObject<NrHelper>();
    nrHelper->EnableSidelink();

    Ptr<SidelinkResourcePool> pool = CreateObject<SidelinkResourcePool>();
    pool->SetAttribute("PoolSize", UintegerValue(rbNum));
    pool->SetAttribute("Bandwidth", UintegerValue(20));
    pool->SetAttribute("SelectionWindow", UintegerValue(100));
    nrHelper->SetSidelinkResourcePool(pool);

    // === WINNER II B1 channel ===
    Ptr<SpectrumChannel> channel = CreateObject<SpectrumChannel>();

    // LOS model
    Ptr<ThreeGppPropagationLossModel> winnerLOS = CreateObject<ThreeGppPropagationLossModel>();
    winnerLOS->SetAttribute("Scenario", EnumValue(ThreeGppPropagationLossModel::UMi_StreetCanyon));
    winnerLOS->SetAttribute("ChannelCondition", EnumValue(ThreeGppPropagationLossModel::LOS));
    winnerLOS->SetAttribute("Frequency", DoubleValue(5.9e9));
    winnerLOS->SetAttribute("ShadowingStdDev", DoubleValue(4.0));
    channel->AddPropagationLossModel(winnerLOS);

    // NLOS model
Reply all
Reply to author
Forward
0 new messages