-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from wind_farm_gym import WindFarmEnv | ||
|
||
# Initialize the environment with 3 turbines positioned 750 meters apart in a line | ||
env = WindFarmEnv(turbine_layout=([0, 750, 1500], [0, 0, 0])) | ||
|
||
obs = env.reset() | ||
for _ in range(1000): # Repeat for 1000 steps | ||
a = env.action_space.sample() # Choose an action randomly | ||
obs, reward, _, _ = env.step(a) # Perform the action | ||
env.render() # Render the environment; remove this line to speed up the process | ||
env.close() |