gym-examples 2.0.54__py3-none-any.whl → 2.0.55__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 +5 -4
- {gym_examples-2.0.54.dist-info → gym_examples-2.0.55.dist-info}/METADATA +1 -1
- gym_examples-2.0.55.dist-info/RECORD +7 -0
- gym_examples-2.0.54.dist-info/RECORD +0 -7
- {gym_examples-2.0.54.dist-info → gym_examples-2.0.55.dist-info}/WHEEL +0 -0
- {gym_examples-2.0.54.dist-info → gym_examples-2.0.55.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -212,14 +212,15 @@ class WSNRoutingEnv(gym.Env):
|
|
212
212
|
distance = np.linalg.norm(self.sensor_positions[i] - self.sensor_positions[action])
|
213
213
|
transmission_energy = self.transmission_energy(self.number_of_packets[i], distance)
|
214
214
|
reception_energy = self.reception_energy(self.number_of_packets[i])
|
215
|
-
total_energy = transmission_energy + reception_energy
|
215
|
+
# total_energy = transmission_energy + reception_energy
|
216
|
+
total_energy = transmission_energy
|
216
217
|
|
217
218
|
# Normalize the total energy consumption
|
218
219
|
max_transmission_energy = self.transmission_energy(self.n_sensors * initial_number_of_packets, self.coverage_radius)
|
219
220
|
max_reception_energy = self.reception_energy(self.n_sensors * initial_number_of_packets)
|
220
|
-
max_total_energy = max_transmission_energy + max_reception_energy
|
221
|
-
|
222
|
-
normalized_total_energy =
|
221
|
+
# max_total_energy = max_transmission_energy + max_reception_energy
|
222
|
+
max_total_energy = max_transmission_energy
|
223
|
+
normalized_total_energy = total_energy / max_total_energy
|
223
224
|
|
224
225
|
return np.clip(1 - normalized_total_energy, 0, 1)
|
225
226
|
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=vnWhhwCczJ-SFYD9e9tkVw0v8gya25yTvJHPjBeSm-U,193
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=aoL7il1bOsPoyBp7HchTRRpumVMIiBAD7kDD53jIck0,15411
|
4
|
+
gym_examples-2.0.55.dist-info/METADATA,sha256=BAqN3wGi55dKSDpBVPjBbSXbCMccK7M8jIO2Ry1AnXY,411
|
5
|
+
gym_examples-2.0.55.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-2.0.55.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-2.0.55.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=47b1oSeurLM2pmSSFWOx-FDfw1qfyNKguLyyNpysyiw,193
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=dO2nPz444_2A1T6gKxNd9q03K2AI26zTt9_kzzvZ-9g,15390
|
4
|
-
gym_examples-2.0.54.dist-info/METADATA,sha256=Av7RM4iEj2AkOiPyWbR9QcrUMitTtj8E8HbTTqJJkVo,411
|
5
|
-
gym_examples-2.0.54.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-2.0.54.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-2.0.54.dist-info/RECORD,,
|
File without changes
|
File without changes
|