RandomDiscPositionAllocator Error setting Theta and Rho

已查看 52 次
跳至第一个未读帖子

Masood Abbasi

未读,
2018年12月15日 00:28:322018/12/15
收件人 ns-3-users
Hi All
I am getting errors on setting "Theta"  or "Rho" or both attributes only able to set "X" and "Y" parameter
msg="Invalid value for attribute set (Theta) on ns3::RandomDiscPositionAllocator", file=../src/core/model/object-factory.cc  or
msg="Invalid value for attribute set (Rho) on ns3::RandomDiscPositionAllocator", file=../src/core/model/object-factory.cc

MobilityHelper mobility;
  mobility.SetPositionAllocator ("ns3::RandomDiscPositionAllocator", "Theta", RandomVariableValue(UniformVariable (0.0, 6.2830)), "Rho", RandomVariableValue(UniformVariable (0.0, 0.0)), "X", DoubleValue (0.0),          "Y", DoubleValue (0.0));

ma.m...@gmail.com

未读,
2018年12月15日 07:35:182018/12/15
收件人 ns-3-users
Hi Masood,
The syntax is wrong.
mobility.SetPositionAllocator ("ns3::RandomDiscPositionAllocator", "Theta", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=6.2830]")
                                                                 
, "Rho", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=200.0]"))
                                                                 
, "X", DoubleValue (0.0)
                                                                 
, "Y", DoubleValue (0.0));
good luck

Masood Abbasi

未读,
2018年12月16日 02:50:182018/12/16
收件人 ns-3-users
Thanks Max It worked. Just remove [Min=0.0|Max=200.0]")) <- extra bracket
回复全部
回复作者
转发
0 个新帖子