Whilst the objective function used in the Cost of Energy Optimiser represents the state of the art for turbine layout optimisation and will only continue to improve with time, there are limits to what can be achieved in terms of implementing a perturbation function on a single node. For this reason, some users choose to drive Openwind’s cost of energy optimisation from an external algorithm, running Openwind on multiple nodes. This section documents this functionality.
To enable external optimisation, the INI file must be edited to change
ExternalOptimiser No
to
ExternalOptimiser Yes
Once this is set, the normal optimisation behavior of Openwind will no longer work until that INI value is switched back to “No”. The following applies to both the energy optimiser as well as the cost of energy optimiser. The term “objective function” is used to refer to the energy capture or the cost of energy test depending on which is being used.
Starting an optimisation will cause Openwind to cycle through its full test and optimising test benchmarks and then it will write the results to a text file and wait for a new layout to be written to the same folder.
The folder used for writing results and reading new layouts is the current folder so if you just loaded a workbook from a folder then that same folder will be used by the optimiser to drop results and look for new turbine positions.
The sequence of actions in detail is as follows:
•Openwind writes results.txt to the current folder. The format of this file will vary depending on the objective function. However, it contains column headers which should be self-explanatory.
•Once Openwind has completed writing results.txt, it then writes another file named notifyML.txt (ML for Matlab but of course this method is so simple it should work with any external software). The purpose of this empty file is simply to notify the external optimiser that results.txt is complete and ready to be read.
•Openwind then waits….
•The external optimiser reads the results.txt file and deletes both results.txt and notifyML.txt from the current folder.
•The external optimiser the file writes positions.txt containing positions and instructions for Openwind.
•Once the external optimiser has completed writing positions.txt, it then writes another empty file named notifyOW.txt to let Openwind know that it is time to read positions.txt
•Openwind then reads the new positions.txt, deletes positions.txt and notifyOW.txt and runs the objective function with the new positions and any other instructions included in positions.txt
The structure of tab-delimited text file results.txt is as follows:
•Header line containing overall stats
•Header line containing column headers
•One line per turbine for every active turbine in the workbook
oColumn 1: Turbine Index (in order)
oColumn 2: Site Index (in order)
oColumn 3: Turbine Site Index (index of turbine within this site)
oColumn 4: Mover (1/0) any turbine can be moved by the external optimiser but this column tells you which turbines Openwind has marked as having their positions optimised
oColumn 5: Shaker (1/0) even if a turbine isn’t moving it can be part of a site layer which whose results (energy or COE) are included in objective function
oColumn 6: Net Energy in kWh for the latest layout
oColumn 7: Gross Energy in kWh for the latest layout (energy before wake effects but after stoppages)
oColumn 8: Cost of energy per MWh (only in case of OCOE)
•Empty line
•List of site layer names and site indices for reference
The structure of tab-delimited text file positions.txt is as follows:
•Header line containing column headers (not read)
•One line per turbine
oColumn 1: Turbine Index (in order)
oColumn 2: Site Index (in order) – can be read from results.txt
oColumn 3: Turbine Site Index (index of turbine within this site)
oColumn 4: x coordinate
oColumn 5: y coordinate
oColumn 6: turbine type name (optional)
Each line is another turbine in the same order as in results.txt
Instead of the above, any line can contain the text LOADTURBINE (case insensitive) followed by the path to a file containing a saved turbine type. The path must be contained in quotes.
To exit the optimiser simply write EXIT (case insensitive) on any line. Generally, this will be the one and only line of positions.txt
Turbines must be written in the same order as they are in results.txt. It is possible to miss out some turbines but for each site the first turbine must be included in positions.txt. Turbines can be added and subtracted from layers by writing extra lines with the same site index or by specifying the first line of the next site with a turbine index lower than it was in results.txt. Duplicate indices or failures to include at least one turbine per site layer or irreconcilable inconsistency between turbine index, site index and site turbine index will result in an error and the optimiser exiting.