Bug 178 - Randow Walk Sample Incorrect
: Randow Walk Sample Incorrect
Status: RESOLVED FIXED
: ns-3
samples
: pre-release
: All All
: P4 minor
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-05-14 16:18 EDT by
Modified: 2008-07-01 13:32 EDT (History)


Attachments
Changes defaults, removes course change. (1.66 KB, patch)
2008-05-14 16:19 EDT, Joe Kopena
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-05-14 16:18:22 EDT
As far as I can tell, there are three things wrong with
samples/main-random-walk.cc currently:

- The Bounds attribute was changed to a Rectangle, and does not work with the
strings used in the sample.
- The given default bounds fail as the nodes are positioned outside of it.
- The course change trace source has been removed.

I'll attach a patch which fixes the sample in a second, though I'm somewhat
surprised at the apparent loss of the course change trace.

Thx
------- Comment #1 From 2008-05-14 16:19:10 EDT -------
Created an attachment (id=132) [details]
Changes defaults, removes course change.
------- Comment #2 From 2008-05-14 18:23:22 EDT -------
So, yes, there were some issues:

- Somewhere along the line the syntax for rectangle strings changed from colons
to pipes.
- The bounds did have to change, nodes were being created outside of them and
an assert was failing.
- The callback signature was outdated, still using TraceContext instead of
std::string.

These lead to a couple of changes.  In [1] the first two simple issues have
been fixed.  More importantly though, it also:

- Removes some remaining references to TraceContext and TraceResolver
throughout the codebase.
- Removes MobilityModelNotifier.  The CourseChange trace source has now been
moved into MobilityModel.

The latter may break some people's simulation code, so it has not been pushed
directly.  In particular, mobility notifications are now done entirely via
traces rather than aggregating a notifier object that gets called.  Previously
you could in theory handle them either way.  For most people though, this will
hopefully simply involve changing the trace source used and eliminating calls
like MobilityHelper::EnableNotifier().

Comments welcome.

Thx

[1] http://code.nsnam.org/tjkopena/ns-3-dev-nonotifier/
------- Comment #3 From 2008-05-14 21:13:25 EDT -------
ok for me.
------- Comment #4 From 2008-05-14 23:04:16 EDT -------
OK with me; do you want ack on the list?
------- Comment #5 From 2008-05-15 06:36:14 EDT -------
Since Gustavo's on board, seems good to go.  I did update [2] to use a more
descriptive member name as he asked.  If one of you could merge back into main
that'd be great (I can't write to ns-3-dev---probably wise---and will be
offline most of the day).  Merging doesn't seem to cause any problems.

Thx

[2] http://code.nsnam.org/tjkopena/ns-3-dev-nonotifier/
------- Comment #6 From 2008-05-16 10:19:31 EDT -------
merged in ns-3-dev.