Castalia 3.3 for Omnet++ 5

1,137 views
Skip to first unread message

Mouhamadi ABDULLATIF

unread,
Mar 4, 2018, 1:26:23 PM3/4/18
to Castalia Simulator
Hi,

I have ported Castalia 3.3 from Omnetpp 4 to Omnetpp 5, and I'm sharing it here.
There is some trouble with some simulations and I hope we will be able to figure it out.

Please find attached the installation script and a simulation report to compare Castalia 3.3 running on Omnetpp4 and Omnetpp5.

For the report I have kept the same structure as the official Manual of Castalia 3.3 thus it will be easier to understand.


How to install
--------------

1) unzip the installation archive
2) chmod +x install.sh
3) ./install.sh

The script will clone the current castalia sources from github then it will patch some sources files to make it compatible to Omnetpp 5 and then it will compile it.
For more information about how to use Castalia please refere to the official Manual.
castalia3.3ForOmnetpp5.2.zip
simulation_report.pdf

Thanassis Boulis

unread,
Mar 5, 2018, 4:16:46 AM3/5/18
to Castalia Simulator
Thank you Mouhamadi for this service to the Castalia community, and double thank you for the fantastic report you created comparing simulations side by side!

Trying to explain some of the differences these are the things I noticed:
- First of all, I believe what you report as Castalia 3.3 OMNeT 4.6, is not really 3.3. I think you took some tables and figures straight from the manual, which does not have updated tables/graphs. It probably is version 3.2. Otherwise I cannot explain why you do not get all the new fields in collected output. When I run 3.3 with OMNeT 4.6 I get all the new fields. I also get the following results for radioTest:  


+-------------------+---------------+---------------+---------------+

|                   | InterfModel=0 | InterfModel=1 | InterfModel=2 |

+-------------------+---------------+---------------+---------------+

| InterferenceTest1 | 335.5         | 24            | 199           |

| InterferenceTest2 | 332.5         | 23            | 24.5          |

+-------------------+---------------+---------------+---------------+


As you can see the middle bottom number is 23, not 13. The results are still different to OMNeT 5.2, but not significantly. I would say that this kind of difference you can get with a different random seed. It's very probable that OMNeT 5.x changed some things with the RNGs and effectively it's like running the same simulation with a different seed. 

This hypothesis I believe would explain most differences. For example, the results for valuepropagation are extremely variable because if the way the experiment works (using just one seed to run each scenario). On top of this, valuepropagation had some other unreliabilities if I remember correctly. So it's not strange to see completely different results if we assume that using OMNeT 5.2 we are essentially using a different random seed. Not sure if this explains the complete failure of the protocol for TXpower = -5dbm, we'll need to investigate more.

If we look at results that have more stability, like the BANtest ones, then they are not that different. I think the major difference is that the ones you show as 5.2 have much smaller variance. But I believe that this was already the case when we released Castalia 3.3 with 4.6. In other words, the graph you show as 3.3 is probably 3.2. I tried to draw the graph again (with OMNeT 4.6) but I got this error from CastaliaPlot 

CastaliaPlot: ERROR unable to plot this table or bad input syntax at

Application:Packets received per node


and I did not have the time to investigate further. I hope all this answers some of your questions

Thanks again!
Thanassis

--
You received this message because you are subscribed to the Google Groups "Castalia Simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castalia-simulator+unsub...@googlegroups.com.
To post to this group, send email to castalia-simulator@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/castalia-simulator/66e8458d-e35f-4647-a55a-4fee3b8c867c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mouhamadi ABDULLATIF

unread,
Mar 7, 2018, 10:46:51 AM3/7/18
to Castalia Simulator

First of all, Thank you very much for your quick and full reply, Thanassis.


Castalia OMNeT 4.6 figures/table:
---------------------------------
- You right I've just took ALL Castalia OMNeT 4.6 figures and tables straight from the Castalia official manual.
- So we agree about the "received packets" table for the radioTest simulation.
- The graphics I show as Castalia 3.3 are in fact Castalia 3.2 because its come straight from the official manual.


Castalia 3.3 patch for OMNeT 5.2:
---------------------------------
In the last post I omitted to talk about the two patches (patch1.patch and patch2.sh) I included in the archive :
- patch1.patch is generated from diff linux command and it's not intuitive : it just do minor modifications to Castalia python files.
- patch2.sh is a patch done by hand with 'sed' bash command so anyone can easily read it and do some modifications.


OMNeT 5.2 RNG generator:
-----------------------
- You surely right about OMNeT 5.2 because I've done some modifications in the patch2.sh file to make Castalia 3.3 work with OMNeT 5.2. And I had to refer to OMNeT 5.2 Manual to figure it out.


CastaliaPlot: ERROR unable to plot this table or bad .....:
----------------------------------------------------------
- I already had this error, it's caused when CastaliaResults python script return many array instead of one, and then CastaliaPlot can't plot its. To resolve that I've just managed with '-f' regex command of CastaliaResults to select the good table.
- Find attached my simulation script so you will see how I figured out this error.
demo.sh

Thanassis Boulis

unread,
Mar 7, 2018, 7:45:50 PM3/7/18
to Castalia Simulator


CastaliaPlot: ERROR unable to plot this table or bad .....:
----------------------------------------------------------
- I already had this error, it's caused when CastaliaResults python script return many array instead of one, and then CastaliaPlot can't plot its. To resolve that I've just managed with '-f' regex command of CastaliaResults to select the good table.
- Find attached my simulation script so you will see how I figured out this error.


Thank you, I haven't used Castalia for a while now and I am forgetting  things I used to know :) 
I managed to run the BANtest simulation with Castalia 3.3 OMNeT 4.6 (note that 3.3 is the tagged github version. The master branch is a few commits ahead, but it should not make any big difference for our purposes. In any case it's good practice to use the latest master)

As you can see from the graphs attached I am getting very similar results to the ones you obtained with latest master commit and OMNeT 5.2.

So I think that the main difference we see in results are due to differences in RNG seeds.

zigbee-ban-app-4types.png
zigbee-ban-app-GTSon,General.png
zigbee-ban-app-GTSoff,General.png

aziz bouramdane

unread,
Mar 8, 2018, 6:27:22 AM3/8/18
to Castalia Simulator
Athanassios (Thanassis) Boulis svp j'ai besoin de la methode d'installer castalia 3.3 sur OMNET 4.6 et merci plz 

Thanassis Boulis

unread,
Mar 15, 2018, 7:05:19 PM3/15/18
to Castalia Simulator

Someone else also create a port for 5.3. See discussion here:

Sam b

unread,
Apr 10, 2018, 9:48:33 AM4/10/18
to Castalia Simulator
Hello Plz I need help, When I do this commande ../../bin/Castalia -c ZigBeeMAC,allNodesVaryRate,[GTSon,GTSoff][noTemporal,General] -r 5  , of example BANtest I have this error, Error : unexpected argument Cordially 

hana...@gmail.com

unread,
Jun 10, 2018, 1:08:57 PM6/10/18
to Castalia Simulator
Hello, 

So, as I have understood, it is possible to run castalia with omnet 5.3 ? I am not obliged to re-install the omnet 4.6 to work on castalia , is that right ?
?    

Le dimanche 4 mars 2018 19:26:23 UTC+1, Mouhamadi ABDULLATIF a écrit :
Reply all
Reply to author
Forward
0 new messages