Wind Farm Unrestricted#
Source: examples/optimization/wind_farm_unrestricted.py
Introduction#
Inspect the compact unrestricted wind-farm layout optimization benchmark.
Technical Implementation#
This page is generated from the top-of-file module docstring and the example source code. The full script is included below for direct inspection.
1from __future__ import annotations
2
3import design_research_problems as derp
4
5
6def main() -> None:
7 """Print one decoded continuous layout and the baseline solver result."""
8 problem = derp.get_problem("wind_farm_unrestricted_deficit_min")
9 initial = problem.generate_initial_solution()
10 initial_state = problem.decode_candidate(initial)
11 result = problem.solve()
12 solved_state = problem.decode_candidate(result.x)
13
14 print("Unrestricted wind-farm layout benchmark")
15 print("turbine_count", problem.turbine_count)
16 print("initial_weighted_wake_deficit_mps", round(initial_state.weighted_wake_deficit_mps, 6))
17 print("initial_minimum_l1_spacing_m", round(initial_state.minimum_l1_spacing_m, 4))
18 print("solved_weighted_wake_deficit_mps", round(solved_state.weighted_wake_deficit_mps, 6))
19 print("solved_directional_overlap_counts", solved_state.directional_overlap_counts)
20 print("solved_coordinates_m", solved_state.coordinates_m)
21 print("success", result.success)
22 print("message", result.message)
23
24
25if __name__ == "__main__":
26 main()
Expected Results#
Run Command
PYTHONPATH=src python3 examples/optimization/wind_farm_unrestricted.py
Run the command shown below from repository root. Output should summarize the problem setup, a baseline solution, or diagnostic values relevant to this example.