01: Onshore layout-to-LCOE#
In this example, we will demonstrate Ard's ability to run a layout-to-LCOE analysis and optimization.
We can start by loading what we need to run the problem.
from pathlib import Path # optional, for nice path specifications
import pprint as pp # optional, for nice printing
import numpy as np # numerics library
import matplotlib.pyplot as plt # plotting capabilities
import ard # technically we only really need this
from ard.utils.io import load_yaml # we grab a yaml loader here
from ard.api import set_up_ard_model # the secret sauce
from ard.viz.layout import plot_layout # a plotting tool!
import openmdao.api as om # for N2 diagrams from the OpenMDAO backend
%matplotlib inline
This will do for now. We can probably make it a bit cleaner for a later release.
Now, we can set up a case.
We do it a little verbosely so that our documentation system can grab it, you can generally just use relative paths.
We grab the file at inputs/ard_system.yaml, which describes the Ard system for this problem.
It references, in turn, the inputs/windio.yaml file, which is where we define the plant we want to optimize, and an initial setup for it.
# load input
path_inputs = Path.cwd().absolute() / "inputs"
input_dict = load_yaml(path_inputs / "ard_system.yaml")
# create and setup system
prob = set_up_ard_model(input_dict=input_dict, root_data_path=path_inputs)
Running OpenMDAO util to clean the output directories...
No OpenMDAO output directories found.
... done.
Created top-level OpenMDAO problem: top_level.
Adding top_level.
Adding layout2aep.
Adding layout to layout2aep.
Adding aepFLORIS to layout2aep.
Activating approximate totals on layout2aep
Adding boundary.
Adding landuse.
Adding collection.
Adding spacing_constraint.
Adding tcc.
Adding landbosse.
Adding opex.
Adding financese.
System top_level built.
System top_level set up.
Here, you should see each of the groups or components described as they are added to the Ard model and, occasionally, some options being turned on on them, like semi-total finite differencing on groups.
Next is some code you can flip on to use the N2 diagram vizualization tools from the backend toolset, OpenMDAO, that we use. This can be a really handy debugging tool, if somewhat tricky to use; turned on it will show a comprehensive view of the system in terms of its components, variables, and connections, although we leave it off for now.
if False:
# visualize model
om.n2(prob)
Now, we do a one-shot analysis.
The one-shot analysis will run a wind farm as specified in inputs/windio.yaml and with the models specified in inputs/ard_system.yaml, then dump the outputs.
# run the model
prob.run_model()
# collapse the test result data
test_data = {
"AEP_val": float(prob.get_val("AEP_farm", units="GW*h")[0]),
"CapEx_val": float(prob.get_val("tcc.tcc", units="MUSD")[0]),
"BOS_val": float(prob.get_val("landbosse.total_capex", units="MUSD")[0]),
"OpEx_val": float(prob.get_val("opex.opex", units="MUSD/yr")[0]),
"LCOE_val": float(prob.get_val("financese.lcoe", units="USD/MW/h")[0]),
"area_tight": float(prob.get_val("landuse.area_tight", units="km**2")[0]),
"coll_length": float(prob.get_val("collection.total_length_cables", units="km")[0]),
"turbine_spacing": float(
np.min(prob.get_val("spacing_constraint.turbine_spacing", units="km"))
),
}
print("\n\nRESULTS:\n")
pp.pprint(test_data)
print("\n\n")
RESULTS:
{'AEP_val': 406.53718092931325,
'BOS_val': 41.68227106807093,
'CapEx_val': 110.5,
'LCOE_val': 37.274992401593316,
'OpEx_val': 3.7400000000000007,
'area_tight': 13.2496,
'coll_length': 21.89865877023397,
'turbine_spacing': 0.91}
Now, we can optimize the same problem!
The optimization details are set under the analysis_options header in inputs/ard_system.yaml.
Here, we use a four-dimensional rectilinear layout parameterization (\(\theta\)) as design variables, constrain the farm such that the turbines are in the boundaries and satisfactorily spaced, and then we optimize for LCOE.
$\(
\begin{aligned}
\textrm{minimize}_\theta \quad & \mathrm{LCOE}(\theta, \ldots) \\
\textrm{subject to} \quad & f_{\mathrm{spacing}}(\theta, \ldots) < 0 \\
& f_{\mathrm{boundary}}(\theta, \ldots) < 0
\end{aligned}
\)$
optimize = True # set to False to skip optimization
if optimize:
# run the optimization
prob.run_driver()
prob.cleanup()
# collapse the test result data
test_data = {
"AEP_val": float(prob.get_val("AEP_farm", units="GW*h")[0]),
"CapEx_val": float(prob.get_val("tcc.tcc", units="MUSD")[0]),
"BOS_val": float(prob.get_val("landbosse.total_capex", units="MUSD")[0]),
"OpEx_val": float(prob.get_val("opex.opex", units="MUSD/yr")[0]),
"LCOE_val": float(prob.get_val("financese.lcoe", units="USD/MW/h")[0]),
"area_tight": float(prob.get_val("landuse.area_tight", units="km**2")[0]),
"coll_length": float(
prob.get_val("collection.total_length_cables", units="km")[0]
),
"turbine_spacing": float(
np.min(prob.get_val("spacing_constraint.turbine_spacing", units="km"))
),
}
# clean up the recorder
prob.cleanup()
# print the results
print("\n\nRESULTS (opt):\n")
pp.pprint(test_data)
print("\n\n")
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|0
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([0.]),
'angle_skew': array([0.]),
'spacing_primary': array([7.]),
'spacing_secondary': array([7.])}
Objectives
{'financese.lcoe': array([0.03727499])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|1
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([0.]),
'angle_skew': array([0.]),
'spacing_primary': array([7.]),
'spacing_secondary': array([7.])}
Objectives
{'financese.lcoe': array([0.03727499])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|2
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([0.]),
'angle_skew': array([0.]),
'spacing_primary': array([9.]),
'spacing_secondary': array([7.])}
Objectives
{'financese.lcoe': array([0.03624933])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|3
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([0.]),
'angle_skew': array([0.]),
'spacing_primary': array([9.]),
'spacing_secondary': array([9.])}
Objectives
{'financese.lcoe': array([0.03617557])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|4
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([2.]),
'angle_skew': array([0.]),
'spacing_primary': array([9.]),
'spacing_secondary': array([9.])}
Objectives
{'financese.lcoe': array([0.03584399])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|5
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([2.]),
'angle_skew': array([2.]),
'spacing_primary': array([9.]),
'spacing_secondary': array([9.])}
Objectives
{'financese.lcoe': array([0.03571624])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|6
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([2.86472422]),
'angle_skew': array([0.06259609]),
'spacing_primary': array([9.88434648]),
'spacing_secondary': array([7.42956533])}
Objectives
{'financese.lcoe': array([0.03531045])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|7
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([6.22500558]),
'angle_skew': array([1.28475695]),
'spacing_primary': array([11.09633061]),
'spacing_secondary': array([6.10823022])}
Objectives
{'financese.lcoe': array([0.03366195])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|8
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.8188138]),
'angle_skew': array([5.39822071]),
'spacing_primary': array([10.77914966]),
'spacing_secondary': array([4.23726647])}
Objectives
{'financese.lcoe': array([0.03365144])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|9
---------------------------------------------------------------
Design Vars
{'angle_orientation': array([16.24070021]),
'angle_skew': array([7.16094224]),
'spacing_primary': array([9.69137175]),
'spacing_secondary': array([4.22159923])}
Objectives
{'financese.lcoe': array([0.03447578])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|10
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.98084146]),
'angle_skew': array([5.51115844]),
'spacing_primary': array([11.46172858]),
'spacing_secondary': array([4.94088435])}
Objectives
{'financese.lcoe': array([0.03364587])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|11
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.12680988]),
'angle_skew': array([4.10902787]),
'spacing_primary': array([11.12905245]),
'spacing_secondary': array([4.23151744])}
Objectives
{'financese.lcoe': array([0.0337512])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|12
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.97886628]),
'angle_skew': array([5.4994141]),
'spacing_primary': array([11.45685172]),
'spacing_secondary': array([3.52672934])}
Objectives
{'financese.lcoe': array([0.03461958])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|13
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([11.83487874]),
'angle_skew': array([5.75795818]),
'spacing_primary': array([9.65170261]),
'spacing_secondary': array([5.51449937])}
Objectives
{'financese.lcoe': array([0.03364335])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|14
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.16898762]),
'angle_skew': array([4.76502336]),
'spacing_primary': array([9.57983731]),
'spacing_secondary': array([7.21664128])}
Objectives
{'financese.lcoe': array([0.03342139])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|15
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([10.67880208]),
'angle_skew': array([4.94018228]),
'spacing_primary': array([9.27798316]),
'spacing_secondary': array([8.5041002])}
Objectives
{'financese.lcoe': array([0.03416405])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|16
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([13.76846398]),
'angle_skew': array([4.38222082]),
'spacing_primary': array([8.45526817]),
'spacing_secondary': array([7.04205081])}
Objectives
{'financese.lcoe': array([0.03368136])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|17
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.67100257]),
'angle_skew': array([5.24999177]),
'spacing_primary': array([10.23189542]),
'spacing_secondary': array([7.51262583])}
Objectives
{'financese.lcoe': array([0.03344797])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|18
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.07499064]),
'angle_skew': array([4.63840234]),
'spacing_primary': array([9.76792798]),
'spacing_secondary': array([7.16916933])}
Objectives
{'financese.lcoe': array([0.03345668])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|19
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58083851]),
'angle_skew': array([4.54197387]),
'spacing_primary': array([9.42987515]),
'spacing_secondary': array([7.12642418])}
Objectives
{'financese.lcoe': array([0.03341448])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|20
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.59383898]),
'angle_skew': array([4.56753075]),
'spacing_primary': array([9.29318234]),
'spacing_secondary': array([7.26957763])}
Objectives
{'financese.lcoe': array([0.03343148])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|21
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.52896098]),
'angle_skew': array([4.50693903]),
'spacing_primary': array([9.36829045]),
'spacing_secondary': array([7.0785848])}
Objectives
{'financese.lcoe': array([0.03341592])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|22
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.63617789]),
'angle_skew': array([4.68830551]),
'spacing_primary': array([9.40994569]),
'spacing_secondary': array([7.0034306])}
Objectives
{'financese.lcoe': array([0.03342765])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|23
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.66133043]),
'angle_skew': array([4.49126992]),
'spacing_primary': array([9.40673002]),
'spacing_secondary': array([7.10606582])}
Objectives
{'financese.lcoe': array([0.03341513])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|24
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.53477746]),
'angle_skew': array([4.42479964]),
'spacing_primary': array([9.58450624]),
'spacing_secondary': array([7.11100332])}
Objectives
{'financese.lcoe': array([0.03342918])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|25
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58302915]),
'angle_skew': array([4.54437633]),
'spacing_primary': array([9.37672587]),
'spacing_secondary': array([7.21106805])}
Objectives
{'financese.lcoe': array([0.03341496])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|26
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.5681645]),
'angle_skew': array([4.50892582]),
'spacing_primary': array([9.4607693]),
'spacing_secondary': array([7.14353405])}
Objectives
{'financese.lcoe': array([0.03341458])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|27
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58101213]),
'angle_skew': array([4.54295524]),
'spacing_primary': array([9.43553028]),
'spacing_secondary': array([7.11823723])}
Objectives
{'financese.lcoe': array([0.03341537])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|28
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58132973]),
'angle_skew': array([4.5427964]),
'spacing_primary': array([9.42046891]),
'spacing_secondary': array([7.14404817])}
Objectives
{'financese.lcoe': array([0.03341307])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|29
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.5827968]),
'angle_skew': array([4.54606176]),
'spacing_primary': array([9.4028926]),
'spacing_secondary': array([7.17980091])}
Objectives
{'financese.lcoe': array([0.03341186])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|30
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58885698]),
'angle_skew': array([4.57619674]),
'spacing_primary': array([9.395823]),
'spacing_secondary': array([7.20440128])}
Objectives
{'financese.lcoe': array([0.0334133])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|31
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.57312672]),
'angle_skew': array([4.54807807]),
'spacing_primary': array([9.4014217]),
'spacing_secondary': array([7.17929045])}
Objectives
{'financese.lcoe': array([0.03341195])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|32
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58447068]),
'angle_skew': array([4.53425544]),
'spacing_primary': array([9.38686257]),
'spacing_secondary': array([7.17888061])}
Objectives
{'financese.lcoe': array([0.03341229])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|33
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58027608]),
'angle_skew': array([4.53852611]),
'spacing_primary': array([9.40799017]),
'spacing_secondary': array([7.18309859])}
Objectives
{'financese.lcoe': array([0.03341181])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|34
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58409712]),
'angle_skew': array([4.54557748]),
'spacing_primary': array([9.4140551]),
'spacing_secondary': array([7.20038715])}
Objectives
{'financese.lcoe': array([0.03341276])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|35
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58144469]),
'angle_skew': array([4.53560407]),
'spacing_primary': array([9.41808139]),
'spacing_secondary': array([7.16612028])}
Objectives
{'financese.lcoe': array([0.03341208])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|36
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.57230438]),
'angle_skew': array([4.53267257]),
'spacing_primary': array([9.40836324]),
'spacing_secondary': array([7.18452994])}
Objectives
{'financese.lcoe': array([0.03341189])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|37
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.57964711]),
'angle_skew': array([4.53972085]),
'spacing_primary': array([9.4098988]),
'spacing_secondary': array([7.18398409])}
Objectives
{'financese.lcoe': array([0.03341177])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|38
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.5814228]),
'angle_skew': array([4.54107468]),
'spacing_primary': array([9.41179012]),
'spacing_secondary': array([7.18803835])}
Objectives
{'financese.lcoe': array([0.03341173])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|39
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58274736]),
'angle_skew': array([4.54181979]),
'spacing_primary': array([9.41634621]),
'spacing_secondary': array([7.18664825])}
Objectives
{'financese.lcoe': array([0.03341173])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|40
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58422183]),
'angle_skew': array([4.54177433]),
'spacing_primary': array([9.41646606]),
'spacing_secondary': array([7.18799343])}
Objectives
{'financese.lcoe': array([0.0334117])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|41
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.5852452]),
'angle_skew': array([4.54279463]),
'spacing_primary': array([9.41658817]),
'spacing_secondary': array([7.18937067])}
Objectives
{'financese.lcoe': array([0.03341172])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|42
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58361397]),
'angle_skew': array([4.5414975]),
'spacing_primary': array([9.4168773]),
'spacing_secondary': array([7.18861371])}
Objectives
{'financese.lcoe': array([0.03341172])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|43
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58561055]),
'angle_skew': array([4.54054279]),
'spacing_primary': array([9.41612098]),
'spacing_secondary': array([7.18733333])}
Objectives
{'financese.lcoe': array([0.0334117])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|44
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58730327]),
'angle_skew': array([4.53965512]),
'spacing_primary': array([9.41588682]),
'spacing_secondary': array([7.18679308])}
Objectives
{'financese.lcoe': array([0.03341175])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|45
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58565758]),
'angle_skew': array([4.54042612]),
'spacing_primary': array([9.41710902]),
'spacing_secondary': array([7.18724415])}
Objectives
{'financese.lcoe': array([0.03341173])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|46
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58482946]),
'angle_skew': array([4.53924741]),
'spacing_primary': array([9.4157545]),
'spacing_secondary': array([7.18858936])}
Objectives
{'financese.lcoe': array([0.03341171])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|47
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58490655]),
'angle_skew': array([4.54079423]),
'spacing_primary': array([9.41564094]),
'spacing_secondary': array([7.18687427])}
Objectives
{'financese.lcoe': array([0.03341171])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|48
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58554635]),
'angle_skew': array([4.54072261]),
'spacing_primary': array([9.41615941]),
'spacing_secondary': array([7.18749008])}
Objectives
{'financese.lcoe': array([0.03341173])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|49
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.5858588]),
'angle_skew': array([4.54023968]),
'spacing_primary': array([9.41593213]),
'spacing_secondary': array([7.18708669])}
Objectives
{'financese.lcoe': array([0.0334117])}
Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|50
----------------------------------------------------------------
Design Vars
{'angle_orientation': array([12.58621218]),
'angle_skew': array([4.54032343]),
'spacing_primary': array([9.4156105]),
'spacing_secondary': array([7.18720779])}
Objectives
{'financese.lcoe': array([0.03341175])}
Return from COBYLA because the objective function has been evaluated MAXFUN times.
Number of function values = 50 Least value of F = 0.03341169675962258 Constraint violation = 0.0
The corresponding X is:
[ 9.41593213 7.18708669 12.5858588 4.54023968]
The constraint value is:
[-6.41593213e+00 -4.18708669e+00 -1.92585859e+02 -4.95402397e+01
-1.05840679e+01 -1.28129133e+01 -1.67414141e+02 -4.04597603e+01
-4.77756110e-01 -1.88373096e+00 -2.41718701e+00 -1.73759062e+00
-1.17366211e-01 -1.35414747e+00 -3.42085848e+00 -4.20859351e+00
-3.05868311e+00 -6.69368164e-01 -1.22137012e+00 -3.61068506e+00
-5.99999604e+00 -3.61068506e+00 -1.22137012e+00 -6.69368164e-01
-3.05868311e+00 -4.20859351e+00 -3.42085848e+00 -1.35414747e+00
-1.17366211e-01 -1.73759062e+00 -2.41718701e+00 -1.88373096e+00
-4.77756110e-01 -6.72071177e-01 -1.89614235e+00 -3.12021353e+00
-4.34428471e+00 -3.85262413e-01 -9.29612680e-01 -1.99919422e+00
-3.16535231e+00 -4.35977412e+00 -1.32252483e+00 -1.60413629e+00
-2.41122536e+00 -3.43663208e+00 -4.55038843e+00 -2.25978724e+00
-2.42450683e+00 -3.02706954e+00 -3.89283804e+00 -4.89778276e+00
-3.19704965e+00 -3.29860823e+00 -3.76027257e+00 -4.48396130e+00
-5.37445072e+00 -6.72071177e-01 -1.89614235e+00 -3.12021353e+00
-1.04751431e+00 -3.85262413e-01 -9.29612680e-01 -1.99919422e+00
-3.16535231e+00 -1.76650458e+00 -1.32252483e+00 -1.60413629e+00
-2.41122536e+00 -3.43663208e+00 -2.60226736e+00 -2.25978724e+00
-2.42450683e+00 -3.02706954e+00 -3.89283804e+00 -3.48288083e+00
-3.19704965e+00 -3.29860823e+00 -3.76027257e+00 -4.48396130e+00
-6.72071177e-01 -1.89614235e+00 -2.13782001e+00 -1.04751431e+00
-3.85262413e-01 -9.29612680e-01 -1.99919422e+00 -2.64702862e+00
-1.76650458e+00 -1.32252483e+00 -1.60413629e+00 -2.41122536e+00
-3.31960925e+00 -2.60226736e+00 -2.25978724e+00 -2.42450683e+00
-3.02706954e+00 -4.08500915e+00 -3.48288083e+00 -3.19704965e+00
-3.29860823e+00 -3.76027257e+00 -6.72071177e-01 -3.30915499e+00
-2.13782001e+00 -1.04751431e+00 -3.85262413e-01 -9.29612680e-01
-3.70109361e+00 -2.64702862e+00 -1.76650458e+00 -1.32252483e+00
-1.60413629e+00 -4.24654293e+00 -3.31960925e+00 -2.60226736e+00
-2.25978724e+00 -2.42450683e+00 -4.89961856e+00 -4.08500915e+00
-3.48288083e+00 -3.19704965e+00 -3.29860823e+00 -4.50552949e+00
-3.30915499e+00 -2.13782001e+00 -1.04751431e+00 -3.85262413e-01
-4.82764003e+00 -3.70109361e+00 -2.64702862e+00 -1.76650458e+00
-1.32252483e+00 -5.28404068e+00 -4.24654293e+00 -3.31960925e+00
-2.60226736e+00 -2.25978724e+00 -5.84605724e+00 -4.89961856e+00
-4.08500915e+00 -3.48288083e+00 -3.19704965e+00 -6.72071177e-01
-1.89614235e+00 -3.12021353e+00 -4.34428471e+00 -3.85262413e-01
-9.29612680e-01 -1.99919422e+00 -3.16535231e+00 -4.35977412e+00
-1.32252483e+00 -1.60413629e+00 -2.41122536e+00 -3.43663208e+00
-4.55038843e+00 -2.25978724e+00 -2.42450683e+00 -3.02706954e+00
-3.89283804e+00 -4.89778276e+00 -6.72071177e-01 -1.89614235e+00
-3.12021353e+00 -1.04751431e+00 -3.85262413e-01 -9.29612680e-01
-1.99919422e+00 -3.16535231e+00 -1.76650458e+00 -1.32252483e+00
-1.60413629e+00 -2.41122536e+00 -3.43663208e+00 -2.60226736e+00
-2.25978724e+00 -2.42450683e+00 -3.02706954e+00 -3.89283804e+00
-6.72071177e-01 -1.89614235e+00 -2.13782001e+00 -1.04751431e+00
-3.85262413e-01 -9.29612680e-01 -1.99919422e+00 -2.64702862e+00
-1.76650458e+00 -1.32252483e+00 -1.60413629e+00 -2.41122536e+00
-3.31960925e+00 -2.60226736e+00 -2.25978724e+00 -2.42450683e+00
-3.02706954e+00 -6.72071177e-01 -3.30915499e+00 -2.13782001e+00
-1.04751431e+00 -3.85262413e-01 -9.29612680e-01 -3.70109361e+00
-2.64702862e+00 -1.76650458e+00 -1.32252483e+00 -1.60413629e+00
-4.24654293e+00 -3.31960925e+00 -2.60226736e+00 -2.25978724e+00
-2.42450683e+00 -4.50552949e+00 -3.30915499e+00 -2.13782001e+00
-1.04751431e+00 -3.85262413e-01 -4.82764003e+00 -3.70109361e+00
-2.64702862e+00 -1.76650458e+00 -1.32252483e+00 -5.28404068e+00
-4.24654293e+00 -3.31960925e+00 -2.60226736e+00 -2.25978724e+00
-6.72071177e-01 -1.89614235e+00 -3.12021353e+00 -4.34428471e+00
-3.85262413e-01 -9.29612680e-01 -1.99919422e+00 -3.16535231e+00
-4.35977412e+00 -1.32252483e+00 -1.60413629e+00 -2.41122536e+00
-3.43663208e+00 -4.55038843e+00 -6.72071177e-01 -1.89614235e+00
-3.12021353e+00 -1.04751431e+00 -3.85262413e-01 -9.29612680e-01
-1.99919422e+00 -3.16535231e+00 -1.76650458e+00 -1.32252483e+00
-1.60413629e+00 -2.41122536e+00 -3.43663208e+00 -6.72071177e-01
-1.89614235e+00 -2.13782001e+00 -1.04751431e+00 -3.85262413e-01
-9.29612680e-01 -1.99919422e+00 -2.64702862e+00 -1.76650458e+00
-1.32252483e+00 -1.60413629e+00 -2.41122536e+00 -6.72071177e-01
-3.30915499e+00 -2.13782001e+00 -1.04751431e+00 -3.85262413e-01
-9.29612680e-01 -3.70109361e+00 -2.64702862e+00 -1.76650458e+00
-1.32252483e+00 -1.60413629e+00 -4.50552949e+00 -3.30915499e+00
-2.13782001e+00 -1.04751431e+00 -3.85262413e-01 -4.82764003e+00
-3.70109361e+00 -2.64702862e+00 -1.76650458e+00 -1.32252483e+00
-6.72071177e-01 -1.89614235e+00 -3.12021353e+00 -4.34428471e+00
-3.85262413e-01 -9.29612680e-01 -1.99919422e+00 -3.16535231e+00
-4.35977412e+00 -6.72071177e-01 -1.89614235e+00 -3.12021353e+00
-1.04751431e+00 -3.85262413e-01 -9.29612680e-01 -1.99919422e+00
-3.16535231e+00 -6.72071177e-01 -1.89614235e+00 -2.13782001e+00
-1.04751431e+00 -3.85262413e-01 -9.29612680e-01 -1.99919422e+00
-6.72071177e-01 -3.30915499e+00 -2.13782001e+00 -1.04751431e+00
-3.85262413e-01 -9.29612680e-01 -4.50552949e+00 -3.30915499e+00
-2.13782001e+00 -1.04751431e+00 -3.85262413e-01 -6.72071177e-01
-1.89614235e+00 -3.12021353e+00 -4.34428471e+00 -6.72071177e-01
-1.89614235e+00 -3.12021353e+00 -6.72071177e-01 -1.89614235e+00
-6.72071177e-01]
Optimization FAILED.
Return from COBYLA because the objective function has been evaluated MAXFUN times.
-----------------------------------
RESULTS (opt):
{'AEP_val': 454.39511994938914,
'BOS_val': 42.06178913036275,
'CapEx_val': 110.5,
'LCOE_val': 33.4117456773484,
'OpEx_val': 3.7400000000000007,
'area_tight': 18.298495051357502,
'coll_length': 24.299823629499816,
'turbine_spacing': 0.9372783145445399}
plot_layout(
prob,
input_dict=input_dict,
show_image=True,
include_cable_routing=True,
)
plt.show()
The result: a farm that fits in a stop-sign domain and minimzes the LCOE.