gym-examples 2.0.68__py3-none-any.whl → 2.0.69__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
@@ -6,4 +6,4 @@ register(
6
6
  max_episode_steps=50,
7
7
  )
8
8
 
9
- __version__ = "2.0.68"
9
+ __version__ = "2.0.69"
@@ -179,11 +179,6 @@ class WSNRoutingEnv(gym.Env):
179
179
 
180
180
  def update_sensor_energies(self, i, delta_energy):
181
181
  self.consumption_energy[i] += delta_energy
182
- if delta_energy > 0:
183
- print("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
184
- print(f"Sensor {i} consumed {delta_energy} J")
185
- print(f"Consumption energy of sensor {i}: {self.consumption_energy[i]} J")
186
- print("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n")
187
182
  self.remaining_energy[i] -= delta_energy
188
183
 
189
184
  def transmission_energy(self, number_of_packets, distance):
@@ -306,6 +301,11 @@ class WSNRoutingEnv(gym.Env):
306
301
  Compute the reward based on the total energy consumption (transmission, reception) at the network level
307
302
  '''
308
303
  total_energy = np.sum(self.consumption_energy)
304
+ if total_energy != 0:
305
+ print("\n=================================================")
306
+ print(f"Consumption_energy: {self.consumption_energy}")
307
+ print("=================================================\n")
308
+
309
309
  # Normalize the total energy consumption
310
310
  max_transmission_energy = self.transmission_energy(self.n_sensors * initial_number_of_packets, self.coverage_radius)
311
311
  max_reception_energy = self.reception_energy(self.n_sensors * initial_number_of_packets)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gym-examples
3
- Version: 2.0.68
3
+ Version: 2.0.69
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=f2TYKMfsb8pDtBFRryjIRdvSDx0BzVRDBUqHGypJhyA,193
2
+ gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
+ gym_examples/envs/wsn_env.py,sha256=TKcPJuoDpVKaQGDiF3XqJqUWItOaghc-xRfxycCK7bI,17069
4
+ gym_examples-2.0.69.dist-info/METADATA,sha256=TP0AzKGqqlfAUONXrfuvcfjQI4rAL_r7TjruS4YzIIg,411
5
+ gym_examples-2.0.69.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ gym_examples-2.0.69.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
+ gym_examples-2.0.69.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- gym_examples/__init__.py,sha256=aYEr7oomKYOI8jIHcAnmgwgyswe945nmt2ypd_YXx3Y,193
2
- gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
3
- gym_examples/envs/wsn_env.py,sha256=wAaF2JQ8UmMeA6cvS6u9KNYsqXSDBC8-EMiytlVFPQs,17171
4
- gym_examples-2.0.68.dist-info/METADATA,sha256=KbqG62aXF3WmIq9eLYRbmszRqMeyYnY9n3LLnoZ1YoI,411
5
- gym_examples-2.0.68.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- gym_examples-2.0.68.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
7
- gym_examples-2.0.68.dist-info/RECORD,,