ns3-ai simulation stuck in between.

172 views
Skip to first unread message

Kaushika Rathod

unread,
Jul 18, 2025, 2:19:38 AM7/18/25
to ns-3-users
Greetings ns-3-users and developers!

Hope you all are doing well.

I am currently working on a code on ns3-ai. The python side implements DQN to adjust CCA threshold and TPC. I modified the ns3-ai multi-BSS example.
The issue I am facing is that the simulation is stuck in between. The simulation is running for 4 iterations, and after that, the simulation is not proceeding with no visible errors. It is stuck.

Maybe the communication between python and ns3 is broke or it is a deadlock. But I don't know how to identify the exact issue and how to fix this.

I would really appreciate if anyone helps me out in this. If anyone has/is facing similar issues or know the solution, please let me know.

Sincerely, 

Kaushika.

압둘하미드이드리스

unread,
Jul 18, 2025, 5:08:14 PM7/18/25
to ns-3-...@googlegroups.com
Send the code snippet for understanding.


Disclaimer:

This email (including any attachments) is meant solely for the addressee(s) and may contain confidential information and/or content protected by intellectual property laws. If you are not the intended recipient, please delete this email and all copies from your system and notify the sender immediately. Any use, disclosure, replication, copying, distribution, or other kinds of unauthorised dissemination of the content of the emails is strictly forbidden and will be considered as a violation of the Ahmedabad University Code of Conduct.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ns-3-users/e31b5a03-de7d-47d5-a642-925b14ec79d7n%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Kaushika Rathod

unread,
Jul 19, 2025, 3:07:24 AM7/19/25
to ns-3-users

I am trying to share the code block and file, but it is showing " Message has been deleted".

Kent Huns

unread,
Jul 19, 2025, 3:45:52 AM7/19/25
to ns-3-users
Me too. I sent you the 3rd & 4th message in this thread, but spam filter worked.

Kent Huns

unread,
Jul 19, 2025, 3:55:18 AM7/19/25
to ns-3-users
Is it OK now? ns3-ai(python) can't catch & display the error message from C++. 
I don't know any effective solution, but the 1st step of debug is to complete C++ only simulation.
The expansion with ns3-ai is 2nd step.
ns3ai_stuck.jpg

Kaushika Rathod

unread,
Jul 19, 2025, 9:31:11 AM7/19/25
to ns-3-users
Thank you for sharing this.
I did try simulating just C++ part, without any interface with python, and there were no errors, the simulation was completed.
Then I integrated with python and it is getting stuck. 

압둘하미드이드리스

unread,
Jul 19, 2025, 9:47:28 PM7/19/25
to ns-3-...@googlegroups.com
I will check and let you know

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
Message has been deleted
Message has been deleted

Kaushika Rathod

unread,
Jul 21, 2025, 2:42:25 AM7/21/25
to ns-3-users
I am trying to share code snippets and file, but the message is getting deleted.
What should I do?

Kent Huns

unread,
Jul 21, 2025, 5:11:38 AM7/21/25
to ns-3-users
I have no idea what caused this, but all the messages deleted as spam in this thread seem to be replies to him/her?
Anyway, I don't need your code because the content might be too complex for outsiders(including me) to solve this problem.
Please consider the risk for your research or patent, and try again if you really need to.

Thanks

Gabriel Ferreira

unread,
Jul 21, 2025, 8:39:01 AM7/21/25
to ns-3-users
Google spam filtering is pretty bad.
It also deletes moderators messages, and once even took down the whole ns-3-users group...
Brute forcing is a bad idea. They may lock your account.
I suggest chatting via https://ns-3.zulipchat.com/

Kaushika Rathod

unread,
Jul 21, 2025, 8:49:23 AM7/21/25
to ns-3-users
Thank you everyone for your responses. 
The issue is now resolved.

There was a synchronization mismatch between ns3 and python side. Like, python side was waiting to send some action, while ns3 side was waiting to send environment state. Due to this, there was a deadlock in memory and both sides were blocked.

To resolve this issue, make sure if python calls for "PySendBegin" then ns3 should be ready with "CppRecvBegin", and vice-versa.
Every SendBegin() on one side must match a corresponding RecvBegin() on the other side, followed by semaphore lock release.

Best,

Kaushika

압둘하미드이드리스

unread,
Jul 22, 2025, 1:01:11 AM7/22/25
to ns-3-...@googlegroups.com

Subject: Help with V2X Simulation Setup Including Vehicles, RSU, Base Stations, and Core Network

Hello ns-3 community,

I am working on simulating a V2X communication scenario involving

  • 3 vehicles (Vehicle A, B, C)

  • 1 RSU (Roadside Unit)

  • 2 Base Stations

  • Core Network with 3 servers

The communication types I want to simulate are:

  • V2V (PC5 interface)

  • V2I (PC5 interface)

  • V2N (Uu interface)

  • V2V Relay (Uu interface)

I would appreciate any guidance, example scripts, or pointers on:

  • Modeling such a scenario in ns-3 (especially integrating LTE/5G modules for V2N and PC5 for V2V/V2I)

  • Setting up mobility for vehicles (I’m considering SUMO integration)

  • Simulating the relay communication (dashed arrow links)

  • Best practices or existing example projects related to C-V2X

Thank you very much for your support!

Best regards,

Idris 


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages