ErwinLi commented on issue #1068 at nsnam / ns-3-dev

ErwinLi
2024-04-16T10:56:58Z

Thank you very much! However, how to get the ComponentCarrier of a LteEnbNetDevice and set the bandwidth for UlBandwidth? In API document, I find the class ComponentCarrierEnb and ComponentCarrierUe, and try to configure it with:

ns.Config.Set(f"/NodeList/{enb_node_id}/DeviceList/*/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/UlBandwidth", ns.UintegerValue(6))
ns.Config.Set(f"/NodeList/{enb_node_id}/DeviceList/*/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/ComponentCarrierMap/*/UlBandwidth", ns.UintegerValue(6))
for i in ue_nodes_id:
ns.Config.Set(f"/NodeList/{i}/DeviceList/0/$ns3::LteNetDevice/$ns3::LteUeNetDevice/ComponentCarrierMapUe/*/UlBandwidth", ns.UintegerValue(6))

But it failed, the Simulator::Run() raise an Exception:

static void ns3::Simulator::Run() =>
out_of_range: vector::_M_range_check: __n (which is 12) >= this->size() (which is 6)