Skip to content

Commit

Permalink
Fix maint flag in load_resources_data
Browse files Browse the repository at this point in the history
  • Loading branch information
lbonaldo committed Feb 12, 2024
1 parent 9519e1e commit 3281169
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/load_inputs/load_resources_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function _get_summary_map()
:Hydro => "Hydro",
:Storage => "Storage",
:Thermal => "Thermal",
:Vre => "Vre",
:Vre => "VRE",
:MustRun => "Must_run",
:VreStorage => "VRE_and_storage",
)
Expand Down Expand Up @@ -379,7 +379,7 @@ function check_maintenance_applicability(r::AbstractResource)
applicable_resources = Thermal

not_set = resource_attribute_not_set()
maint_value = get(r, :MAINT, not_set)
maint_value = get(r, :maint, not_set)

error_strings = String[]

Expand All @@ -390,12 +390,12 @@ function check_maintenance_applicability(r::AbstractResource)

# MAINT is available only for Thermal
if !isa(r, applicable_resources) && maint_value > 0
e = string("Resource ", resource_name(r), " has :MAINT = ", maint_value, ".\n",
e = string("Resource ", resource_name(r), " has :maint = ", maint_value, ".\n",
"This setting is valid only for resources where the type is one of $applicable_resources.")
push!(error_strings, e)
end
if get(r, :model, not_set) == 2
e = string("Resource ", resource_name(r), " has :MAINT = ", maint_value, ".\n",
e = string("Resource ", resource_name(r), " has :maint = ", maint_value, ".\n",
"This is valid only for resources with unit commitment (:model = 1);\n",
"this has :model = 2.")
push!(error_strings, e)
Expand Down

0 comments on commit 3281169

Please sign in to comment.