Giter VIP home page Giter VIP logo

ns3-ai's People

Contributors

dorence avatar eiclpy avatar kakadus avatar mauriyin avatar mu-yuanshen avatar pengyuan-zhou avatar shayekhbinislam avatar shenmuyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ns3-ai's Issues

Random behavior while running the examples simulations

Dear ns3-ai developers,

  1. I tried to install ns3-ai Model ns-3.35 under Debian linux (Native Install).
  2. Further, I tried to install it in ns-3.33 under chroot jail (virtualization).

In both cased, I successfully installed it.
But, while trying to run the example scripts, the behavior is very random.

For example, if I try to run the a_plus_b example as follows:

$ cp -r contrib/ns3-ai/example/a_plus_b scratch/
$ cd scratch/a_plus_b/
$ python3 run.py
  • Sometimes it is running and producing output. (I mean the Python code able to the ns-3 simulation and interact with it and producing outputs)
  • But sometimes, it just hangs after displaying the string "build"
  • Sometimes it ends with some strange python related errors.
  • I see a lot of CPU activity with no outputs

If I check the running processes using the command
$ ps -A
It shows lot of running processes related with this python script and the ns-3 simulation code.

Solution## that I found for running a_plus_b:
run the python script in background
$ python3 run.py
and then run the c++ ns-3 simulation code
./waf --run a_plus_b
Now the simulation is working.

The other AI/ML based examples such as rl_rcp are failing in the same way most of the time.
(for your information, I installed all dependencies of Torch and other Python packages in my installations)

In that case also

  • Sometimes it is running and producing output. (I mean the Python code able to the ns-3 simulation and interact with it and producing outputs)
  • But sometimes, it just hangs after displaying the string "build"
  • Sometimes it ends with some strange python related errors.
  • I see a lot of CPU activity with no outputs

The solution## that I found for running a_plus_b is not at all working for rl_tcp and other real AI/ML simulations.

Here I presented my Installation and testing procedure.(Here I only showed the examples that worked).
Installing ns3-ai Model under ns-3.35
Installing ns3-ai Model under “chroot Jail”

Charles Pandian

RL memory size err

Hello, developers
I write a new rl-tcp followed the given example.But I got this error while executing.

assert failed. cond="size == m_memoryCtrlInfo[id]->size", msg="Size of memory error", +0.080131360s 2 file=/workspace/ns3/contrib/ns3-ai/model/memory-pool.cc, line=158

I add some debug output in /ns3-ai/model/memory-pool.cc near line 158, get these 2 sizes are not equal.

  if (m_memoryCtrlInfo[id] != 0)
    {
      NS_LOG_UNCOND("size: " << m_memoryCtrlInfo[id]->size << ", expect: " << size);// added by me
      NS_ASSERT_MSG (size == m_memoryCtrlInfo[id]->size, "Size of memory error");
      CtrlInfoUnlock ();
      return m_memoryPoolPtr + m_memoryCtrlInfo[id]->offset;
    };

log output

size: 130, expect: 144

Could you please give me some advice to handle this err?
Thank you.

Using NS3-AI module in NS-3 3.36 release (or greater)

Hi all the devs of NS3-AI module.

Currently I am using NS3-AI for a project, operating in NS-3 3.35 release. I would like to migrate to the new 3.36 release due to several reasons. However, this new version employs CMake instead of Waf as the NS-3 build system, as stated here https://www.nsnam.org/releases/ns-3-36/. This is a problem due to the fact that most recent stable release of NS3-AI (v1.1.0) still uses Waf as build system. I would like to know if there are any plans in the community to update NS3-AI so that it is compatible with this new NS-3 build system in the near future.

P.S. having a look at the branches in the repository, I have found a branch called "cmake" with a couple of commits. Is this branch related to this kind of update? Is this change in progress or can be already used?

Thanks in advance for your answer and thank you again for your work and dedication to this useful project.

About the time sequential issue

Initially thanks for the contributions for this really helpful tool ns3-ai!
I have a little question about ns3-ai. How does ns3-ai keep the time sequential of the ns3 and python. I mean, when ns3 finish setting the parameters to the sharedmemory, how does it notify python that ns3's operations are done or how does python know that I can start my ML program now using the parameters derived from sharedmemory. And the same for python, how can ns3 know that python's learning is done and the result is already update to the sharedmemoy? Does this realize by some specific flag or clock?

