tkn-tub / ns3-gym

ns3-gym - The Playground for Reinforcement Learning in Networking Research
GNU General Public License v2.0
521 stars 197 forks source link

run rl-tcp test_tcp.py stuck at env = ns3env.Ns3Env #47

Open LiYufengzz opened 3 years ago

LiYufengzz commented 3 years ago

run test_tcp.py which in rl-tcp,some problems occurred. the code will stuck at this line: env = ns3env.Ns3Env(port=port, stepTime=stepTime, startSim=startSim, simSeed=seed, simArgs=simArgs, debug=debug) i use keyboard to interrput: file "/Users/lyf2481/workspace/ns-allinone-3.33/ns-3.33/contrib/opengym/ns3-gym-master/scratch/rl-tcp/test_tcp.py", line 37, in env = ns3env.Ns3Env() File "/usr/local/lib/python3.9/site-packages/ns3gym/ns3env.py", line 381, in init self.ns3ZmqBridge.initialize_env(self.stepTime) File "/usr/local/lib/python3.9/site-packages/ns3gym/ns3env.py", line 151, in initialize_env request = self.socket.recv() File "zmq/backend/cython/socket.pyx", line 781, in zmq.backend.cython.socket.Socket.recv File "zmq/backend/cython/socket.pyx", line 817, in zmq.backend.cython.socket.Socket.recv File "zmq/backend/cython/socket.pyx", line 186, in zmq.backend.cython.socket._recv_copy File "zmq/backen

And i want to ask how to solve this problem,thanks a lot

aeikay commented 2 years ago

Hey, here in the rl-tcp example..could you identify what all are the state variables they are using?

KlZOnmyway commented 2 years ago

Hi, I also met this problem and I ran with command: _python3 testtcp.py. All other params are set to default. I found in other issues that reduce steptime may make the execution faster, however, in the env initailization _self.ns3ZmqBridge.initializeenv(self.stepTime). The steptime hasn't been used in fact.

I'd appreciate it if someone can help me with this problem, thanks.

smitamaha commented 1 year ago

I have recently installed ns3-gym. I also could run the command cd ./scratch/rl-tcp ./test_tcp.py which in turn executed and Got new port for ns3gm interface: 7147 Now how to proceed? Can i get help on step by step working of "Rl-TCP"