gym-examples 2.0.72__py3-none-any.whl → 2.0.73__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 +1 -1
- gym_examples/envs/wsn_env.py +3 -5
- {gym_examples-2.0.72.dist-info → gym_examples-2.0.73.dist-info}/METADATA +1 -1
- gym_examples-2.0.73.dist-info/RECORD +7 -0
- gym_examples-2.0.72.dist-info/RECORD +0 -7
- {gym_examples-2.0.72.dist-info → gym_examples-2.0.73.dist-info}/WHEEL +0 -0
- {gym_examples-2.0.72.dist-info → gym_examples-2.0.73.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -319,11 +319,9 @@ class WSNRoutingEnv(gym.Env):
|
|
319
319
|
total_energy = np.sum(self.consumption_energy)
|
320
320
|
print(f"Inside network_reward_consumption_energy, total energy: {total_energy}")
|
321
321
|
# Normalize the total energy consumption
|
322
|
-
|
323
|
-
print(f"Inside network_reward_consumption_energy, max
|
324
|
-
|
325
|
-
print(f"Inside network_reward_consumption_energy, max reception energy: {max_reception_energy}")
|
326
|
-
normalized_total_energy = total_energy / (max_transmission_energy + max_reception_energy)
|
322
|
+
max_total_energy = self.n_sensors * initial_energy
|
323
|
+
print(f"Inside network_reward_consumption_energy, max total energy: {max_total_energy}")
|
324
|
+
normalized_total_energy = total_energy / max_total_energy
|
327
325
|
print(f"Inside network_reward_consumption_energy, normalized total energy: {normalized_total_energy}")
|
328
326
|
|
329
327
|
return np.clip(1 - normalized_total_energy, 0, 1)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=LnsUr0dHN4iXm9U9y-GKicgaPBWok_Yw28IYzLsF2nA,193
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=XSB2_uh4XSYJ8900Y91Hh4R3r37SeKsPZZHxU5uuQsk,18237
|
4
|
+
gym_examples-2.0.73.dist-info/METADATA,sha256=kg5dqMd3x68DFKeALLv0nD021r4gsivWJpx-6hJCI0Y,411
|
5
|
+
gym_examples-2.0.73.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-2.0.73.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-2.0.73.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=rTuZiKxgQrl6_lA1u6-ac60xg1CRFlJOlEX6GKSvEfk,193
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=SorBJOVj9Jz4x-VosrChGaaesorWcd7K-qJvwhIZFAA,18553
|
4
|
-
gym_examples-2.0.72.dist-info/METADATA,sha256=6_b2HqQbQ_FccJaGcgcsDI2Z9LOFbPmuAdfXhRiBs3Q,411
|
5
|
-
gym_examples-2.0.72.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-2.0.72.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-2.0.72.dist-info/RECORD,,
|
File without changes
|
File without changes
|