running rl-tcp with executing question

when I only run python3 run_tcp_rl.py --use_rl --result , it will stop at showing build

but I use the old method that simultaneously running ./waf --run "rl-tcp" and above, it will succeed in updating the parameters, start with
image
and end with
image

I want to ask why and what is actually meaning of running"rl-tcp" , is that running the entire folder or mainly the sim.cc?

Thanks for answering me!

python read/write work flow

Firstly thank you for your contributions!
I am wondering where can I find the work flow of python read/write the sharedMemory, like how python do changes to the version and nextVersion variables and so on.
/**/
while not c.rl.isFinish():
with c.rl as data:
if data == None:
break
data.act = c.do(data.env, data.act)
pass
/
/
where can i find the impliciting code under this segment?
Thanks a lot !

free(): double free detected in tcache 2, Aborted (core dumped)

Dear all,

First of all, I want to thank your valuable contribution. Now, I am working on a very simple project, in which I have a configured set of ten wifi nodes that measure two physical parameters of the network using ns-3, and these values are sent to python to make a prediction. That is, based on the prediction the node will transmit or not a data packet.

Basically, what I have done is modify your example code of the sum (a_plus_b), and instead of returning the sum, I return the prediction based on the two measured features.

The program works correctly, that is, I am able to perform several simulations correctly, and get the prediction correctly, but after I run some simulations the following message begins to appear:

free(): double free detected in tcache 2
Aborted (core dumped)

I attach the python code:

run.py.pdf

Thank you so much for your help

Best

Issue when executing the LTE CQI Example

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.

Using ns3-ai with routing protocols

Is it possible to use as3-ai with routing protocols? Are there specific steps that should be followed when using ns3-ai with routing protocols?

Applying ns3-ai to multiple nodes

Hello, initially congratulations for the project developed!

I am a master's student and I am developing a project that aims to improve the AODV protocol using machine learning. I would like to know if it is possible to use the ns3-ai module in the AODV protocol, where when defining it as a routing protocol for the network, each node will have an individual instance of ns3-ai. I would like each node in the network to be able to manage their own variables to control their AODV instance using their own neural network, is this possible with ns3-ai? Would you have any example of how this can be done (multiple instances of ns3-ai in parallel)?

'run_online_lstm.py' is not compatible with the newest releases of TensorFlow and Keras

The tf.set_random_seed() function in

tf.set_random_seed(1)

is no longer supported by TensorFlow's latest release, and it is currently replaced by tf.random.set_seed()

Additionally, Keras newest release only supports TensorFlow 2.2 or higher.

I had to revert back to TensorFlow 1.15.3 and Keras 2.3.0 to be able to resolve this issue. It would be great if you could update the code to accommodate for such changes or at least mention the TensorFlow and Keras releases that you originally used to run the code.

Sizes do not match between ns3 data structures and Python data structures

whenever I try to construct the shared memory pool in the ns3-script
Ns3AIRL<MyEnv, MyAct> * ctrl = new Ns3AIRL<MyEnv, MyAct> (memblock_key);

I get the following error

this is the size 20
this is the memory size 12
assert failed. cond="size == m_memoryCtrlInfo[id]->size", msg="Size of memory error", file=../contrib/ns3-ai/model/memory-pool.cc, line=159

where I added two print statements in the original memory-pool.cc

  if (m_memoryCtrlInfo[id] != 0)
    {
      std::cout << "this is the size " << size << std::endl;
      std::cout << "this is the memory size " << m_memoryCtrlInfo[id]->size << std::endl; 
      NS_ASSERT_MSG (size == m_memoryCtrlInfo[id]->size, "Size of memory error");
      CtrlInfoUnlock ();
      return m_memoryPoolPtr + m_memoryCtrlInfo[id]->offset;
    };

Changing the Environment and Action Structures changes the values. If I add some padding to the Python version I can get it to run but I do not believe the shared memory will work properly. I have defined both observations and actions as below.

