Skip to content

Commit

Permalink
add a PV inputs check
Browse files Browse the repository at this point in the history
  • Loading branch information
adfarth committed Nov 26, 2024
1 parent f09fe6e commit 9a4dd25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/pv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ mutable struct PV <: AbstractTech
if !(0.0 <= dc_ac_ratio <= 2.0)
push!(invalid_args, "dc_ac_ratio must satisfy 0 <= dc_ac_ratio <= 2, got $(dc_ac_ratio)")
end
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)"))
Expand Down

0 comments on commit 9a4dd25

Please sign in to comment.