Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to run environment and agent on different PCs? #43

Open
ffrommel opened this issue Mar 10, 2021 · 2 comments
Open

Is it possible to run environment and agent on different PCs? #43

ffrommel opened this issue Mar 10, 2021 · 2 comments

Comments

@ffrommel
Copy link

Hello.

My name is Fabián and I am doing my Master's thesis on robust optimization of Wi-Fi networks configuration. First of all, I wanted to thank you and congratulate you for the great contribution that ns3-gym is to the investigation of these topics.

From the readme it is clear to me that it is possible to run the environment (simulation ns-3) and the agent (Python code) on separate terminals. But is it possible to do this on separate PCs? This is because I would like to train the agent on Google Colab, while keeping the network simulator on my PC.

Thank you very much in advance.
Kind regards.

Fabián.

@zubow
Copy link
Collaborator

zubow commented Mar 10, 2021

Dear Fabián,

you can run the ns3 and the agent on two different machines as for IPC we use ZeroMQ protocol. However, at the moment for such remote setup you have to make changes in the ns3 opengym_interface.cc file:

Please replace 'localhost' by the public IP address of your agent:
https://github.com/tkn-tub/ns3-gym/blob/master/src/opengym/model/opengym_interface.cc#L163

In the next version of ns3-gym we will make that parameter configurable.

Best,
Tolja

@ffrommel
Copy link
Author

Hello Tolja. Thank you very much for the quick answer.

I made the modifications indicated in the opengym_interface.cc file, however the agent does not detect the simulation. Should I also modify the ns3env.py file to indicate the public IP of the PC with ns-3? If so, what would be the modifications to be made in the code?

Thank you again.
Kind regards.

Fabián.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants