Added minimum power to profiled generator

This commit is contained in:
Jun He
2023-04-06 16:16:04 -04:00
parent 319a787904
commit cb7f9e3b27
5 changed files with 5 additions and 1 deletions

View File

@@ -314,6 +314,7 @@ function _from_json(json; repair = true)::UnitCommitmentScenario
pu = ProfiledUnit(
unit_name,
bus,
timeseries(scalar(dict["Minimum power (MW)"], default = 0.0)),
timeseries(dict["Maximum power (MW)"]),
timeseries(dict["Cost (\$/MW)"]),
)

View File

@@ -77,6 +77,7 @@ end
mutable struct ProfiledUnit
name::String
bus::Bus
min_power::Vector{Float64}
capacity::Vector{Float64}
cost::Vector{Float64}
end

View File

@@ -12,7 +12,7 @@ function _add_profiled_unit!(
for t in 1:model[:instance].time
# Decision variable
punits[sc.name, pu.name, t] =
@variable(model, lower_bound = 0, upper_bound = pu.capacity[t])
@variable(model, lower_bound = pu.min_power[t], upper_bound = pu.capacity[t])
# Objective function terms
add_to_expression!(