diff --git a/benchmark/benchmark.jl b/benchmark/benchmark.jl index d2c558b..d492ab0 100644 --- a/benchmark/benchmark.jl +++ b/benchmark/benchmark.jl @@ -59,9 +59,8 @@ function main() "tejada19/UC_168h_199g", ] formulations = Dict( - # "ArrCon00" => UnitCommitment.Formulation( - # ramping=UnitCommitment._ArrCon00(), - # ), + "ArrCon00" => + UnitCommitment.Formulation(ramping = UnitCommitment.ArrCon00()), "DamKucRajAta16" => UnitCommitment.Formulation( ramping = UnitCommitment.DamKucRajAta16(), ), @@ -142,7 +141,10 @@ end BLAS.set_num_threads(1) UnitCommitment.optimize!( model, - UnitCommitment.XavQiuWanThi19(time_limit = 3600.0, gap_limit=1e-4), + UnitCommitment.XavQiuWanThi19( + time_limit = 3600.0, + gap_limit = 1e-4, + ), ) end @info @sprintf("Total time was %.2f seconds", total_time) diff --git a/src/model/formulations/ArrCon00/ramp.jl b/src/model/formulations/ArrCon00/ramp.jl index 078a35e..2be98c4 100644 --- a/src/model/formulations/ArrCon00/ramp.jl +++ b/src/model/formulations/ArrCon00/ramp.jl @@ -32,7 +32,7 @@ function _add_ramp_eqs!( if is_initially_on # min power is _not_ multiplied by is_on because if !is_on, then ramp up is irrelevant eq_ramp_up[gn, t] = @constraint( - mip, + model, g.min_power[t] + prod_above[gn, t] + (RESERVES_WHEN_RAMP_UP ? reserve[gn, t] : 0.0) <= @@ -52,7 +52,7 @@ function _add_ramp_eqs!( # Equation (24) in Kneuven et al. (2020) eq_ramp_up[gn, t] = @constraint( - mip, + model, max_prod_this_period - min_prod_last_period <= RU * is_on[gn, t-1] + SU * switch_on[gn, t] ) @@ -66,7 +66,7 @@ function _add_ramp_eqs!( # then the generator should be able to shut down at time t = 1, # but the constraint below will force the unit to produce power eq_ramp_down[gn, t] = @constraint( - mip, + model, g.initial_power - (g.min_power[t] + prod_above[gn, t]) <= RD ) end @@ -83,7 +83,7 @@ function _add_ramp_eqs!( # Equation (25) in Kneuven et al. (2020) eq_ramp_down[gn, t] = @constraint( - mip, + model, max_prod_last_period - min_prod_this_period <= RD * is_on[gn, t] + SD * switch_off[gn, t] )