I believe I managed to answer my own question, so I just want to put on the
list my solution in case others have this question in the future. I had to
add a time component to the reserves struct. I then had to transpose the
matrix before loading it into mdi.FixedReserves. This led to the spinning
reserve constraint to be applied for each hour in the multiperiod solution.
for index = 1:nt
mpc.reserves(index)=mpc.reserves(1);
end
mdi.FixedReserves = mpc.reserves';
On Thu, Sep 14, 2017 at 12:21 PM, Stephen Suffian <[email protected]>
wrote:
> This sender failed our fraud detection checks and may not
> be who they appear to be. Learn about spoofing
> <http://aka.ms/LearnAboutSpoofing>
> Feedback <http://aka.ms/SafetyTipsFeedback>
> Matpower List,
>
> I am trying to run the determininstic unit commitment example (example 6)
> but include a spinning reserve requirement. I am using the spinning reserve
> example data that is used in example 1, but I get the following error:
>
> Index exceeds matrix dimensions
>
> Error in most (line 594)
> r = mdi.FixedReserves(t,j,k)
>
>
> I imagine that means I need to incorporate a time component into the
> reserve data. I tried a few different ways to update the matrices below but
> was unable to get past this error. Is there a different way to incorporate
> reserves in multiperiod problems?
>
> Thanks!
>
> %%----- Reserve Data -----%%
> %% reserve zones, element i, j is 1 if gen j is in zone i, 0 otherwise
> mpc.reserves.zones = [
> 1 1 1 0;
> ];
>
> %% reserve requirements for each zone in MW
> mpc.reserves.req = 150;
>
> %% reserve costs in $/MW for each gen that belongs to at least 1 zone
> %% (same order as gens, but skipping any gen that does not belong to any
> zone)
> % mpc.reserves.cost = [ 5; 5; 21; ];
> % mpc.reserves.cost = [ 5; 5; 16.25; ];
> % mpc.reserves.cost = [ 0; 0; 11.25; ];
> mpc.reserves.cost = [ 1; 3; 5; ];
>
> %% OPTIONAL max reserve quantities for each gen that belongs to at least 1
> zone
> %% (same order as gens, but skipping any gen that does not belong to any
> zone)
> mpc.reserves.qty = [ 100; 100; 200; ];
>