diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80a9325f5..c29905fd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: Testing -on: [ push ] +on: [ push, pull_request ] jobs: build: diff --git a/README.md b/README.md index 23559b6de..9fa42bf10 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Hybrid Optimization and Performance Platform +![CI Tests](https://github.com/NREL/HOPP/actions/workflows/ci.yml/badge.svg) + As part of NREL's [Hybrid Energy Systems Research](https://www.nrel.gov/wind/hybrid-energy-systems-research.html), this software assesses optimal designs for the deployment of utility-scale hybrid energy plants, particularly considering wind, solar and storage. diff --git a/hybrid/layout/pv_design_utils.py b/hybrid/layout/pv_design_utils.py index c11a1dd35..0647e4688 100644 --- a/hybrid/layout/pv_design_utils.py +++ b/hybrid/layout/pv_design_utils.py @@ -108,7 +108,7 @@ def size_electrical_parameters( inverter_power=inverter_power, ) - if n_inputs_combiner: + if n_inputs_combiner is not None and n_inputs_inverter is not None: n_combiners = math.ceil(n_strings / n_inputs_combiner) # Ensure there are enough inverters for the number of combiner boxes n_inverters = max(n_inverters, math.ceil(n_combiners / n_inputs_inverter)) diff --git a/tests/hybrid/test_hybrid.py b/tests/hybrid/test_hybrid.py index bb9412a2c..015ccce46 100644 --- a/tests/hybrid/test_hybrid.py +++ b/tests/hybrid/test_hybrid.py @@ -266,7 +266,9 @@ def test_hybrid_detailed_pv_only(site): solar_only['pv']['tech_config']['cec_i_mp_ref'] \ * solar_only['pv']['tech_config']['cec_v_mp_ref'] \ * 1e-3, - inverter_power=solar_only['pv']['tech_config']['inv_snl_paco'] * 1e-3 + inverter_power=solar_only['pv']['tech_config']['inv_snl_paco'] * 1e-3, + n_inputs_inverter=50, + n_inputs_combiner=32 ) assert n_strings == 13435 assert n_combiners == 420