[Ns-developers] Gnuplot and Nakagami

Timo Bingmann timo.bingmann at student.kit.edu
Fri Jan 9 01:57:49 PST 2009

On Friday 09 January 2009 09:55:22 Mathieu Lacage wrote:
> hi timo,
> sorry for this very late reply,
> On Tue, 2008-12-02 at 17:13 +0100, Timo Bingmann wrote:
> > Hello Mathieu,
> > 
> > you might have seen, that I already split up Nakagami into the two classes
> > ThreeLogDistancePropagationLossModel and NakagamiPropagationLossModel.
> > Haven't changed the GetLoss()s function names yet.
> I see that you did change the name in the last version: good.
> > 
> > I've recoded the Gnuplot* classes: I've split up the GnuplotDataset into Gnuplot2dDataset, Gnuplot2dFunction and friends.
> > The reordering kludge idea was too horrible, nothing I would want to put my name under :).
> > Instead I added internal reference counting to GnuplotDataset, and elegantly derived the internal data object to add more data fields. The code is at first sight now kind of large and complex with the internal data classes, but it allows you to do:
> > 
> > Gnuplot plots("out.png");
> > Gnuplot2dDataset set1("Hello");
> > GnuplotDataset sameset = set1;
> > plots.AddDataset(sameset);
> > 
> > Only difference from value-semantics is that now
> > set1.SetTitle("Test");
> > changes the title of the already added dataset.
> Ok. Are you ok to become maintainer for the gnuplot code then ?

Yes. I'll manage that.

> > The Gnuplot and GnuplotCollection classes are "deeply" copied, but
> > contained Dataset in the vectors are only reference-copied.
> > 
> > So what do you think?
> > 
> > The repo is still at
> > https://idlebox.net/2008/ns-3-wifi/code/ns-3-wifiex/
> I tried to review it again: I can't merge the random variable bits
> because these need an ack from the relevant maintainer so I tried to
> merge only the gnuplot+wifi changes. It would be helpful if you could
> pull && merge ns-3-dev in your tree again.

Yes ok, is that Michele that needs to look over the code?

I just merged my ns-3-wifiex with ns-3-dev.

> Anyway:
> 1) a couple of changes to InterferenceHelper: I don't have anything
> against them per-se but I don't really understand them. Specifically, I
> don't really understand the point of checking the noise floor against
> nan. I see what the code is doing but I wonder what you are trying to
> modelize here. I did not merge this piece.

I had to add that piece of code to get a _fixed_ noise floor of, i believe, -99 dBm to compare results against ns-2. The better way is the current code: to calculate noise from thermal noise and bandwidth multiplied by the RxRatio. I used if isnan() instead of adding another boolean attribute UseConstantNoiseFloor. I'm not sure I like that if(isnan()) very much, but I do believe a fixed, empirical noise floor may be useful for other people as well.

> 2) I merged ThreeLogDistance and your changes to the
> PropagationLossModel base class: it would be really helpful if you could
> change the relevant changeset and test it.
> 3) I merged your new gnuplot classes and the relevant changes to the
> examples

I reviewed both merges, they are good. You missed the doxygen.conf modification: added amsmath package because it is needed for some math formula I added; at least on my texlive installation it is needed.

> 4) I did not merge the nakagami model because it relies on the new
> random variables which I can't merge myself.


> 5) I think that it would make sense to split propagation-loss-model.h/cc
> in a set of files, one for each subclass. Would you care enough to
> submit a patch for this ?

... the usual tradeoff between code readability and compilation speed.
Well in this case I pledge to keep the simple "one-formula" propagation models in one main file. Code wrapping around the formula is similar and therefore everything is easier to read. And the wifi directory is already crowded enough.
> > I'm going to ask Tom for an account to move the repo.
> ok.
> > PS: there was a small bug in YansWifiChannelHelper::Create() when chaining PropagationLossModels.
> > http://idlebox.net/2008/ns-3-wifi/code/ns-3-wifiex/rev/79bdd20014f8
> applied.
> thanks a lot !
> Mathieu

Thanks to you!


More information about the Ns-developers mailing list