vlcSim 0.2.5__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vlcSim
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: Python Package of Event-Oriented Simulation for visible light communication
5
5
  Home-page: https://gitlab.com/DaniloBorquez/simvlc/
6
6
  Author: Danilo Bórquez-Paredes
@@ -45,17 +45,28 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
45
45
  for vled in vleds:
46
46
  capacities.append(scenario.capacityVled(receiver, vled))
47
47
  posBestCapacity = capacities.index(max(capacities))
48
- if controller.numberOfActiveConnections(posBestCapacity) > 5:
48
+ numberOfSlices = 0
49
+ if (
50
+ controller.numberOfActiveConnections(vleds[posBestCapacity]) > 5
51
+ or capacities[posBestCapacity] == 0
52
+ ):
49
53
  connection.AP = scenario.rfs[0]
54
+ connection.receiver.capacityFromAP = scenario.capacityRf(
55
+ receiver, connection.AP
56
+ )
57
+ numberOfSlices = connection.numberOfSlicesNeeded(
58
+ connection.capacityRequired, connection.receiver.capacityFromAP
59
+ )
50
60
  else:
51
61
  connection.AP = vleds[posBestCapacity]
62
+ connection.receiver.capacityFromAP = capacities[posBestCapacity]
63
+ numberOfSlices = connection.numberOfSlicesNeeded(
64
+ connection.capacityRequired, capacities[posBestCapacity]
65
+ )
52
66
 
53
- numberOfSlices = connection.numberOfSlicesNeeded(
54
- connection.capacityRequired, capacities[posBestCapacity]
55
- )
56
- connection.receiver.capacityFromAP = capacities[posBestCapacity]
57
67
  actualSlice = connection.nextSliceInAPWhenArriving(connection.AP)
58
68
  aux = 0
69
+ auxFrame = 0
59
70
 
60
71
  # Actual frame
61
72
  for slice in range(actualSlice, connection.AP.slicesInFrame):
@@ -73,18 +84,13 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
73
84
  if controller.framesState(connection.AP)[frameIndex][slice] == False:
74
85
  connection.assignFrameSlice(frameIndex, slice)
75
86
  aux += 1
87
+ auxFrame = frameIndex
76
88
  break
77
89
 
78
90
  if aux == numberOfSlices:
79
91
  break
80
92
 
81
- frameIndex = (
82
- 1
83
- if len(controller.framesState(connection.AP)) == 0
84
- else len(controller.framesState(connection.AP))
85
- )
86
-
87
- frameIndex = len(controller.framesState(connection.AP))
93
+ frameIndex = auxFrame + 1
88
94
  while aux < numberOfSlices:
89
95
  connection.assignFrameSlice(frameIndex, 0)
90
96
  frameIndex += 1
@@ -95,25 +101,25 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
95
101
  if __name__ == "__main__":
96
102
  # Simulator Constructor: size of the room, with the numbrer of grids and the rho parameter
97
103
 
98
- sim = Simulator(5.0, 5.0, 2.15, 10, 0.8)
104
+ sim = Simulator(20.0, 20.0, 2.15, 10, 0.8)
99
105
 
100
106
  # Adding Vleds to the room
101
- vled = VLed(-1.25, -1.25, 2.15, 60, 60, 20, 70)
107
+ vled = VLed(-7.5, -7.5, 2.15, 60, 60, 20, 70)
102
108
  vled.sliceTime = 0.2
103
109
  vled.slicesInFrame = 10
104
110
  vled.B = 0.5e5
105
111
  sim.scenario.addVLed(vled)
106
- vled = VLed(-1.25, 1.25, 2.15, 60, 60, 20, 70)
112
+ vled = VLed(-7.5, 7.5, 2.15, 60, 60, 20, 70)
107
113
  vled.sliceTime = 0.2
108
114
  vled.slicesInFrame = 10
109
115
  vled.B = 0.5e5
