Python script

The parts  GeneratorDemanded pitchPitch actuators and Yaw actuator will be controlled through the Python API in Ashes if the corresponding parameter is set to Python script.


Note: Ashes will need the latest version of the Simis package for the API to work correctly. If you run into issues when running your Python script, always make sure you have the lates version by typing pip install Simis --upgrade in a command window


Once you have selected the Python script controller in the dropdown menu, go to the Wind turbine part and click the Python script action button as shown in the figure below:



This will open a dialog which enables you to select the Python script that will be run. You can run the script in two different ways:
  • Automatically: you will then have to select the Python script that will be run, and once you start the simulation this script will be automatically called.
  • Manually: you won't have to select the Python script in Ashes. Once you start the simulation, a window will appear with a countdown. You have until the end of the countdown to go to the Python script that you want to run and start it manually. This is useful for example when you want to debug your controller.

Note: some options relative to the use of Python scripts, such as the duration of the countdown (called Waiting time) can be set under Preferences