mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
renamed capacity to max_power
This commit is contained in:
@@ -79,7 +79,7 @@ mutable struct ProfiledUnit
|
||||
name::String
|
||||
bus::Bus
|
||||
min_power::Vector{Float64}
|
||||
capacity::Vector{Float64}
|
||||
max_power::Vector{Float64}
|
||||
cost::Vector{Float64}
|
||||
end
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ function _add_profiled_unit!(
|
||||
punits[sc.name, pu.name, t] = @variable(
|
||||
model,
|
||||
lower_bound = pu.min_power[t],
|
||||
upper_bound = pu.capacity[t]
|
||||
upper_bound = pu.max_power[t]
|
||||
)
|
||||
|
||||
# Objective function terms
|
||||
|
||||
@@ -32,7 +32,7 @@ function generate_initial_conditions!(
|
||||
|
||||
# Constraint: Maximum power
|
||||
@constraint(mip, max_power[g in G], p[g] <= g.max_power[t] * x[g])
|
||||
@constraint(mip, pu_max_power[k in PU], pu[k] <= k.capacity[t])
|
||||
@constraint(mip, pu_max_power[k in PU], pu[k] <= k.max_power[t])
|
||||
|
||||
# Constraint: Production equals demand
|
||||
@constraint(
|
||||
|
||||
@@ -322,13 +322,13 @@ function _validate_units(instance::UnitCommitmentInstance, solution; tol = 0.01)
|
||||
end
|
||||
|
||||
# Unit must produce at most its maximum power
|
||||
if production[t] > pu.capacity[t] + tol
|
||||
if production[t] > pu.max_power[t] + tol
|
||||
@error @sprintf(
|
||||
"Profiled unit %s produces above its maximum limit at time %d (%.2f > %.2f)",
|
||||
pu.name,
|
||||
t,
|
||||
production[t],
|
||||
pu.capacity[t]
|
||||
pu.max_power[t]
|
||||
)
|
||||
err_count += 1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user