hust-diangroup / ns3-ai

Enable the interaction between ns-3 and popular frameworks using Python, which mean you can train and test your AI algorithms in ns-3 without changing any frameworks you are using now!
GNU General Public License v2.0
240 stars 85 forks source link

Issue when executing the LTE CQI Example #35

Open juansebastiani2cat opened 3 years ago

juansebastiani2cat commented 3 years ago

Dear all,

I have installed successfully the ai module and then I tried to run the LTE CQI example but when I run it under Spyder (5.0) I get the following warning:

I executed run_online_lstm 1 (as instructed in the example)

run_online_lstm.py:83: RuntimeWarning: Mean of empty slice. return (((y_pred - y_true)**2)).mean()

The returned log is empty and the MSE metrics are zero. image

Additionally, when I tried running through the command line, it actually ran but the output was the following: image

I am running it under NS3 3.30 in an Ubuntu 20.04.2 LTS.

I appreciate your kind help. My idea is being able to use the program to obtain the metrics from NS3 and then use an AI module in Python in order to forecast traffic with it.

juansebastiani2cat commented 3 years ago

Hello all,

After a further experimentation with the code, I realized that the issue is that the CQI is always 15. Im guessing the NS3 simulation is not providing the proper CQI value to the python script. I hardcoded the value of the CQI to a value between 0 and 15 and instead of showing 15 like the previous example it now shows the hardcoded value that I wrote. I would truly appreciate your help with this issue. Thanks a lot.

Mauriyin commented 3 years ago

So currently the issue is why the CQI is always 15 during the simulation?

juansebastiani2cat commented 3 years ago

So currently the issue is why the CQI is always 15 during the simulation?

Yeah, Im always obtaining 15 as CQI during the simulation, I suppose is because the simulated program does not change the CQI values for some strange reason. Could you help me get some clear light over this please ?

PennyXQZ commented 2 years ago

So currently the issue is why the CQI is always 15 during the simulation?

Yes, for me the CQI is always set to be 15 as well, I guess the CQI value from ns3 might not be sent to the shared memory.