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-boun...@isi.edu [mailto:ns-users-boun...@isi.edu] On Behalf
Of Imad Abdeljaouad
Sent: Friday, June 19, 2009 7:59 PM
To: ns-users@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 <naou...@gmail.com>
> Subject: [ns] bug in the NIST addon (+fix)
> To: ns-users@ISI.EDU
> Message-ID:
>        <37d2f4200906181700w3d817e47j7a156bbe06c56...@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


Reply via email to