110
116
  sim.scenario.addVLed(vled)
111
- vled = VLed(1.25, -1.25, 2.15, 60, 60, 20, 70)
117
+ vled = VLed(7.5, -7.5, 2.15, 60, 60, 20, 70)
112
118
  vled.sliceTime = 0.2
113
119
  vled.slicesInFrame = 10
114
120
  vled.B = 0.5e5
115
121
  sim.scenario.addVLed(vled)
116
- vled = VLed(1.25, 1.25, 2.15, 60, 60, 20, 70)
122
+ vled = VLed(7.5, 7.5, 2.15, 60, 60, 20, 70)
117
123
  vled.sliceTime = 0.2
118
124
  vled.slicesInFrame = 10
119
125
  vled.B = 0.5e5
@@ -128,11 +134,11 @@ if __name__ == "__main__":
128
134
 
129
135
  # setting algorithm and number of connections
130
136
  sim.set_allocation_algorithm(alloc)
131
- sim.goalConnections = 100
137
+ sim.goalConnections = 60
132
138
 
133
139
  # changing Dynamic
134
140
  sim.lambdaS = 1
135
- sim.mu = 10
141
+ sim.mu = 30
136
142
 
137
143
  # changing random wait limits
138
144
 
@@ -145,9 +151,3 @@ if __name__ == "__main__":
145
151
  # initialize and run
146
152
  sim.init()
147
153
  sim.run()
