Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
adfarth committed Nov 26, 2024
1 parent 9a4dd25 commit 9491bb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/core/pv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ mutable struct PV <: AbstractTech
if any(x -> x < 0 || x > 1, production_factor_series)
throw(@error("All values in the provided PV production_factor_series must be between 0 and 1."))
end
# TODO validate additional args
if length(invalid_args) > 0
throw(@error("Invalid PV argument values: $(invalid_args)"))
end
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,10 @@ else # run HiGHS tests
grid2load = results["ElectricUtility"]["electric_to_load_series_kw"]
grid2bess = results["ElectricUtility"]["electric_to_storage_series_kw"]
gridRE = sum((grid2load + grid2bess - (grid2bess*(1-bessloss))) .* s.electric_utility.renewable_energy_fraction_series)
pv2load = sum(results["PV"]["electric_to_load_series_kw"])
pv2grid = sum(results["PV"]["electric_to_grid_series_kw"])
pv2bess = sum(results["PV"]["electric_to_storage_series_kw"])
onsiteRE = pv2load + pv2grid + pv2bess - (pv2bess*(1-bessloss))

@test results["ElectricUtility"]["annual_renewable_electricity_supplied_kwh"] gridRE rtol=1e-4
@test results["Site"]["onsite_and_grid_renewable_electricity_fraction_of_elec_load"] ((onsiteRE+gridRE) / results["ElectricLoad"]["annual_calculated_kwh"]) rtol=1e-4
Expand Down

0 comments on commit 9491bb9

Please sign in to comment.