Is it possible to create a GUI program that displays an NS-3 simulation scenario in real-time?

300 views
Skip to first unread message

Aidan Hansen

unread,
Mar 19, 2024, 9:37:42 AM3/19/24
to ns-3-users

Hi everyone,

I'm currently interested in developing a module that can display NS-3 simulations in real-time on a GUI. The basic idea is that NS-3 is simulating every second, and through writing an additional module, I want to be able to see the simulation happening in real-time on a GUI. For instance, if I want to create a satellite network simulation, it would involve a GUI interface that includes the Earth and constellation, when NS-3 starts running, this satellite network GUI would automatically open. As ns3 runs every second, this GUI interface would display the results I want to see, such as certain satellites beginning communication, which would be indicated by marking those satellite points in red, etc.

Initially, I planned to work on this GUI program after completing more algorithms and custom modules for NS-3. However, I'm currently feeling quite lost with the subsequent tasks, so I've decided to start working on the GUI program earlier to facilitate my further development and research.

In the past, I've used NetAnim, but it requires files after the simulation has ended to be used. I haven't used PyViz yet, but from some of the blogs and manual I've seen before, it seems to no longer be maintained. I'm guessing I could make modifications based on this foundation.

I prefer to have the GUI display the simulation in progress. Does anyone have any examples or suggestions?

Gabriel Ferreira

unread,
Mar 20, 2024, 7:41:34 AM3/20/24
to ns-3-users
In real time, PyViz, https://www.net-runner.xyz/, or something custom.

It would be fantastic if you managed to integrate ns-3 data into something like
https://satellitemap.space/

Aidan Hansen

unread,
Mar 20, 2024, 10:11:17 PM3/20/24
to ns-3-users
Hi, Gabriel Thanks for answering my question. I really want to implement the GUI as described at https://satellitemap.space/, so that I can have a real-time display of effects during NS3 simulations. My plan is to use Cesium, with NS3 transmitting data in real-time through WebSocket for rendering in Cesium. I will make sure to carefully reference https://www.net-runner.xyz/. Thank you for your help

Nathaniel Foli

unread,
Mar 21, 2024, 11:13:13 AM3/21/24
to ns-3-users
Good afternoon. I'm a final-year undergraduate student working on 5G Network Slicing. I want to use NS3 for my network simulation. Can I get help from this community? So far I've been able to install NS3 on my Ubuntu on VirtualBox. I'm a fast learner very committed as well.
Thank you

Aidan Hansen

unread,
Jun 4, 2024, 9:51:07 PM6/4/24
to ns-3-users
hi,  
Recently, I implemented real-time constellation display in the simulation, and I found this feature to be quite impressive. Thanks for your previous suggestions. I believe that real-time GUI display is very beneficial for both running and learning simulations.

I followed the architecture described in the article with DOI: 10.1145/3389400.3389404. However, due to my limited understanding of the underlying mechanisms of C++, I am concerned about potential conflicts with ns-3 simulations. Although the real-time simulation is currently working, I am still uncertain about possible issues.

Especially since ns-3 is a discrete-event simulation system. Could such memory interactions affect ns-3's event simulation?


Snipaste_2024-06-04_10-10-56.png




在2024年3月20日星期三 UTC+8 19:41:34<Gabriel Ferreira> 写道:

Gabriel Ferreira

unread,
Jun 6, 2024, 3:53:25 AM6/6/24
to ns-3-users
>  Especially since ns-3 is a discrete-event simulation system. Could such memory interactions affect ns-3's event simulation?

You mean between ns3-ai and ns-3, or ns-3 and your GUI?

The first ones will slow you down, but unless there is a bug, nothing should happen. For the GUI, it can slow it down if you use blocking sockets. 

Reply all
Reply to author
Forward
0 new messages