[Ns-bugs] [Bug 511] New: Need ability to change mobility model

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Wed Feb 25 03:47:26 PST 2009


http://www.nsnam.org/bugzilla/show_bug.cgi?id=511

           Summary: Need ability to change mobility model
           Product: ns-3
           Version: ns-3-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: mobility models
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: gjcarneiro at gmail.com
   Estimated Hours: 0.0


Writing complex mobility models is not easy.  In my simulation of vehicles, I
have a state machine for buses:

1. stopped
2. accelerate
3. constant velocity
4. decelerate
5. goto 1

It is much easier to just keep switching among several simple mobility model as
the state changes, rather than write one big complex mobility model from
scratch.

However, Object::AggregateObject does not allow changing one mobility model for
another, and for good reason.  NetDevices could want to cache the mobility
model, to avoid calling GetObject on a per packet basis, for instance.

In my tree I worked around this issue by hacking HierarchicalMobilityModel and
make it accept a NULL parent.  This way, I can modify the Child mobility model
as many times as I want, and with a NULL parent I made the model just return
the absolute child position.

I could post these changes I made to that model, or we can come up with a new
"container" mobility model to do the same.  I am ok either way, but the first
case means one less class to worry about.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list