gym-examples 3.0.766__py3-none-any.whl → 3.0.767__py3-none-any.whl

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.
gym_examples/__init__.py CHANGED
@@ -5,4 +5,4 @@ register(
5
5
  entry_point="gym_examples.envs:WSNRoutingEnv",
6
6
  )
7
7
 
8
- __version__ = "3.0.766"
8
+ __version__ = "3.0.767"
@@ -195,16 +195,20 @@ class WSNRoutingEnv(gym.Env):
195
195
  continue # Skip if the sensor does not have enough energy to transmit data to the next hop
196
196
 
197
197
  self.update_sensor_energies(i, transmission_energy)
198
+ # Update the metrics
199
+ self.total_energy_consumed += transmission_energy
200
+ self.total_packets_sent_by_sensors += self.number_of_packets[i]
198
201
 
199
202
  if self.remaining_energy[action] < reception_energy:
200
203
  # self.remaining_energy[action] = 0
204
+ self.packet_latency[i] = 0 # Reset the latency of the packet
205
+ self.number_of_packets[i] = 0 # Reset the number of packets of the sensor i
201
206
  continue # Skip if the next hop does not have enough energy to receive data
202
207
 
203
208
  self.update_sensor_energies(action, reception_energy)
204
209
 
205
210
  # Update the metrics
206
- self.total_energy_consumed += transmission_energy + reception_energy
207
- self.total_packets_sent_by_sensors += self.number_of_packets[i]
211
+ self.total_energy_consumed += reception_energy
208
212
  self.packet_latency[action] += self.packet_latency[i] + latency_per_hop
209
213
  self.packet_latency[i] = 0
210
214
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 3.0.766
3
+ Version: 3.0.767
4
4
  Summary: A custom environment for multi-agent reinforcement learning focused on WSN routing.
5
5
  Home-page: https://github.com/gedji/CODES.git
6
6
  Author: Georges Djimefo
@@ -0,0 +1,7 @@
1
+ gym_examples/__init__.py,sha256=lI2A534ndKHi9RQYvkCYTX1c8O0mQr5rLLLQuRzu5Qw,166
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=QX9nNxbq87fRr0Dtfwe3aPtTmtiCJtNHixJLfycR1mo,26794
4
+ gym_examples-3.0.767.dist-info/METADATA,sha256=KSj6oEzWvhbdwcJxk6M1V_OxbwExmam4LyXCHUbrWZ8,412
5
+ gym_examples-3.0.767.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-3.0.767.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-3.0.767.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=oGBLNhUkMsxNUxrD6aMbIe9qHF4IwLFTzFobdBSE9pM,166
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=YyPRExlOFIEDI0NLhaAX6LwOmJgGLw5WU8G-pvD8wVc,26532
4
- gym_examples-3.0.766.dist-info/METADATA,sha256=QMrQjl8_UfOylLp1Aw0TvEtriDzm576Rji5sTS2gtZk,412
5
- gym_examples-3.0.766.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-3.0.766.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-3.0.766.dist-info/RECORD,,