"Set the propagation loss model first" error despite having defined "SetPathlossAttribute"

23 views
Skip to first unread message

Angèle Hager Hafaiedh

unread,
Jan 8, 2026, 6:34:48 AM (9 days ago) Jan 8
to 5G-LENA-users
I wanted to define a new channel model inside gsoc-nr-channel-models.cc, but i get the "Set the propagation loss model first" error, eventhough I clearly defined it as follows:

   channelHelper->SetPathlossAttribute("ShadowingEnabled", BooleanValue(false));

Why does it generate error messages?

Thank you in advance

Angèle   

Albu

unread,
Jan 8, 2026, 7:28:28 AM (9 days ago) Jan 8
to 5G-LENA-users
Could you please share the code? NrChannelHelper works with ObjectFactory, and if you don't set the TypeId (by calling ConfigureFactories) before setting the attributes, it will fail. I also checked your previous message, maybe you are trying to use this new channel model with the helper. In any case, I can only figure it out if you share the code (or at least some part of it)

Bara Sabbah

unread,
Jan 8, 2026, 10:13:00 AM (9 days ago) Jan 8
to 5G-LENA-users
This is how i defined a new channel model:
( MyCustomLossModel is a model i created you can replace it with name your own model)

// check if its acustom channel model or not
if(!custom_channel){
    channelHelper->ConfigureFactories("UMi", "LOS", "ThreeGpp");
    // Disable shadowing

    channelHelper->SetPathlossAttribute("ShadowingEnabled", BooleanValue(false));
    }
    else{  
    channelHelper->ConfigurePropagationFactory(ns3::MyCustomLossModel::GetTypeId());    
    
    }

Reply all
Reply to author
Forward
0 new messages