struct MyEnv 
{
    int queueLeft;
    int queueRight;
}Packed;


struct MyAct 
{
    int bandwidthLeft;
    int bandwidthRight;
}Packed;
class MyEnv(Structure):
    _pack_ = 1
    _fields_ = [
        ("queueLeft", c_int),
        ("queueRight", c_int),
        # ("padding", c_bool * 2)
    ]


class MyAct(Structure):
    _pack_ = 1
    _fields = [
        ("bandwidthLeft", c_int),
        ("bandwidthRight", c_int)
    ]

I create the shared memory pool via ctrl = Ns3AIRL(memory_block_key, MyEnv, MyAct)
The weird thing is the examples such as a_plus_b run fine, even though I do not do anything differently.

shared memory doesn't support vector or array

Hello,
I am a master student and want to use your interface to deal with multi-agent RL problem. When i want to create pointer/structure/vector in env, it shows the error like this.
image

Issue when re-running the simulation with same memblock_key

Hello,
I have installed ns3-ai and running it with my simulation setup successfully. However, it breaks and exits when I run the same setup second time with the same 'memblock_key'. I am using the template provided here. It works, but if I run it second time, it breaks at the following line:

if data == None:    
    break

To run the setup again, I have to change the 'memblock_key' to some other value and then it starts working again. Is there some cleanup task that needs to be done before exiting the script?
Thanks

the module

Hi

I have a questions: in ns3-ai has an AODV module?
how can I know if I used classification machine learning in which folder?

Thank you

More explanation

Can explain more how to implement the module in the ns-3 script file.

example hangs without any notice

Hi developers,
when I tried such example many times, I see TensorFlow hanged without any further notice and even if I ran ./freeshm.sh file before.
Screenshot from 2021-05-05 18-19-58

compile error for rl-tcp example with the ns-3-dev

When upgraded to the latest ns-3-dev, it has the compile error with the rl-tcp example:

In file included from ./ns3/object-base.h:23:0,
                 from ./ns3/object.h:29,
                 from ./ns3/tcp-rate-ops.h:22,
                 from ./ns3/tcp-congestion-ops.h:22,
                 from ../scratch/rl-tcp/tcp-rl.h:4,
                 from ../scratch/rl-tcp/tcp-rl.cc:1:
./ns3/type-id.h: In instantiation of ‘static ns3::ObjectBase* ns3::TypeId::AddConstructor()::Maker::Create() [with T = ns3::TcpRlTimeBased]’:
./ns3/type-id.h:647:3:   required from ‘ns3::TypeId ns3::TypeId::AddConstructor() [with T = ns3::TcpRlTimeBased]’
../scratch/rl-tcp/tcp-rl.cc:73:44:   required from here
./ns3/type-id.h:644:27: error: invalid new-expression of abstract class type ‘ns3::TcpRlTimeBased’
       ObjectBase * base = new T ();
                           ^~~~~~~~
In file included from ../scratch/rl-tcp/tcp-rl.cc:1:0:
../scratch/rl-tcp/tcp-rl.h:79:7: note:   because the following virtual functions are pure within ‘ns3::TcpRlTimeBased’:
 class TcpRlTimeBased : public TcpCongestionOps
       ^~~~~~~~~~~~~~
In file included from ../scratch/rl-tcp/tcp-rl.h:4:0,
                 from ../scratch/rl-tcp/tcp-rl.cc:1:
./ns3/tcp-congestion-ops.h:196:16: note:        virtual void ns3::TcpCongestionOps::ReduceCwnd(ns3::Ptr<ns3::TcpSocketState>)
   virtual void ReduceCwnd (Ptr<TcpSocketState> tcb) = 0;
                ^~~~~~~~~~
In file included from ./ns3/tcp-rate-ops.h:22:0,
                 from ./ns3/tcp-congestion-ops.h:22,
                 from ../scratch/rl-tcp/tcp-rl.h:4,
                 from ../scratch/rl-tcp/tcp-rl.cc:1:
