@@ -16,8 +16,7 @@ function parse_mp_power_data(filename, N, corrective_action_ratio)
1616 busarray = [(;b... , t = t) for b in data. bus, t in 1 : N ],
1717 arcarray = [(;a... , t = t) for a in data. arc, t in 1 : N ],
1818 genarray = [(;g... , t = t) for g in data. gen, t in 1 : N ],
19- storarray = isempty (data. storage) ? empty_stor : [(;s... , t = t) for s in data. storage, t in 1 : N],
20- # storarray = isempty(data.storage) ? empty_data = empty_stor : [(;s..., t = t) for s in data.storage, t in 1:N],
19+ storarray = isempty (data. storage) ? empty_data = empty_stor : [(;s... , t = t) for s in data. storage, t in 1 : N],
2120 Δp = corrective_action_ratio .* (data. pmax .- data. pmin)
2221 )
2322
@@ -143,7 +142,7 @@ function build_base_polar_mpopf(core, data, N, Nbus)
143142
144143 c_ramp_rate = constraint (
145144 core,
146- c_ramp (pg[g. i, g. t - 1 ], pg[g. i, g. t]) for g in data. genarray[:, 2 : N];
145+ ( c_ramp (pg[g. i, g. t - 1 ], pg[g. i, g. t]) for g in data. genarray[:, 2 : N]) ;
147146 lcon = repeat (- data. Δp, 1 , N- 1 ),
148147 ucon = repeat ( data. Δp, 1 , N- 1 )
149148 )
0 commit comments