148
-
149
-
150
-
151
- ```
152
-
153
-
@@ -31,17 +31,28 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
31
31
  for vled in vleds:
32
32
  capacities.append(scenario.capacityVled(receiver, vled))
33
33
  posBestCapacity = capacities.index(max(capacities))
34
- if controller.numberOfActiveConnections(posBestCapacity) > 5:
34
+ numberOfSlices = 0
35
+ if (
36
+ controller.numberOfActiveConnections(vleds[posBestCapacity]) > 5
37
+ or capacities[posBestCapacity] == 0
38
+ ):
35
39
  connection.AP = scenario.rfs[0]
40
+ connection.receiver.capacityFromAP = scenario.capacityRf(
41
+ receiver, connection.AP
42
+ )
43
+ numberOfSlices = connection.numberOfSlicesNeeded(
44
+ connection.capacityRequired, connection.receiver.capacityFromAP
45
+ )
36
46
  else:
37
47
  connection.AP = vleds[posBestCapacity]
48
+ connection.receiver.capacityFromAP = capacities[posBestCapacity]
49
+ numberOfSlices = connection.numberOfSlicesNeeded(
50
+ connection.capacityRequired, capacities[posBestCapacity]
51
+ )
38
52
 
39
- numberOfSlices = connection.numberOfSlicesNeeded(
40
- connection.capacityRequired, capacities[posBestCapacity]
41
- )
42
- connection.receiver.capacityFromAP = capacities[posBestCapacity]
43
53
  actualSlice = connection.nextSliceInAPWhenArriving(connection.AP)
44
54
  aux = 0
55
+ auxFrame = 0
45
56
 
46
57
  # Actual frame
47
58
  for slice in range(actualSlice, connection.AP.slicesInFrame):
@@ -59,18 +70,13 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
59
70
  if controller.framesState(connection.AP)[frameIndex][slice] == False:
60
71
  connection.assignFrameSlice(frameIndex, slice)
61
72
  aux += 1
73
+ auxFrame = frameIndex
62
74
  break
63
75
 
64
76
  if aux == numberOfSlices:
65
77
  break
66
78
 
67
- frameIndex = (
68
- 1
69
- if len(controller.framesState(connection.AP)) == 0
70
- else len(controller.framesState(connection.AP))
71
- )
72
-
73
- frameIndex = len(controller.framesState(connection.AP))
79
+ frameIndex = auxFrame + 1
74
80
  while aux < numberOfSlices:
75
81
  connection.assignFrameSlice(frameIndex, 0)
76
82
  frameIndex += 1
@@ -81,25 +87,25 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
81
87
  if __name__ == "__main__":
82
88
  # Simulator Constructor: size of the room, with the numbrer of grids and the rho parameter
83
89
 
84
- sim = Simulator(5.0, 5.0, 2.15, 10, 0.8)
90
+ sim = Simulator(20.0, 20.0, 2.15, 10, 0.8)
85
91
 
86
92
  # Adding Vleds to the room
87
- vled = VLed(-1.25, -1.25, 2.15, 60, 60, 20, 70)
93
+ vled = VLed(-7.5, -7.5, 2.15, 60, 60, 20, 70)
88
94
  vled.sliceTime = 0.2
89
95
  vled.slicesInFrame = 10
90
96
  vled.B = 0.5e5
91
97
  sim.scenario.addVLed(vled)
92
- vled = VLed(-1.25, 1.25, 2.15, 60, 60, 20, 70)
98
+ vled = VLed(-7.5, 7.5, 2.15, 60, 60, 20, 70)
93
99
  vled.sliceTime = 0.2
94
100
  vled.slicesInFrame = 10
95
101
  vled.B = 0.5e5
96
102
  sim.scenario.addVLed(vled)
97
- vled = VLed(1.25, -1.25, 2.15, 60, 60, 20, 70)
103
+ vled = VLed(7.5, -7.5, 2.15, 60, 60, 20, 70)
98
104
  vled.sliceTime = 0.2
99
105
  vled.slicesInFrame = 10
100
106
  vled.B = 0.5e5
101
107
  sim.scenario.addVLed(vled)
102
- vled = VLed(1.25, 1.25, 2.15, 60, 60, 20, 70)
108
+ vled = VLed(7.5, 7.5, 2.15, 60, 60, 20, 70)
103
109
  vled.sliceTime = 0.2
104
110
  vled.slicesInFrame = 10
105
111
  vled.B = 0.5e5
@@ -114,11 +120,11 @@ if __name__ == "__main__":
114
120
 
115
121
  # setting algorithm and number of connections
116
122
  sim.set_allocation_algorithm(alloc)
117
- sim.goalConnections = 100
123
+ sim.goalConnections = 60
118
124
 
119
125
  # changing Dynamic
120
126
  sim.lambdaS = 1
121
- sim.mu = 10
127
+ sim.mu = 30
122
128
 
123
129
  # changing random wait limits
124
130
 
@@ -131,9 +137,3 @@ if __name__ == "__main__":
131
137
  # initialize and run
132
138
  sim.init()
133
139
  sim.run()
134
-
135
-
136
-
137
- ```
138
-
139
-
@@ -10,7 +10,7 @@ long_description = (this_directory / "README.md").read_text()
10
10
 
