[ns] 1. bug in the NIST addon (+fix) (naouar yaagoubi)
Imad Abdeljaouad
abdeljaouad at gmail.com
Mon Jun 22 07:24:57 PDT 2009
I appreciate your answer and clarification as I haven't thought about this
point!
I would also like to seize this opportunity to ask you for more
documentation about your MIH code (kind of triggers used, when the commands
are generated...), it is a very interesting piece of work!
Thank you!
On Mon, Jun 22, 2009 at 10:03 AM, Richard Rouil <richard.rouil at nist.gov>wrote:
> While there is indeed an error in the condition, the effect should not
> impact the results of the simulation.
>
> The method getAffectedNodes is used to collect all the nodes that should
> receive a packet within a given radius. This is to optimize the simulation
> so that not all the nodes in the simulation process all the packets.
> Because
> of the error in the code, the nodes that have tmp->Y > ymax will also be
> added to the list of affected nodes. However, when they receive the packet,
> the signal strength will be very low and the packet will be discarded (as
> it
> is intended since they were not supposed to see the packet), so the bug
> won't affect the network performance.
>
> The result of the bug will be a longer simulation time as it will generate
> more events and copies of the packets.
>
> The code will be changed and further validations will also be done.
>
> Regards,
> Richard.
>
> -----Original Message-----
> From: ns-users-bounces at ISI.EDU [mailto:ns-users-bounces at ISI.EDU] On Behalf
> Of Imad Abdeljaouad
> Sent: Friday, June 19, 2009 7:59 PM
> To: ns-users at ISI.EDU
> Subject: Re: [ns] 1. bug in the NIST addon (+fix) (naouar yaagoubi)
>
>
> Thank you, indeed you are right and that's a serious bug that would
> certainly lead to very bad and unexpected results!!!
> I hope the NIST will update their code in their release!!!
>
> Message: 1
> > Date: Thu, 18 Jun 2009 20:00:51 -0400
> > From: naouar yaagoubi <naouary at gmail.com>
> > Subject: [ns] bug in the NIST addon (+fix)
> > To: ns-users at ISI.EDU
> > Message-ID:
> > <37d2f4200906181700w3d817e47j7a156bbe06c562d6 at mail.gmail.com>
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > hi all,
> > I have discovered a bug in the nist addon in the channel.cc file:
> >
> > this piece of code compute the affected nodes in the range of the sending
> > node so that the channel object will send the packet to their NetIf
> >
> > for(tmp = xListHead_; tmp != NULL; tmp = tmp->nextX_) {
> > if(tmp->Y() >= ymin && tmp->Y() <= ymax && tmp->X() >= xmin &&
> > tmp->Y() <= ymax)
> > tmpList[n++] = tmp;
> > }
> >
> > As you can see the tmp->Y() <= ymax is repeated twice in the If
> statement.
> > To correct this issue just change one of the tmp->Y() <= ymax to tmp->X()
> > <=
> > xmax
> >
> > best regards
> >
>
>
>
> --
> best regards,
> ________________________
> Imad Abdeljaouad
>
>
>
--
best regards,
________________________
Imad Abdeljaouad
More information about the Ns-users
mailing list