MATPOWER / most

MOST – MATPOWER Optimal Scheduling Tool, for steady-state power systems scheduling problems.
https://matpower.org/
Other
31 stars 12 forks source link

Multiperiod deterministic UC problem reserve setting #32

Closed yadong-zhang closed 7 months ago

yadong-zhang commented 1 year ago

Hello, I am working on the multiperiod deterministic UC problem using MOST with 12 time steps. Only one zone is considered. I am confused of adding reserve requirements to the model. Here is my .mpc file setting: mpc.reserves.zones = cat(2, ones(1, 54), zeros(1, 99)); mpc.reserves.req = 500; mpc.reserves.cost = 3*ones(54, 1); mpc.reserves.qty = 50*ones(54, 1);

and here is how I use them: mdi = loadmd(mpc, nt, xgd, [], [], profiles); mdi.FixedReserves = mpc.reserves;

But I got the error: Index in position 1 exceeds array bounds. Index must not exceed 1. Error in most (line 599) r = mdi.FixedReserves(t,j,k);

Is there anything that I ignored?

rdzman commented 1 year ago

MOST expects the mdi.FixedReserves struct to have the dimensions nt x nj x nc+1. So for a deterministic problem with multiple periods you would have to do ...

for t = 1:nt
    mdi.FixedReserves(t,1,1) = mpc.reserves;
end

... where nt is the number of periods.

yadong-zhang commented 1 year ago

MOST expects the mdi.FixedReserves struct to have the dimensions nt x nj x nc+1. So for a deterministic problem with multiple periods you would have to do ...

for t = 1:nt
    mdi.FixedReserves(t,1,1) = mpc.reserves;
end

... where nt is the number of periods.

Thanks a lot for the help, the problem has been solved! Cheers!