Closed hzr1140521792 closed 5 years ago
Hi,
The dqn-agent-v1.py
is not generic and will work only with 5 nodes. If you change the node number to 6, then the action vector should contain 6 values , but in a current version, it still sends a vector with 5 elements.
You can simply extend it to more nodes or make it more generic - i.e. independent of the number of nodes.
The linear-mesh
ns3 simulation script is generic. To test it please play with no_op2.py
that is independent of number of nodes, i.e. you can change it easily.
Best, Piotr
I got it,thank you very much.
But I hava another question.Did you write all of your param of environment in the file sim.cc
,but how
can you use it with python,these code are written with C++?
This part of the code allows you to pass command line arguments to the ns-3 process, that will be started by ns3gym. Of course those command line parameters have to be parsed correctly in ns3 simulation script, here called sim.cc
:
simArgs = {"--simTime": simTime,
"--testArg": 123,
"--nodeNum": 5,
"--distance": 500}
env = ns3env.Ns3Env(port=port, stepTime=stepTime, startSim=startSim, simSeed=seed, simArgs=simArgs, debug=debug)
OK,I got it.Thank you very much.
When I change the nodeNum in the code,I get nothing but this My environment is :Ubuntu 16.04 and Python3 Thanks very much