mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-07 16:58:51 -06:00
Reformat source code
This commit is contained in:
@@ -339,13 +339,15 @@ function _validate_reserve_and_demand(instance, solution, tol = 0.01)
|
||||
err_count += 1
|
||||
end
|
||||
|
||||
upflexiramp =
|
||||
sum(solution["Up-flexiramp (MW)"][g.name][t] for g in instance.units)
|
||||
upflexiramp = sum(
|
||||
solution["Up-flexiramp (MW)"][g.name][t] for g in instance.units
|
||||
)
|
||||
upflexiramp_shortfall =
|
||||
(instance.flexiramp_shortfall_penalty[t] >= 0) ?
|
||||
solution["Up-flexiramp shortfall (MW)"][t] : 0
|
||||
|
||||
if upflexiramp + upflexiramp_shortfall < instance.reserves.upflexiramp[t] - tol
|
||||
if upflexiramp + upflexiramp_shortfall <
|
||||
instance.reserves.upflexiramp[t] - tol
|
||||
@error @sprintf(
|
||||
"Insufficient up-flexiramp at time %d (%.2f + %.2f should be %.2f)",
|
||||
t,
|
||||
@@ -356,13 +358,15 @@ function _validate_reserve_and_demand(instance, solution, tol = 0.01)
|
||||
err_count += 1
|
||||
end
|
||||
|
||||
dwflexiramp =
|
||||
sum(solution["Down-flexiramp (MW)"][g.name][t] for g in instance.units)
|
||||
dwflexiramp = sum(
|
||||
solution["Down-flexiramp (MW)"][g.name][t] for g in instance.units
|
||||
)
|
||||
dwflexiramp_shortfall =
|
||||
(instance.flexiramp_shortfall_penalty[t] >= 0) ?
|
||||
solution["Down-flexiramp shortfall (MW)"][t] : 0
|
||||
|
||||
if dwflexiramp + dwflexiramp_shortfall < instance.reserves.dwflexiramp[t] - tol
|
||||
if dwflexiramp + dwflexiramp_shortfall <
|
||||
instance.reserves.dwflexiramp[t] - tol
|
||||
@error @sprintf(
|
||||
"Insufficient down-flexiramp at time %d (%.2f + %.2f should be %.2f)",
|
||||
t,
|
||||
|
||||
Reference in New Issue
Block a user