Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
SytzeAndr committed Feb 3, 2022
1 parent c10326b commit 94fc22d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Make sure that you are using Python 3.8 or newer. You also need to install requi
`python3 -m pip install -r requirements.txt` from the project's folder.

To replicate the experiments in the paper, run `python3 code/main.py --config CONFIG_FILE`, where `CONFIG_FILE` is a
path to a configuration file. The output data is written to a directory specified in the configuration, in Tensorboard
format. You can use `./code/tensorboard_to_csv.py --path PATH` to convert the output from `PATH` to a `.csv`-file.
path to a configuration file. The output data is written in Tensorboard
format to `code/<directory>/<name>/...`, where `<directory>` and `<name>` correspond to parameters specified in the configuration file. You can use `./code/tensorboard_to_csv.py --path PATH` to convert the output from `PATH` to a `.csv`-file.

### Building from the Source Code

Expand All @@ -27,14 +27,16 @@ install a Python package that will make the environment available on your machin

First, make sure that you have `build` installed by running `python3 -m pip install --upgrade build`.

Next, build the package by running `python3 -m build` from the project's directory. This will create `./dist` with
a `wind_farm_gym-VERSION-py3-none-any.whl` file in it, where `VERSION` is the current release version.
Next, build the package by running `python3 -m build` from the project's directory. For linux based systems you can be asked to install `python3-venv` (i.e. `apt install python3-venv`).

Finally, install the package by running `python3 -m pip install wind_farm_gym-VERSION-py3-none-any.whl`, or
`python3 -m pip install wind_farm_gym-VERSION-py3-none-any.whl --force-reinstall` if you want to reinstall an existing
This will create `./dist` with
a `wind_farm_gym-<VERSION>-py3-none-any.whl` file in it, where `<VERSION>` is the current release version.

Finally, install the package by running `python3 -m pip install wind_farm_gym-<VERSION>-py3-none-any.whl`, or
`python3 -m pip install wind_farm_gym-<VERSION>-py3-none-any.whl --force-reinstall` if you want to reinstall an existing
installation. This should install the package and its dependencies.

To test that the package is available and working, you can run the following script:
To test that the package is available and working, you can run [build-test.py](https://github.com/AlgTUDelft/wind-farm-env/blob/main/build-test.py). A simulation window should appear on your screen.
```python
from wind_farm_gym import WindFarmEnv

Expand Down
11 changes: 11 additions & 0 deletions build-test.py
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()

0 comments on commit 94fc22d

Please sign in to comment.