--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/qcI1gFSyfhUJ.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
Hi Konstantinos, the problem is that the getMobilityModel is a method from a private class.
I didn't use LTE, but I think that a workaroud could be create a nodecontainer including all nodes (that are present in the trace file), and after that, create and install the movements to every node:Ns2MobilityHelper ns2 = Ns2MobilityHelper (traceFile);ns2.install()
Once that it is made, I think it is not necessary to use lte.AddMobility (because movements are already configures). After that, you are still able to use lte helper for the rest of the things you need (set the phy, ip address and so on).
Martín
El 27 de febrero de 2012 12:03, Konstantinos <dinos.k...@gmail.com> escribió:
Hi all,
I want to use Ns2MobilityHelper with LTE module and from the LTE example I see that I can add the mobility of a node through the LTE helper as follows:
Ptr<ConstantVelocityMobilityModel> ueMobility = CreateObject<ConstantVelocityMobilityModel> ();
lte.AddMobility (ue[i]->GetPhy (), ueMobility);
However, the AddMobility(Ptr<LtePhy> phy, Ptr<MobilityModel>m) requires a pointer to a mobility model.
I want to use the Ns2MobilityHelper to load the traces of the nodes, and I see that it has a method to get a pointer to mobility model
Ptr<ConstantVelocityMobilityModel> GetMobilityModel (std::string idString, const ObjectStore &store) const;
but I can't find how I can use it. What is the idString and what is the &store?
idString is the "/NodeList/[i]"
I'm trying something like this:
// Create Ns2MobilityHelper with the specified trace log file as parameter
Ns2MobilityHelper ns2 = Ns2MobilityHelper (traceFile);
ns2.Install (); // configure movements for each node, while reading trace file
lte.AddMobility (ue[i]->GetPhy (), ns2.GetMobilityModel() );
but I don't know what arguments to pass in the GetMobilityModel.
Regards,
Konstantinos
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/qcI1gFSyfhUJ.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
--
Martín
Hi Konstantinos, the problem is that the getMobilityModel is a method from a private class.
The GetMobiltyModel is a public method of the ns2-mobility-helper and returns a pointer to ConstantVelocityMobilityModel but it requires two arguments, a string and a ObjectStore& which are not defined in the documentation or in any example in order to see what is needed.
I didn't use LTE, but I think that a workaroud could be create a nodecontainer including all nodes (that are present in the trace file), and after that, create and install the movements to every node:Ns2MobilityHelper ns2 = Ns2MobilityHelper (traceFile);ns2.install()The thing is that I have 2 node containers: one for UE - mobile that I want to use the tracefile and one container for the eNB (which I use constant position mobility model. If for example I have 10 UE and 1 eNB and the trace file has the information for these 10 UE nodes, will the ns2.Install() only on the 10 UE ?? Is there any particular order I have to create these containers (eg first the UE container)?
Once that it is made, I think it is not necessary to use lte.AddMobility (because movements are already configures). After that, you are still able to use lte helper for the rest of the things you need (set the phy, ip address and so on).
Are you sure about it? Because in the example of LTE I see they use this AddMobility.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/J_Rf3NfZfKEJ.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
Hi again,
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
--
Martín
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/J_Rf3NfZfKEJ.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
--
Martín
Hi again,
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
--
Martín
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/J_Rf3NfZfKEJ.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
--
Martín
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Z1UnbY_P7rc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Z1UnbY_P7rc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
NodeContainer ueNodes;
ueNodes.Create (numberOfUes);To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
lte.AddDownlinkChannelRealization (enbMobility, ueNodes.Get(i)->GetObject<Mobility>(), ue[i]->GetPhy ());To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Z1UnbY_P7rc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
uint16_t numberOfUes = 10;
std::string traceFile = "src/mobility/examples/bonnmotion.ns_movements";
// Install Mobility Model for Ues position from bonnmotion tool
Ns2MobilityHelper ns2 = Ns2MobilityHelper (traceFile);
// create Ues
NodeContainer ueNodes;
ueNodes.Create(numberOfUes);
//
ns2.Install(); //configure movements for each node, while reading trace filethe Ns2MobilityHelper has not the nodecontainer as input. it is not strange ?Ns2MobilityHelper ?
Best regards.
void
Ns2MobilityHelper::Install (void) const
{
Install (NodeList::Begin (), NodeList::End ());
}
template <typename T>
void
Ns2MobilityHelper::Install (T begin, T end) const
{
class MyObjectStore : public ObjectStore
{
public:
MyObjectStore (T begin, T end)
: m_begin (begin),
m_end (end)
{}
virtual Ptr<Object> Get (uint32_t i) const {
T iterator = m_begin;
iterator += i;
if (iterator >= m_end)
{
return 0;
}
return *iterator;
}
private:
T m_begin;
T m_end;
};
ConfigNodesMovements (MyObjectStore (begin, end));
}
No, it is not taking as input the trace file node list... but the ns3 nodelist (https://www.nsnam.org/doxygen/classns3_1_1_node_list.html)Then it compares the ID of the node in the node list with the ID in the trace file to configure the movement of the node.Quoting the NS3 API (https://www.nsnam.org/doxygen/classns3_1_1_ns2_mobility_helper.html#ae54f17492e3efd54ff7501566fc6e9cf)Read the ns2 trace file and configure the movement patterns of all nodes contained in the global ns3::NodeList whose nodeId is matches the nodeId of the nodes in the trace file.
// Install Mobility Model for Ues position from bonnmotion tool
Ns2MobilityHelper ns2 = Ns2MobilityHelper (traceFile);
// create Ues
NodeContainer ueNodes;
ueNodes.Create(numberOfUes);
mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
mobility.Install(ueNodes);
ns2.Install(); //configure movements for each node, while reading trace fileProgram received signal SIGSEGV, Segmentation fault.
0xb45865b0 in __dynamic_cast ()
from /usr/lib/i386-linux-gnu/libstdc++.so.6
| idString | string name for a node |
| store | Object store containing ns-3 mobility models |
ns2helper.Install () // no arguments, it will use all the nodes created so far
ns2helper.Install (nodeContainer.Begin (), nodeContainer.End ()) // install the mobility on the nodes in the nodeContainer
...
// Install Mobility Model for Ues position from bonnmotion tool
Ns2MobilityHelper ns2 = Ns2MobilityHelper (traceFile);
// create Ues
NodeContainer ueNodes;
ueNodes.Create(numberOfUes);
ns2.Install(ueNodes.Begin(),ueNodes.End()); NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);assert failed. cond="mm", msg="MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()", file=../src/lte/helper/lte-helper.cc, line=636
terminate called without an active exception
Ptr<MobilityModel> mm = n->GetObject<MobilityModel> ();
NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()");
dlPhy->SetMobility (mm);
ulPhy->SetMobility (mm); ...
// Install Mobility Model for Ues position from bonnmotion tool
Ns2MobilityHelper ns2 = Ns2MobilityHelper (traceFile);
// create Ues
NodeContainer ueNodes;
ueNodes.Create(numberOfUes); ns2.Install(ueNodes.Begin(),ueNodes.End());
NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);...
Valid trace files use the following ns2 statements (https://www.nsnam.org/docs/release/3.22/doxygen/classns3_1_1_ns2_mobility_helper.html):
$node set X_ x1 $node set Y_ y1 $node set Z_ z1 $ns at $time $node setdest x2 y2 speed $ns at $time $node set X_ x1 $ns at $time $node set Y_ Y1 $ns at $time $node set Z_ Z1
...