./ns3/object.h: In instantiation of ‘ns3::Ptr<T> ns3::CopyObject(ns3::Ptr<const T>) [with T = ns3::TcpRlTimeBased]’:
../scratch/rl-tcp/tcp-rl.cc:230:42:   required from here
./ns3/object.h:538:22: error: invalid new-expression of abstract class type ‘ns3::TcpRlTimeBased’
   Ptr<T> p = Ptr<T> (new T (*PeekPointer (object)), false);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Waf: Leaving directory `/mnt/d/Develop/Code/ns-3-dev/build'
Build failed
 -> task in 'rl-tcp' failed with exit status 1 (run with -v to display more information)

Memory info can never matches the mod

Hi dear developer,

I have been trying to register memory for my ns3-ai system, however, when I am trying to register it, the system will always get stuck at the while loop on the 208 line in memory-pool.cc:

while (info->version % mod != res)

The info->version will always give me a 1 when mod and res are set in SetCond as 2 and 0.

I have tried to make the setcond to (1, 0), then there will be an memory size issue on the python side. So what should I do to fix this issue?

Thank you so much!

Errors in the installation of ns3-ai

I tried to install the release version of ns3-ai into ns3-3.31 following README guidance, but some errors occurred.

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
writing ns3_ai.egg-info/PKG-INFO
writing top-level names to ns3_ai.egg-info/top_level.txt
writing dependency_links to ns3_ai.egg-info/dependency_links.txt
reading manifest file 'ns3_ai.egg-info/SOURCES.txt'
writing manifest file 'ns3_ai.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'shm_pool' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kjnyAR/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c memory-pool.c -o build/temp.linux-x86_64-2.7/memory-pool.o
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-kjnyAR/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c memory-pool-module.c -o build/temp.linux-x86_64-2.7/memory-pool-module.o
memory-pool-module.c:79:15: error: variable ‘shmModule’ has initializer but incomplete type
static struct PyModuleDef shmModule = {
^~~~~~~~~~~
memory-pool-module.c:80:5: error: ‘PyModuleDef_HEAD_INIT’ undeclared here (not in a function); did you mean ‘PyObject_HEAD_INIT’?
PyModuleDef_HEAD_INIT,
^~~~~~~~~~~~~~~~~~~~~
PyObject_HEAD_INIT
memory-pool-module.c:80:5: warning: excess elements in struct initializer
memory-pool-module.c:80:5: note: (near initialization for ‘shmModule’)
memory-pool-module.c:81:5: warning: excess elements in struct initializer
"shm_pool", /* name of module /
^~~~~~~~~~
memory-pool-module.c:81:5: note: (near initialization for ‘shmModule’)
memory-pool-module.c:82:5: warning: excess elements in struct initializer
"Shared memory pool", /
Doc string (may be NULL) /
^~~~~~~~~~~~~~~~~~~~
memory-pool-module.c:82:5: note: (near initialization for ‘shmModule’)
memory-pool-module.c:83:5: warning: excess elements in struct initializer
-1, /
Size of per-interpreter state or -1 /
^
memory-pool-module.c:83:5: note: (near initialization for ‘shmModule’)
memory-pool-module.c:84:5: warning: excess elements in struct initializer
MemoryPool_methods /
Method table */
^~~~~~~~~~~~~~~~~~
memory-pool-module.c:84:5: note: (near initialization for ‘shmModule’)
memory-pool-module.c: In function ‘PyInit_shm_pool’:
memory-pool-module.c:91:12: warning: implicit declaration of function ‘PyModule_Create’; did you mean ‘_PyModule_Clear’? [-Wimplicit-function-declaration]
return PyModule_Create(&shmModule);
^~~~~~~~~~~~~~~
_PyModule_Clear
memory-pool-module.c:91:12: warning: ‘return’ with a value, in function returning void
return PyModule_Create(&shmModule);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
memory-pool-module.c:89:1: note: declared here
PyInit_shm_pool(void)
^~~~~~~~~~~~~~~
memory-pool-module.c: At top level:
memory-pool-module.c:79:27: error: storage size of ‘shmModule’ isn’t known
static struct PyModuleDef shmModule = {
^~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1`

Is it that I didn't install it in a fixed version? ns-3.30 is no longer installable because of the update of gcc and g++. Are there any other solutions?

rl-tcp example ran once only

