IEAWindTask37 / windIO

Apache License 2.0
19 stars 11 forks source link

[BUGFIX] Fix plant initial layout schema definition and validation #51

Closed bayc closed 1 month ago

bayc commented 1 month ago

Fix plant initial layout schema definition and validation

This PR fixes an error that was occurring where a wind plant file would be falsely validated if it was missing a correct initial_layout definition.

The layouts property of the wind_farm definition had a capital "P" Properties defined (https://github.com/IEAWindTask37/windIO/blob/main/windIO/plant/wind_farm.yaml#L18), which was ignored by the yaml module, so changing to a lower-case "p" properties caused the validation to fail properly. This issue was also found to exist in the initial and final design schemas, which has been corrected.

The additional code changes update the wind_farm schema so that the initial_layout parameter is defined, as opposed to the less clear layout.

Related issue

This PR closes #50. This bug was initially identified by @amirarasteh1990 and @kilojoules.

Impacted areas of the software

plant/wind_farm.yaml plant/wind_energy_system.yaml