cerob / slicesim Goto Github PK
View Code? Open in Web Editor NEW5G Network Slicing Simulation
License: MIT License
5G Network Slicing Simulation
License: MIT License
I would like to print the real time traffic requirement at base stations on to a file. I have some problem in getting that, is there nay way to add some few lines of code to do that. @cerob
when we give sudo python3.7 -m slicesim istanbul-kapalicarsi.yml
Traceback (most recent call last):
File "/home/antony/slicesim/slicesim-master/slicesim/Client.py", line 84, in iter
self.assign_closest_base_station()
File "/home/antony/slicesim/slicesim-master/slicesim/Client.py", line 171, in assign_closest_base_station
KDTree.run(self.stat_collector.clients, self.stat_collector.base_stations, int(self.env.now), assign=False)
File "/home/antony/slicesim/slicesim-master/slicesim/utils.py", line 36, in run
tree = kdt(bs_coor, leaf_size=2)
File "sklearn/neighbors/_binary_tree.pxi", line 1050, in sklearn.neighbors._kd_tree.BinaryTree.init
AttributeError: 'list' object has no attribute 'size'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/antony/slicesim/slicesim-master/slicesim/Client.py", line 88, in iter
yield self.env.process(self.iter())
AttributeError: 'list' object has no attribute 'size'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/antony/slicesim/slicesim-master/slicesim/main.py", line 151, in
env.run(until=int(SETTINGS['simulation_time']))
File "/usr/local/lib/python3.7/site-packages/simpy/core.py", line 254, in run
self.step()
File "/usr/local/lib/python3.7/site-packages/simpy/core.py", line 206, in step
raise exc
AttributeError: 'list' object has no attribute 'size'
I am trying to understand the simulator code for a project. I am unable to figure out the logic for the get_random_slice_index()
method in main.py. It contains the following piece of code:
def get_random_slice_index(vals):
i = 0
r = random.random()
while vals[i] < r:
i += 1
return i
I am unable to figure out the logic for the while loop condition. Kindly assist me in the same.
C:\Users\Asus\Desktop\slicesim-master\slicesim-master> python -m slicesim ..\examples\istanbul-kapalicarsi.yml
Traceback (most recent call last):
File "C:\Users\Asus\Desktop\slicesim-master\slicesim-master\slicesim\Client.py", line 84, in iter
self.assign_closest_base_station()
File "C:\Users\Asus\Desktop\slicesim-master\slicesim-master\slicesim\Client.py", line 171, in assign_closest_base_station
KDTree.run(self.stat_collector.clients, self.stat_collector.base_stations, int(self.env.now), assign=False)
File "C:\Users\Asus\Desktop\slicesim-master\slicesim-master\slicesim\utils.py", line 36, in run
tree = kdt(bs_coor, leaf_size=2)
File "sklearn\neighbors\binary_tree.pxi", line 1068, in sklearn.neighbors.kd_tree.BinaryTree.__init__
AttributeError: 'list' object has no attribute 'size'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Asus\Desktop\slicesim-master\slicesim-master\slicesim\Client.py", line 88, in iter
yield self.env.process(self.iter())
AttributeError: 'list' object has no attribute 'size'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Asus\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\Asus\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Asus\Desktop\slicesim-master\slicesim-master\slicesim\__main__.py", line 151, in <module>
env.run(until=int(SETTINGS['simulation_time']))
File "C:\Users\Asus\Anaconda3\lib\site-packages\simpy\core.py", line 138, in run
self.step()
File "C:\Users\Asus\Anaconda3\lib\site-packages\simpy\core.py", line 230, in step
raise exc
AttributeError: 'list' object has no attribute 'size'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.