I ran the "rl-tcp" example once by following the instructions -
Window 1: ./waf --run "rl-tcp"
Window 2: python testtcp.py (in the "contrib/example/rl-tcp" dir)

First time it seemed to run fine to completion.
I tried it again and "python testtcp.py" script exits without any I/O on either window.
I saw there were quite a few processes with me as owner running (possibly due to previous ns-3 runs). I killed them all and still the same problem.
"netstat -an | grep 5000" does not yield anything

After completing the ns3-ai installation, there is an error in executing the command "./waf --run "rl-tcp" according to the reference process. What is the reason?

In file included from ../scratch/rl-tcp/tcp-rl.h:7:0,
from ../scratch/rl-tcp/sim.cc:20:
../scratch/rl-tcp/tcp-rl-env.h:54:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event) = 0;
^~~~~~~~~~~~
../scratch/rl-tcp/tcp-rl-env.h:122:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event);
^~~~~~~~~~~~
In file included from ../scratch/rl-tcp/sim.cc:20:0:
../scratch/rl-tcp/tcp-rl.h:96:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event);
^~~~~~~~~~~~
../scratch/rl-tcp/sim.cc: In function ‘int main(int, char**)’:
../scratch/rl-tcp/sim.cc:199:50: error: ‘QueueSizeUnit’ has not been declared
QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, size / mtu_bytes)));
^~~~~~~~~~~~~
../scratch/rl-tcp/sim.cc:199:90: error: ‘QueueSize’ was not declared in this scope
QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, size / mtu_bytes)));
^
../scratch/rl-tcp/sim.cc:199:91: error: ‘QueueSizeValue’ was not declared in this scope
QueueSizeValue (QueueSize (QueueSizeUnit::PACKETS, size / mtu_bytes)));
^
../scratch/rl-tcp/sim.cc:201:50: error: ‘QueueSizeUnit’ has not been declared
QueueSizeValue (QueueSize (QueueSizeUnit::BYTES, size)));
^~~~~~~~~~~~~

In file included from ../scratch/rl-tcp/tcp-rl-env.cc:2:0:
../scratch/rl-tcp/tcp-rl-env.h:54:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event) = 0;
^~~~~~~~~~~~
../scratch/rl-tcp/tcp-rl-env.h:122:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event);
^~~~~~~~~~~~
../scratch/rl-tcp/tcp-rl-env.cc: In member function ‘virtual void ns3::TcpTimeStepEnv::IncreaseWindow(ns3::Ptrns3::TcpSocketState, uint32_t)’:
../scratch/rl-tcp/tcp-rl-env.cc:236:34: error: ‘class ns3::TcpSocketState’ has no member named ‘m_bytesInFlight’
m_bytesInFlight.push_back(tcb->m_bytesInFlight);
^~~~~~~~~~~~~~~
../scratch/rl-tcp/tcp-rl-env.cc: At global scope:
../scratch/rl-tcp/tcp-rl-env.cc:266:79: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
void TcpTimeStepEnv::CwndEvent(Ptr tcb, const TcpSocketState::TcpCAEvent_t event)
^~~~~~~~~~~~

In file included from ../scratch/rl-tcp/tcp-rl.h:7:0,
from ../scratch/rl-tcp/tcp-rl.cc:1:
../scratch/rl-tcp/tcp-rl-env.h:54:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event) = 0;
^~~~~~~~~~~~
../scratch/rl-tcp/tcp-rl-env.h:122:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event);
^~~~~~~~~~~~
In file included from ../scratch/rl-tcp/tcp-rl.cc:1:0:
../scratch/rl-tcp/tcp-rl.h:96:74: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
virtual void CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event);
^~~~~~~~~~~~
../scratch/rl-tcp/tcp-rl.cc:221:75: error: ‘TcpCAEvent_t’ in ‘class ns3::TcpSocketState’ does not name a type
TcpRlTimeBased::CwndEvent (Ptr tcb, const TcpSocketState::TcpCAEvent_t event)
^~~~~~~~~~~~