11
11
  setup(
12
12
  name="vlcSim",
13
- version="0.2.5",
13
+ version="0.2.6",
14
14
  license="MIT",
15
15
  description="Python Package of Event-Oriented Simulation for visible light communication",
16
16
  author="Danilo Bórquez-Paredes",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vlcSim
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: Python Package of Event-Oriented Simulation for visible light communication
5
5
  Home-page: https://gitlab.com/DaniloBorquez/simvlc/
6
6
  Author: Danilo Bórquez-Paredes
@@ -45,17 +45,28 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
45
45
  for vled in vleds:
46
46
  capacities.append(scenario.capacityVled(receiver, vled))
47
47
  posBestCapacity = capacities.index(max(capacities))
48
- if controller.numberOfActiveConnections(posBestCapacity) > 5:
48
+ numberOfSlices = 0
49
+ if (
50
+ controller.numberOfActiveConnections(vleds[posBestCapacity]) > 5
51
+ or capacities[posBestCapacity] == 0
52
+ ):
49
53
  connection.AP = scenario.rfs[0]
54
+ connection.receiver.capacityFromAP = scenario.capacityRf(
55
+ receiver, connection.AP
56
+ )
57
+ numberOfSlices = connection.numberOfSlicesNeeded(
58
+ connection.capacityRequired, connection.receiver.capacityFromAP
59
+ )
50
60
  else:
51
61
  connection.AP = vleds[posBestCapacity]
62
+ connection.receiver.capacityFromAP = capacities[posBestCapacity]
63
+ numberOfSlices = connection.numberOfSlicesNeeded(
64
+ connection.capacityRequired, capacities[posBestCapacity]
65
+ )
52
66
 
53
- numberOfSlices = connection.numberOfSlicesNeeded(
54
- connection.capacityRequired, capacities[posBestCapacity]
55
- )
56
- connection.receiver.capacityFromAP = capacities[posBestCapacity]
57
67
  actualSlice = connection.nextSliceInAPWhenArriving(connection.AP)
58
68
  aux = 0
69
+ auxFrame = 0
59
70
 
60
71
  # Actual frame
61
72
  for slice in range(actualSlice, connection.AP.slicesInFrame):
@@ -73,18 +84,13 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
73
84
  if controller.framesState(connection.AP)[frameIndex][slice] == False:
74
85
  connection.assignFrameSlice(frameIndex, slice)
75
86
  aux += 1
87
+ auxFrame = frameIndex
76
88
  break
77
89
 
78
90
  if aux == numberOfSlices:
79
91
  break
80
92
 
81
- frameIndex = (
82
- 1
83
- if len(controller.framesState(connection.AP)) == 0
84
- else len(controller.framesState(connection.AP))
85
- )
86
-
87
- frameIndex = len(controller.framesState(connection.AP))
93
+ frameIndex = auxFrame + 1
88
94
  while aux < numberOfSlices:
89
95
  connection.assignFrameSlice(frameIndex, 0)
90
96
  frameIndex += 1
@@ -95,25 +101,25 @@ def alloc(receiver, connection: Connection, scenario: Scenario, controller: Cont
95
101
  if __name__ == "__main__":
96
102
  # Simulator Constructor: size of the room, with the numbrer of grids and the rho parameter
97
103
 
98
- sim = Simulator(5.0, 5.0, 2.15, 10, 0.8)
104
+ sim = Simulator(20.0, 20.0, 2.15, 10, 0.8)
99
105
 
100
106
  # Adding Vleds to the room
101
- vled = VLed(-1.25, -1.25, 2.15, 60, 60, 20, 70)
107
+ vled = VLed(-7.5, -7.5, 2.15, 60, 60, 20, 70)
102
108
  vled.sliceTime = 0.2
103
109
  vled.slicesInFrame = 10
104
110
  vled.B = 0.5e5
105
111
  sim.scenario.addVLed(vled)
106
- vled = VLed(-1.25, 1.25, 2.15, 60, 60, 20, 70)
112
+ vled = VLed(-7.5, 7.5, 2.15, 60, 60, 20, 70)
107
113
  vled.sliceTime = 0.2
108
114
  vled.slicesInFrame = 10
109
115
  vled.B = 0.5e5
110
116
  sim.scenario.addVLed(vled)
111
- vled = VLed(1.25, -1.25, 2.15, 60, 60, 20, 70)
117
+ vled = VLed(7.5, -7.5, 2.15, 60, 60, 20, 70)
112
118
  vled.sliceTime = 0.2
113
119
  vled.slicesInFrame = 10
114
120
  vled.B = 0.5e5
115
121
  sim.scenario.addVLed(vled)
116
- vled = VLed(1.25, 1.25, 2.15, 60, 60, 20, 70)
122
+ vled = VLed(7.5, 7.5, 2.15, 60, 60, 20, 70)
117
123
  vled.sliceTime = 0.2
118
124
  vled.slicesInFrame = 10
119
125
  vled.B = 0.5e5
@@ -128,11 +134,11 @@ if __name__ == "__main__":
128
134
 
129
135
  # setting algorithm and number of connections
130
136
  sim.set_allocation_algorithm(alloc)
131
- sim.goalConnections = 100
137
+ sim.goalConnections = 60
132
138
 
133
139
  # changing Dynamic
134
140
  sim.lambdaS = 1
135
- sim.mu = 10
141
+ sim.mu = 30
136
142
 
137
143
  # changing random wait limits
138
144
 
@@ -145,9 +151,3 @@ if __name__ == "__main__":
145
151
  # initialize and run
146
152
  sim.init()
147
153
  sim.run()
148
-
149
-
150
-
151
- ```
152
-
153
-
@@ -250,6 +250,7 @@ class Controller:
250
250
 
251
251
  if self.__allocationStatus == Controller.status.ALLOCATED:
252
252
  index = self.APPosition(connection.AP)
253
+ self.__numberActiveConnections[index] += 1
253
254
  actualSlice = connection.nextSliceInAPWhenArriving(connection.AP) - 1
254
255
  actualTime = (
255
256
  (time // (connection.AP.slicesInFrame * connection.AP.sliceTime))
@@ -357,6 +358,7 @@ class Controller:
357
358
  flag = True
358
359
  if flag:
359
360
  self.__activeConnections[index].pop(self.__activeConnection[index])
361
+ self.__numberActiveConnections[index] -= 1
360
362
  return Controller.nextStatus.IDLE, time, None
361
363
 
362
364
  def init(self):
@@ -364,12 +366,14 @@ class Controller:
364
366
  Initializatrion of this controller. This methods must be invoked before to start the simulation.
365
367
  """
366
368
  self.__activeConnections = []
369
+ self.__numberActiveConnections = []
367
370
 
368
371
  nvleds = 0
369
372
  nrfs = 0
370
373
  actual = None
371
374
 
372
375
  for i in range(len(self.__scenario.vleds) + len(self.__scenario.rfs)):
376
+ self.__numberActiveConnections.append(0)
373
377
  self.__activeConnections.append([])
374
378
  if (
375
379
  len(self.__scenario.vleds) > nvleds
@@ -411,7 +415,7 @@ class Controller:
411
415
 
412
416
  return self.__activeConnections
413
417
 
414
- def numberOfActiveConnections(self, apID: int):
418
+ def numberOfActiveConnections(self, ap: int):
415
419
  """
416
420
  The number of active connections in this AP.
417
421
 
@@ -420,7 +424,7 @@ class Controller:
420
424
  :return: The number of active connections in this AP.
421
425
  :rtype: int
422
426
  """
423
- return len(self.__activeConnections[apID])
427
+ return self.__numberActiveConnections[self.APPosition(ap)]
424
428
 
425
429
  def assignSlice(self, apIndex, frame, slice, connection):
426
430
  numberOfFrames = len(self.__activeConnections[apIndex])
@@ -51,6 +51,12 @@ class AccessPoint:
51
51
 
52
52
  @property
53
53
  def B(self) -> float:
54
+ """
55
+ Gets the Bandwith of this AccessPoint
56
+
57
+ :return: The B of this AccessPoint
58
+ :rtype: float
59
+ """
54
60
  return self._B
55
61
 
56
62
  @B.setter
@@ -164,6 +170,12 @@ class AccessPoint:
164
170
 
165
171
  @property
166
172
  def slicesInFrame(self) -> int:
173
+ """
174
+ The number of slices in the frame. This is used to determine how many slices will be in the frame.
175
+
176
+ :return: The number of slices in the frame
177
+ :rtype: int
178
+ """
167
179
  return self._slicesInFrame
168
180
 
169
181
  @slicesInFrame.setter
@@ -177,6 +189,9 @@ class VLed(AccessPoint):
177
189
  """
178
190
 
179
191
  numberOfVLeds = 0
192
+ """
193
+ number of VLeds created
194
+ """
180
195
 
181
196
  def __init__(
182
197
  self,
@@ -318,7 +333,14 @@ class VLed(AccessPoint):
318
333
 
319
334
 
320
335
  class RF(AccessPoint):
336
+ """
337
+ Class that represents a RF object
338
+ """
339
+
321
340
  numberOfRFs = 0
341
+ """
342
+ Number of RFs created
343
+ """
322
344
 
323
345
  def __init__(
324
346
  self,
@@ -353,6 +375,12 @@ class RF(AccessPoint):
353
375
 
354
376
  @property
355
377
  def bf(self) -> float:
378
+ """
379
+ femtocell bandwidth
380
+
381
+ :return: Value of BF property
382
+ :rtype: float
383
+ """
356
384
  return self.__bf
357
385
 
358
386
  @bf.setter
@@ -361,6 +389,13 @@ class RF(AccessPoint):
361
389
 
362
390
  @property
363
391
  def pf(self) -> float:
392
+ """
393
+ Femtobase power transmission
394
+
395
+ :return: Femtobase power transmission
396
+ :rtype: float
397
+
398
+ """
364
399
  return self.__pf
365
400
 
366
401
  @pf.setter
@@ -369,6 +404,12 @@ class RF(AccessPoint):
369
404
 
370
405
  @property
371
406
  def BERf(self) -> float:
407
+ """
408
+ BER desired in femto network
409
+
410
+ :return: BER
411
+ :rtype: float
412
+ """
372
413
  return self.__BERf
373
414
 
374
415
  @BERf.setter
@@ -377,6 +418,12 @@ class RF(AccessPoint):
377
418
 
378
419
  @property
379
420
  def Af(self) -> float:
421
+ """
422
+ Pathloss constant
423
+
424
+ :return: Pathloss constant
425
+ :rtype: float
426
+ """
380
427
  return self.__Af
381
428
 
382
429
  @Af.setter
@@ -385,6 +432,12 @@ class RF(AccessPoint):
385
432
 
386
433
  @property
387
434
  def Ef(self) -> float:
435
+ """
436
+ Pathloss exponent
437
+
438
+ :return: Pathloss exponent
439
+ :rtype: float
440
+ """
388
441
  return self.__Ef
389
442
 
390
443
  @Ef.setter
@@ -393,6 +446,12 @@ class RF(AccessPoint):
393
446
 
394
447
  @property
395
448
  def R_awgn(self) -> float:
449
+ """
450
+ Normalized AWGN noise power
451
+
452
+ :return: Normalized AWGN noise power
453
+ :rtype: float
454
+ """
396
455
  return self.__R_awgn
397
456
 
398
457
  @R_awgn.setter
@@ -409,6 +468,12 @@ class RF(AccessPoint):
409
468
 
410
469
  @property
411
470
  def N_rf(self) -> int:
471
+ """
472
+ Number of cells using this femtocell
473
+
474
+ :return: Number of cells using this femtocell
475
+ :rtype: int
476
+ """
412
477
  return self.__N_rf
413
478
 
414
479
  @N_rf.setter
@@ -458,6 +523,30 @@ class Receiver:
458
523
  i1: float = 0.562,
459
524
  i2: float = 0.0868,
460
525
  ) -> None:
526
+ """
527
+ Initializes the object with the values. This is the constructor for the Schrodinger model
528
+
529
+ :param x: x coordinate of the object
530
+ :param y: y coordinate of the object's coordinate.
531
+ :param z: z coordinate of the object's coordinate.
532
+ :param aDet: aDet value of the object's coordinate.
533
+ :param ts: time of the object's coordinate. Default is 10 seconds.
534
+ :param index
535
+ :param fov: q of the object. Default is 1. 6e - 19.
536
+ :param q
537
+ :param s: ibg b - parameter of the Ib - Galactic model. Default i 5 seconds.
538
+ :param b: c b - parameter of the Ib - Galactic model. Default is 5 seconds.
539
+ :param ibg
540
+ :param cb
541
+ :param tk
542
+ :param a: n n - prameter of the B - parameter. Default is 10 seconds.
543
+ :param gv
544
+ :param n
545
+ :param fr
546
+ :param gm
547
+ :param i1
548
+ :param i2
549
+ """
461
550
  self.__x = x
462
551
  self.__y = y
463
552
  self.__z = z
@@ -492,6 +581,12 @@ class Receiver:
492
581
 
493
582
  @property
494
583
  def capacityFromAP(self):
584
+ """
585
+ Get the capacity from AP.
586
+
587
+ :return: capacity from AP
588
+ :rtype: float
589
+ """
495
590
  return self.__capacityFromAP
496
591
 
497
592
  @capacityFromAP.setter
@@ -500,6 +595,12 @@ class Receiver:
500
595
 
501
596
  @property
502
597
  def ID(self) -> int:
598
+ """
599
+ Return the ID of the object. This is used to distinguish between different objects that are part of the same object group.
600
+
601
+ :return: The ID of the object
602
+ :rtype: int
603
+ """
503
604
  return self.__ID
504
605
 
505
606
  @ID.setter
@@ -508,6 +609,12 @@ class Receiver:
508
609
 
509
610
  @property
510
611
  def x(self) -> float:
612
+ """
613
+ Get the x coordinate.
614
+
615
+ :return: The x coordinate
616
+ :rtype: float
617
+ """
511
618
  return self.__x
512
619
 
513
620
  @x.setter
@@ -516,6 +623,12 @@ class Receiver:
516
623
 
517
624
  @property
518
625
  def y(self) -> float:
626
+ """
627
+ Gets the y coordinate .
628
+
629
+ :return: The y coordinate
630
+ :rtype: float
631
+ """
519
632
  return self.__y
520
633
 
521
634
  @y.setter
@@ -524,6 +637,12 @@ class Receiver:
524
637
 
525
638
  @property
526
639
  def z(self) -> float:
640
+ """
641
+ Z coordinate .
642
+
643
+ :return: the z coordinate
644
+ :rtype: float
645
+ """
527
646
  return self.__z
528
647
 
529
648
  @z.setter
@@ -568,6 +687,12 @@ class Receiver:
568
687
 
569
688
  @property
570
689
  def position(self):
690
+ """
691
+ Return the position of the object. This is a tuple of ( x y z)
692
+
693
+ :return: the position of the object
694
+ :rtype: tuple
695
+ """
571
696
  return self.__position
572
697
 
573
698
  @property
@@ -944,4 +1069,4 @@ class Scenario:
944
1069
  return vled.B * m.log2(1 + self.snrVled(receiver, vled))
945
1070
 
946
1071
  def capacityRf(self, receiver: Receiver, rf: RF) -> float:
947
- return rf.B * m.log2(1 + self.snrVled(receiver, rf))
1072
+ return rf.B * m.log2(1 + self.snrRf(receiver, rf))
@@ -306,11 +306,7 @@ class Simulator:
306
306
  text += (
307
307
  " VLed: {:>5}".format(event.connection.AP.ID)
308
308
  + " ({:^5})".format(
309
- len(
310
- self.__controller.activeConnections[
311
- self.__controller.APPosition(event.connection.AP)
312
- ]
313
- )
309
+ self.__controller.numberOfActiveConnections(event.connection.AP)
314
310
  )
315
311
  + " |"
316
312
  )
@@ -318,11 +314,7 @@ class Simulator:
318
314
  text += (
319
315
  " RF: {:>5}".format(event.connection.AP.ID)
320
316
  + " ({:^5})".format(
321
- len(
322
- self.__controller.activeConnections[
323
- self.__controller.APPosition(event.connection.AP)
324
- ]
325
- )
317
+ self.__controller.numberOfActiveConnections(event.connection.AP)
326
318
  )
327
319
  + " |"
328
320
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes