Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b84bf0d
fix typos in installation instructions (#152)
jaredthomas68 Oct 24, 2025
1e9c533
Multi-objective refactor (#153)
cfrontin Oct 28, 2025
0315328
Add a simple viewshed component (#156)
cfrontin Nov 3, 2025
da94d6d
Remove zero velocity resource for FLORIS (#160)
cfrontin Dec 2, 2025
816d3c0
Create a new automated stdout/stderr redirection system (#161)
cfrontin Dec 15, 2025
df0ef37
Bugfix/optiwindnet jitter overlapping (#163)
cfrontin Dec 17, 2025
aecfed6
WISDEM NSGA2 incorporation (#158)
cfrontin Jan 6, 2026
79cb5ee
Feature/goodybag (#165)
cfrontin Jan 6, 2026
7682664
fix logomaker (#166)
cfrontin Jan 8, 2026
0355db7
WISDEM update and configurations (#172)
cfrontin Jan 16, 2026
c9690f3
Add domain exclusion zones via windIO (#167)
cfrontin Jan 20, 2026
031589d
Black reformat update to 2026 stable format (#173)
cfrontin Jan 20, 2026
52a7ce8
Eagle density function for eco-constrained design setups (#168)
cfrontin Jan 21, 2026
5e2c43e
update org name (#170)
ptrbortolotti Jan 21, 2026
f8ccba1
Add some helpers for "house style" plots (#174)
cfrontin Feb 3, 2026
db417dd
Merge branch 'main' of github.com:WISDEM/Ard into develop
cfrontin Feb 3, 2026
5aace3b
Release/develop (#177)
jaredthomas68 Feb 6, 2026
3dcb186
Merge branch 'develop' of github.com:WISDEM/Ard into develop
cfrontin Feb 6, 2026
93d5c0b
Develop backmerge (#178)
cfrontin Feb 6, 2026
6257dd7
Update ard/utils/geometry.py
jaredthomas68 Feb 6, 2026
9171ee7
Update test/ard/unit/utils/test_geometry.py
jaredthomas68 Feb 6, 2026
7666e2c
Update docs/testing.md
jaredthomas68 Feb 6, 2026
a1c57ef
correct connection x->y is now x->x
jaredthomas68 Feb 6, 2026
1b60ab1
Merge remote-tracking branch 'origin/develop' into develop
jaredthomas68 Feb 6, 2026
8a1226d
run black
jaredthomas68 Feb 6, 2026
11f6977
Update ard/viz/house_style.py
jaredthomas68 Feb 6, 2026
fa2b610
correct turbine connections and remove unused gplot import
jaredthomas68 Feb 6, 2026
c26a008
run black
jaredthomas68 Feb 6, 2026
b33fc4a
Merge branch 'NLRWindSystems:develop' into develop
cfrontin Feb 6, 2026
766675a
Merge branch 'main' into develop
cfrontin Feb 6, 2026
581041f
Merge branch 'NLRWindSystems:develop' into develop
cfrontin Feb 6, 2026
a004f89
Feature/main hotfixes (#184)
cfrontin Mar 27, 2026
dbc48ca
Merge branch 'develop' of github.com:WISDEM/Ard into develop
cfrontin Mar 27, 2026
8f52b21
Migrate away from optiwindnet's EW_presolver deprecated heuristic (#185)
mdealencar Jul 27, 2026
1da6cfc
update to work with WISDEM 4.2.6
jaredthomas68 Jul 28, 2026
d33bb75
Merge branch 'develop' of github.com:WISDEM/Ard into develop
cfrontin Jul 28, 2026
93aa090
update to work with WISDEM 4.2.6 (#186)
jaredthomas68 Jul 28, 2026
2dae0bd
Merge remote-tracking branch 'origin/develop' into develop
jaredthomas68 Jul 28, 2026
5661f16
backmerge from main into develop and resolve conflicts
jaredthomas68 Jul 28, 2026
8dfb264
prep for beta.5
cfrontin Jul 28, 2026
1e577d5
Merge branch 'develop' of github.com:WISDEM/Ard into develop
cfrontin Jul 28, 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
34 changes: 23 additions & 11 deletions ard/collection/optiwindnet_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from optiwindnet.mesh import make_planar_embedding
from optiwindnet.interarraylib import L_from_site
from optiwindnet.heuristics import EW_presolver
from optiwindnet.heuristics import constructor
from optiwindnet.MILP import OWNWarmupFailed, solver_factory, ModelOptions

from . import templates
Expand Down Expand Up @@ -43,7 +43,7 @@ def _own_L_from_inputs(inputs: dict, discrete_inputs: dict) -> nx.Graph:
)
if np.any(repeat_accumulate > 0): # only if there are any repeats
warn_string = (
f"Detected {np.sum(repeat_accumulate > 0)} coincident "
f"\nDetected {np.sum(repeat_accumulate > 0)} coincident "
f"turbines and/or substations in optiwindnet setup."
) # start a warning string for the UserWarning
# TODO: make Ard warnings?
Expand Down Expand Up @@ -153,6 +153,18 @@ def initialize(self):
def setup(self):
"""Setup of OM component."""
super().setup()
self.constructor_args = {}
model_options = self.modeling_options["collection"]["model_options"]
if model_options.get("feeder_limit") == "unlimited":
self.constructor_args["straight_feeder_route"] = (
model_options.get("feeder_route") == "straight"
)
if model_options.get("topology") == "branched":
self.constructor_args["method"] = "rootlust"
elif model_options.get("topology") == "radial":
self.constructor_args["method"] = "radial_EW"
else:
self.constructor_args.clear()

def setup_partials(self):
"""Setup of OM component gradients."""
Expand Down Expand Up @@ -192,12 +204,12 @@ def compute(
# start from previous solution if available, else from heuristic if it fits
if self.S_previous is not None:
S_warm = self.S_previous
elif (
model_options.get("topology") == "branched"
and model_options.get("feeder_limit") == "unlimited"
and model_options.get("feeder_route") == "segmented"
):
S_warm = EW_presolver(A, capacity=max_turbines_per_string)
elif self.constructor_args:
S_warm = constructor(
A,
capacity=max_turbines_per_string,
**self.constructor_args,
)
else:
S_warm = None

Expand Down Expand Up @@ -265,9 +277,9 @@ def compute(
discrete_outputs["load_cables"] = load_cables
discrete_outputs["max_load_cables"] = S.graph["max_load"]
# TODO: remove this assert after enough testing
assert (
abs(length_cables.sum() - G.size(weight="length")) < 1e-7
), f"difference: {length_cables.sum() - G.size(weight='length')}"
# assert (
# abs(length_cables.sum() - G.size(weight="length")) < 1e-7
# ), f"difference: {length_cables.sum() - G.size(weight='length')}"
outputs["total_length_cables"] = length_cables.sum()

def compute_partials(self, inputs, J, discrete_inputs=None):
Expand Down
106 changes: 101 additions & 5 deletions examples/05_onshore_batch/onshore-batch.ipynb

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions examples/05_onshore_batch/run_wind_ard.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def update_layout(n_turbines, windio_filepath, xlim, ylim):
return x_flat, y_flat


def run_example():
def run_example(make_plots, optimize):

# load input
input_dict = load_yaml("./inputs/ard_system.yaml")
Expand Down Expand Up @@ -88,16 +88,15 @@ def run_example():
print("\n\nRESULTS:\n")
pp.pprint(test_data)
print("\n\n")
plot_layout(
prob,
input_dict=input_dict,
show_image=True,
include_cable_routing=True,
save_path="initial_wind_farm_layout.png",
save_kwargs={"transparent": True},
)

optimize = True # set to False to skip optimization
if make_plots:
plot_layout(
prob,
input_dict=input_dict,
show_image=True,
include_cable_routing=True,
save_path="initial_wind_farm_layout.png",
save_kwargs={"transparent": True},
)

if optimize:

Expand Down Expand Up @@ -127,17 +126,18 @@ def run_example():
pp.pprint(test_data)
print("\n\n")

plot_layout(
prob,
input_dict=input_dict,
show_image=True,
include_cable_routing=True,
save_path="final_wind_farm_layout.png",
save_kwargs={"transparent": True},
)
if make_plots:
plot_layout(
prob,
input_dict=input_dict,
show_image=True,
include_cable_routing=True,
save_path="final_wind_farm_layout.png",
save_kwargs={"transparent": True},
)


if __name__ == "__main__":

run_example()
run_example(make_plots=False, optimize=False)
# update_layout(65, "inputs/windio.yaml", xlim=[-3000, 3000], ylim=[-3000, 3000])
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ include = ["ard", "ard.*"]

[project]
name = "ard-nrel"
version = "0.1.0-beta4"
version = "0.1.0-beta5"
authors = [
{name = "Cory Frontin", email = "cory.frontin@nrel.gov"},
{name = "Rafael Mudafort", email = "rafael.mudafort@nrel.gov"},
Expand All @@ -40,13 +40,13 @@ classifiers = [
dependencies = [
"numpy",
"floris>=4.3",
"wisdem==4.0.5",
"wisdem",
"NLopt",
"marmot-agents",
"openmdao",
"shapely",
"jax",
"optiwindnet>=0.0.6",
"optiwindnet>=0.2.2",
"statsmodels",
"highspy",
"pyyaml",
Expand Down
Binary file modified test/ard/system/api/test_LCOE_OFB_stack_pyrite.npz
Binary file not shown.
10 changes: 5 additions & 5 deletions test/ard/system/api/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ def test_onshore_default_system_aep(self, subtests):
with subtests.test("BOS capex (landbosse.bos_capex)"):
assert self.prob.get_val("landbosse.bos_capex_kW", units="MUSD/GW")[
0
] == pytest.approx(388.37965962436397)
] == pytest.approx(388.37965962436397, rel=1e-3)
with subtests.test("BOS capex (landbosse.total_capex)"):
assert self.prob.get_val("landbosse.total_capex", units="MUSD")[
0
] == pytest.approx(41.68227106807093)
] == pytest.approx(41.68227106807093, rel=1e-3)
with subtests.test("opex.opex"):
assert self.prob.get_val("opex.opex", units="MUSD/yr")[0] == pytest.approx(
3.740
)
with subtests.test("financese.lcoe"):
assert self.prob.get_val("financese.lcoe", units="USD/MW/h")[
0
] == pytest.approx(39.34418112669258)
] == pytest.approx(39.34418112669258, rel=1e-3)


class TestSetUpArdModelOffshoreMonopile:
Expand Down Expand Up @@ -83,15 +83,15 @@ def test_offshore_monopile_default_system(self, subtests):
with subtests.test("BOS capex (orbit.total_capex_kW)"):
assert self.prob.get_val("orbit.total_capex_kW", units="MUSD/GW")[
0
] == pytest.approx(2319.207303980254)
] == pytest.approx(2286.67237244399)
with subtests.test("opex.opex"):
assert self.prob.get_val("opex.opex", units="MUSD/yr")[0] == pytest.approx(
60.5
)
with subtests.test("financese.lcoe"):
assert self.prob.get_val("financese.lcoe", units="USD/MW/h")[
0
] == pytest.approx(99.18265668471714)
] == pytest.approx(98.56006874756466)


class TestSetUpArdModelOffshoreFloating:
Expand Down
2 changes: 1 addition & 1 deletion test/ard/unit/api/test_multiobjective.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_instantiation(self, subtests):
("procs_per_model", 1, np.equal),
("penalty_parameter", 0.0, np.isclose),
("penalty_exponent", 1.0, np.isclose),
("compute_pareto", True, np.equal),
# ("compute_pareto", True, np.equal),
]:
with subtests.test(f"driver default {opt_name}"):
assert comparison_fun(self.da_plough.driver.options[opt_name], opt_val)
Expand Down
Loading