Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0f7d3e2
Merge pull request #147 from WISDEM/develop
jaredthomas68 Oct 21, 2025
1d81242
Bump version from 0.1.0-beta0 to 0.1.0-beta1
cfrontin Oct 21, 2025
bcc1be4
Merge pull request #151 from WISDEM/develop
jaredthomas68 Oct 22, 2025
ea554b5
Merge branch 'develop' of github.com:WISDEM/Ard into develop
cfrontin Oct 22, 2025
9dc8be4
Merge branch 'main' of github.com:WISDEM/Ard into develop
cfrontin Oct 22, 2025
49b12da
Bump version from 0.1.0-beta1 to 0.1.0-beta2
cfrontin Oct 22, 2025
604d9b9
Merge branch 'main' of github.com:WISDEM/Ard into develop
cfrontin Oct 22, 2025
d392d16
Merge branch 'develop' of github.com:WISDEM/Ard into develop
cfrontin Oct 28, 2025
6158eb3
Merge branch 'develop' of github.com:WISDEM/Ard into develop
cfrontin Nov 3, 2025
c2d2db8
added NSGA2 to optimizer options
cfrontin Nov 25, 2025
0fd2f51
removed zero velocity rows from floris results
cfrontin Nov 25, 2025
acfee66
Merge branch 'bugfix/remove_zero_velocity_resource_floris' into featu…
cfrontin Nov 25, 2025
905510c
add example 06
cfrontin Dec 1, 2025
e18c236
Merge branch 'develop' of github.com:WISDEM/Ard into feature/outside_…
cfrontin Dec 2, 2025
32ffc44
udpate
cfrontin Dec 4, 2025
8bf7720
adjust pyproject to use dev branch
cfrontin Dec 4, 2025
ad4b35e
added gfortran for running on GH action runner
cfrontin Dec 4, 2025
4dd4e9b
undo dev branching
cfrontin Dec 4, 2025
6cd30df
Merge branch 'develop' into feature/outside_driver
cfrontin Dec 17, 2025
d537a9f
Merge branch 'develop' into feature/outside_driver
cfrontin Jan 2, 2026
155dcce
black reformat plus added copilot-requested changes for viz utils
cfrontin Jan 2, 2026
4a79674
added forgotten file
cfrontin Jan 2, 2026
6e64e76
add unit testing for nsga2 implementation
cfrontin Jan 5, 2026
b85d234
address @jaredthomas68 comments
cfrontin Jan 5, 2026
46ae3b2
add ard yaml
cfrontin Jan 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 29 additions & 22 deletions ard/api/interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib
import openmdao.api as om
from openmdao.drivers.doe_driver import DOEGenerator
from wisdem.optimization_drivers.nsga2_driver import NSGA2Driver
from openmdao.utils.file_utils import clean_outputs
from ard.utils.io import load_yaml, replace_key_value
from ard.utils.logging import prepend_tabs_to_stdio
Expand Down Expand Up @@ -229,29 +230,35 @@ def set_up_system_recursive(
if analysis_options:
# set up driver
if "driver" in analysis_options:
Driver = getattr(om, analysis_options["driver"]["name"])

# handle DOE drivers with special treatment
if Driver == om.DOEDriver:
generator = None
if "generator" in analysis_options["driver"]:
if type(analysis_options["driver"]["generator"]) == dict:
gen_dict = analysis_options["driver"]["generator"]
generator = getattr(om, gen_dict["name"])(
**gen_dict["args"]
)
elif isinstance(
analysis_options["driver"]["generator"], DOEGenerator
):
generator = analysis_options["driver"]["generator"]
else:
raise NotImplementedError(
"Only dictionary-specified or OpenMDAO "
"DOEGenerator generators have been implemented."
)
prob.driver = Driver(generator)

name_driver = analysis_options["driver"]["name"]

if name_driver == "NSGA2":
prob.driver = NSGA2Driver()
else:
prob.driver = Driver()
Driver = getattr(om, name_driver)

# handle DOE drivers with special treatment
if Driver == om.DOEDriver:
generator = None
if "generator" in analysis_options["driver"]:
if type(analysis_options["driver"]["generator"]) == dict:
gen_dict = analysis_options["driver"]["generator"]
generator = getattr(om, gen_dict["name"])(
**gen_dict["args"]
)
elif isinstance(
analysis_options["driver"]["generator"], DOEGenerator
):
generator = analysis_options["driver"]["generator"]
else:
raise NotImplementedError(
"Only dictionary-specified or OpenMDAO "
"DOEGenerator generators have been implemented."
)
prob.driver = Driver(generator)
else:
prob.driver = Driver()

# handle the options now
if "options" in analysis_options["driver"]:
Expand Down
27 changes: 27 additions & 0 deletions ard/viz/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import numpy as np


def get_plot_range(values, pct_buffer=5.0):
"""
get the min and max values for a plot axis with a buffer applied

Parameters
----------
values : np.array
the array of values in a given dimension
pct_buffer : float, optional
percent that should be included as a buffer, by default 5.0

Returns
-------
float
minimum value for the plot range
float
maximum value for the plot range
"""
min_value = np.min(values)
max_value = np.max(values)
dvalues = max_value - min_value
min_value = min_value - pct_buffer / 100.0 * dvalues
max_value = max_value + pct_buffer / 100.0 * dvalues
return min_value, max_value
91 changes: 91 additions & 0 deletions examples/06_onshore_multiobjective/inputs/ard_system.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
modeling_options:
windIO_plant: !include windio.yaml
layout:
type: gridfarm
N_turbines: 25
N_substations: 1
spacing_primary: 7.0
spacing_secondary: 7.0
angle_orientation: 0.0
angle_skew: 0.0
aero:
return_turbine_output: True
floris:
peak_shaving_fraction: 0.2
peak_shaving_TI_threshold: 0.0
collection:
max_turbines_per_string: 8
solver_name: highs
solver_options:
time_limit: 60
mip_gap: 0.02
model_options:
topology: radial # radial, branched
feeder_route: segmented
feeder_limit: unlimited
offshore: false
floating: false
costs:
rated_power: 3400000.0 # W
num_blades: 3
rated_thrust_N: 645645.83964671
gust_velocity_m_per_s: 52.5
blade_surface_area: 69.7974979
tower_mass: 620.4407337521
nacelle_mass: 101.98582836439
hub_mass: 8.38407517646
blade_mass: 14.56341339641
foundation_height: 0.0
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
trench_len_to_substation_km: 50.0
distance_to_interconnect_mi: 4.97096954
interconnect_voltage_kV: 130.0
tcc_per_kW: 1300.00 # (USD/kW)
opex_per_kW: 44.00 # (USD/kWh)

system: onshore

analysis_options:
driver:
name: NSGA2
options:
max_gen: 10
pop_size: 10
run_parallel: False
design_variables:
spacing_primary:
lower: 3.0
upper: 12.0
scaler: 0.14
spacing_secondary:
lower: 3.0
upper: 12.0
scaler: 0.14
angle_orientation:
lower: -180.0
upper: 180.0
scaler: 0.025
angle_skew:
lower: -45.0
upper: 45.0
scaler: 0.11
constraints:
boundary_distances:
units: km
upper: 0.0
scaler: 2.0
spacing_constraint.turbine_spacing:
units: km
lower: 0.552
objectives:
financese.lcoe:
scaler: 10.0
# AEP_farm:
# scaler: -0.01
# units: GW*h
area_tight:
units: km**2
scaler: 0.1
recorder:
filepath: cases.sql
34 changes: 34 additions & 0 deletions examples/06_onshore_multiobjective/inputs/windio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ard Example 01 onshore wind plant
site:
name: Ard Example 01 offshore wind site
boundaries:
polygons:
- x: [ 1500.0, 3000.0, 3000.0, 1500.0, -1500.0, -3000.0, -3000.0, -1500.0]
y: [ 3000.0, 1500.0, -1500.0, -3000.0, -3000.0, -1500.0, 1500.0, 3000.0]
energy_resource:
name: Ard Example 01 offshore energy resource
wind_resource: !include ../../data/windIO-plant_wind-resource_wrg-example.yaml
wind_farm:
name: Ard Example 01 offshore wind farm
layouts:
coordinates:
x: [
-2500.0, -1250.0, 0.0, 1250.0, 2500.0,
-2500.0, -1250.0, 0.0, 1250.0, 2500.0,
-2500.0, -1250.0, 0.0, 1250.0, 2500.0,
-2500.0, -1250.0, 0.0, 1250.0, 2500.0,
-2500.0, -1250.0, 0.0, 1250.0, 2500.0
]
y: [
-2500.0, -2500.0, -2500.0, -2500.0, -2500.0,
-1250.0, -1250.0, -1250.0, -1250.0, -1250.0,
0.0, 0.0, 0.0, 0.0, 0.0,
1250.0, 1250.0, 1250.0, 1250.0, 1250.0,
2500.0, 2500.0, 2500.0, 2500.0, 2500.0
]
turbine: !include ../../data/windIO-plant_turbine_IEA-3.4MW-130m-RWT.yaml
electrical_substations:
- electrical_substation:
coordinates:
x: [100.0]
y: [100.0]
Loading
Loading