Waf: Leaving directory `/media/nostalgia/Document/Deepin File/software/NS3/ns-allinone-3.26/ns-3.26/build'
Build failed
-> task in 'rl-tcp' failed (exit status 1):
{task 140333546644944: cxx sim.cc -> sim.cc.5.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', '../scratch/rl-tcp/sim.cc', '-c', '-o', '/media/nostalgia/Document/Deepin File/software/NS3/ns-allinone-3.26/ns-3.26/build/scratch/rl-tcp/sim.cc.5.o']
-> task in 'rl-tcp' failed (exit status 1):
{task 140333546645072: cxx tcp-rl-env.cc -> tcp-rl-env.cc.5.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', '../scratch/rl-tcp/tcp-rl-env.cc', '-c', '-o', '/media/nostalgia/Document/Deepin File/software/NS3/ns-allinone-3.26/ns-3.26/build/scratch/rl-tcp/tcp-rl-env.cc.5.o']
-> task in 'rl-tcp' failed (exit status 1):
{task 140333546645200: cxx tcp-rl.cc -> tcp-rl.cc.5.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include', '-I/usr/include/gio-unix-2.0', '-I/usr/include/cairo', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/pixman-1', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_=1', '-DHAVE_GSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_GTK2=1', '-DHAVE_LIBXML2=1', '../scratch/rl-tcp/tcp-rl.cc', '-c', '-o', '/media/nostalgia/Document/Deepin File/software/NS3/ns-allinone-3.26/ns-3.26/build/scratch/rl-tcp/tcp-rl.cc.5.o']

NR CQI Prediction

Hello,

Thank you for providing these materials, especially the ones that are related to the CQI prediction in LTE networks.

I wanted to ask if it is possible to provide the example of CQI prediction applied on NR LENA module (i.e., on NR schedulers).

Thanks in advance.

RL-TCP crash the system

ubuntu20.04 anacoda3 python3.7 cuda11.6---ns3.25

The first run rl-tcp normally displays data and result pictures. Run rl-tcp several times and there will be an error. It is useless to use fresh, so restart the computer and find that it cannot be started. You can't enter the image interface or the command line mode. You can only enter the command line mode of recovery. Then you find that the default desktop of Ubuntu 20 is damaged and apt-install is damaged. Only reinstall the system.

Installing on ns3.29

Hi all,
can I install your work on ns3-39. Please can be more explanation and any tutorial about the implementation. I read your paper entitled "NS3-AI: Enable Applying Artificial Intelligence to Network Simulation in ns-3", but I am still confusing.
Thanks.

error when run python3 run_online_lstm.py

python3 run_online_lstm.py
2022-07-18 16:25:25.065679: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2022-07-18 16:25:25.065896: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "run_online_lstm.py", line 36, in
delta = int(sys.argv[1])
IndexError: list index out of range

After run freeshm.sh the same error occur

Question about runnning examples

Hi all, dear devs from NS3-AI
I'm working with the module and I have the next question what is the difference on executing an example with ./waf --run "lte_cqi" instead of python3 run_online.py
(I know that with ./waf I can generate the LOGS and use the visualization mode) or what is the correct way to execute the examples.
Thanks in advance

Install ns3ai in older ns3 version

Hi, I'm wondering is it possible to transfer ns3ai to ns3 3.17 version? I plan to combine it with cc algorithms which can only be available in ns3 3.17, but I'm not sure this is doable. I'd appreciate if you could give me some instruction.

Error: Size of memory error(16 9)

Hi developer,
Thanks for you work to provider this tool. I have tried several times to install ns3-ai with ns-3-dev, ns-3.35 in ubuntu 20.04 LTS. The installation is successful but when I run a_plus_b, the error as follow is shown. Do you know why it is happen? Thanks a lot!

(ns3-5g) ubuntu@mlmachine:~/repos/ns-3-allinone/ns-3.35/scratch/a_plus_b$ python3 run.py
Something wrong
Size of memory error(16 9)
cleaning

AttributeError: module 'py_interface' has no attribute 'Init'

Hello,
when I run the rl-tcp example in the python part: "python3 testtcp.py", I get the following error:

Traceback (most recent call last):
File "testtcp.py", line 28, in
py_interface.Init(1234, 4096)
AttributeError: module 'py_interface' has no attribute 'Init'

Regards,

name 'Init' is not defined

When I try to run the example of q-tcp,there is an error:
File "/home/dell/ns3/source/ns-3.35/contrib/ns3-ai/examples/rl-tcp/run_rl_tcp.py", line 129, in
Init(1234, 4096)
NameError: name 'Init' is not defined
Why?IDidn't I deploy successfully?But I can run a_plus_b successfully.

Problem when reading form shared memory using NS3AIDL module

Hello.
Firstly, I would like to congratulate you for your amazing work.
The problem I have concerns the NS3AIDL module. I am able to send data from NS3 to a python framework based on your lte_cqi example. The python framework successfully receives the data from NS3 but when I am trying to send data back to NS3 as a response (using the c_prediction structure) the shared memory appears to be empty. The data.pred.xxx is properly assigned with a value, but form the NS3’s side I can’t retrieve the value as it appears to be empty. There are no error codes, no memory leaks etc. Is there something I could take a look at to solve this issue or am I missing something?

when I run ./waf --run "rl-tcp",these errors accurred.

In file included from ../scratch/rl-tcp/tcp-rl-env.cc:2:
../scratch/rl-tcp/tcp-rl-env.h:6:10: fatal error: 'ns3/ns3-ai-module.h' file not found
#include "ns3/ns3-ai-module.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.

In file included from ../scratch/rl-tcp/tcp-rl.cc:1:
In file included from ../scratch/rl-tcp/tcp-rl.h:6:
../scratch/rl-tcp/tcp-rl-env.h:6:10: fatal error: 'ns3/ns3-ai-module.h' file not found
#include "ns3/ns3-ai-module.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.

../scratch/rl-tcp/sim.cc:19:10: fatal error: 'ns3/ns3-ai-module.h' file not found
#include "ns3/ns3-ai-module.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.

Could you tell me why?thanks a lot

'run_online_lstm.py': NameError: name 'K' is not defined

After resolving the issue mention in #3, the following line results in the error highlighted below:

return K.expand_dims(Dense(30, activation='selu', kernel_regularizer='l1', )(x[:, :, 0]), axis=-1)

Traceback (most recent call last): File "run_online_lstm.py", line 69, in <module> lstm_l1_mse = Lambda(my_dense)(lstm_input_vec) File "/home/ahmadnagib/anaconda3/envs/py37/lib/python3.7/site-packages/keras/engine/base_layer.py", line 489, in __call__ output = self.call(inputs, **kwargs) File "/home/ahmadnagib/anaconda3/envs/py37/lib/python3.7/site-packages/keras/layers/core.py", line 716, in call return self.function(inputs, **arguments) File "run_online_lstm.py", line 68, in my_dense return K.expand_dims(Dense(30, activation='selu', kernel_regularizer='l1', )(x[:, :, 0]), axis=-1) NameError: name 'K' is not defined

Note: Tested on a Ubuntu 20.04 via Anaconda Prompt with Python 3.7.7, TensorFlow 1.15.3 and Keras 2.3.0

Installing problem

Hi,
I follow the readme to install the ns3-ai,.But when I execute the command './waf', he told me "Could not find a task generator for the name 'ns3-ns3-ai-master' ". The version I used is ns-3.32. Thank you!

Add a close hook to fresh mem?

Hello, developers.
May there add a close hook to fresh memories or cache files to not exec freshm.sh after a ctrl-c cmd?

License

Hi, Can you put a LICENSE.md file with a. permissive license (eg. MIT, BSD, Apache 2.0), so that open contributions are encouraged?

Thanks
Jiwoong

Error when run CQI example

Hi developers,
Thanks for this great jop, when I try to run CQI example, this encounter error is raised
/home/ns3/.local/lib/python3.6/site-packages/numpy/core/_methods.py:170: RuntimeWarning: invalid value encountered in double_scalars ret = ret.dtype.type(ret / rcount)"
can help me to settle this issue.
Tq

Error when trying to run a-p-b example

When trying to run a-p-b example, I got the following error:
Traceback (most recent call last):
File "run.py", line 33, in
from py_interface import *
ModuleNotFoundError: No module named 'py_interface'

How can I address that error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.