gym-examples 2.0.60__py3-none-any.whl → 2.0.61__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 +13 -3
- {gym_examples-2.0.60.dist-info → gym_examples-2.0.61.dist-info}/METADATA +1 -1
- gym_examples-2.0.61.dist-info/RECORD +7 -0
- gym_examples-2.0.60.dist-info/RECORD +0 -7
- {gym_examples-2.0.60.dist-info → gym_examples-2.0.61.dist-info}/WHEEL +0 -0
- {gym_examples-2.0.60.dist-info → gym_examples-2.0.61.dist-info}/top_level.txt +0 -0
gym_examples/__init__.py
CHANGED
gym_examples/envs/wsn_env.py
CHANGED
@@ -67,11 +67,21 @@ class WSNRoutingEnv(gym.Env):
|
|
67
67
|
|
68
68
|
self.reset()
|
69
69
|
|
70
|
-
def reset(self):
|
71
|
-
# print individual rewards
|
72
70
|
print("\n=================================================")
|
73
|
-
print(
|
71
|
+
print("WSN Routing Environment initialized")
|
72
|
+
print(f"consumption_energy: {self.consumption_energy}")
|
73
|
+
print(f"remaining_energy: {self.remaining_energy}")
|
74
|
+
print(f"sensor_positions: {self.sensor_positions}")
|
75
|
+
print(f"distance_to_base: {self.distance_to_base}")
|
76
|
+
print(f"number_of_packets: {self.number_of_packets}")
|
74
77
|
print("==================================================\n")
|
78
|
+
|
79
|
+
|
80
|
+
def reset(self):
|
81
|
+
# print individual rewards
|
82
|
+
# print("\n=================================================")
|
83
|
+
# print(f"Rewards: {self.rewards_individual}")
|
84
|
+
# print("==================================================\n")
|
75
85
|
# Initialize the position of the sensors randomly
|
76
86
|
self.sensor_positions = np.random.rand(self.n_sensors, 2) * (upper_bound - lower_bound) + lower_bound
|
77
87
|
self.distance_to_base = np.linalg.norm(self.sensor_positions - base_station_position, axis=1)
|
@@ -0,0 +1,7 @@
|
|
1
|
+
gym_examples/__init__.py,sha256=9euimFjmf1gAXbpVoCgKqFAWktP5CZF6UP3QMekzK94,193
|
2
|
+
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
+
gym_examples/envs/wsn_env.py,sha256=QLjn-dt6RSXPPukeICx5rDZoMePaPvRYP8xGIg4jOvc,16407
|
4
|
+
gym_examples-2.0.61.dist-info/METADATA,sha256=7koAmC51NdPOd0jwdT1xAzWe8oijwbq5viDSa7ebFGU,411
|
5
|
+
gym_examples-2.0.61.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
+
gym_examples-2.0.61.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
+
gym_examples-2.0.61.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
gym_examples/__init__.py,sha256=fePp5-Q0WSCK8-XTvG0iDuwODkLyT8yS8plK9Dmz_5U,193
|
2
|
-
gym_examples/envs/__init__.py,sha256=lgMe4pyOuUTgTBUddM0iwMlETsYTwFShny6ifm8PGM8,53
|
3
|
-
gym_examples/envs/wsn_env.py,sha256=hcIF2IpGfzUdjMzBa8S_yuhLd9x-j-PzPr7Y5b7q0lg,15883
|
4
|
-
gym_examples-2.0.60.dist-info/METADATA,sha256=922MvJxVlKbammnVxWVtFefVMYe7vlY9ctGokW4pbdY,411
|
5
|
-
gym_examples-2.0.60.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
6
|
-
gym_examples-2.0.60.dist-info/top_level.txt,sha256=rJRksoAF32M6lTLBEwYzRdo4PgtejceaNnnZ3HeY_Rk,13
|
7
|
-
gym_examples-2.0.60.dist-info/RECORD,,
|
File without changes
|
File without changes
|