I also couldn't figure it out, but I got around it by adding a separate
profile for each generator and changing the rows value. So if a wind
generator is in row 5, you would have the struct look like this below.


windprofile = struct( ...
    'type', 'mpcData', ...
    'table', CT_TGEN, ...
    'rows', 5, ...
    'col', PMAX, ...
    'chgtype', CT_REL, ...
    'values', [] );

And then for row 6 you would add another profile with the struct looking
tlike this:


windprofile = struct( ...
    'type', 'mpcData', ...
    'table', CT_TGEN, ...
    'rows', 6, ...
    'col', PMAX, ...
    'chgtype', CT_REL, ...
    'values', [] );

It is a bit of a work around, but I believe it should work (I did something
similar to set the Pmax for each conventional generator in a profile, so I
imagine it will work the same).

On Thu, Sep 21, 2017 at 1:52 PM, Stephen Suffian <[email protected]>
wrote:

> I also couldn't figure it out, but I got around it by adding a separate
> profile for each generator and changing the rows value. So if a wind
> generator is in row 5, you would have the struct look like this below.
>
>
> windprofile = struct( ...
>     'type', 'mpcData', ...
>     'table', CT_TGEN, ...
>     'rows', 5, ...
>     'col', PMAX, ...
>     'chgtype', CT_REL, ...
>     'values', [] );
>
> And then for row 6 you would add another profile with the struct looking
> tlike this:
>
>
> windprofile = struct( ...
>     'type', 'mpcData', ...
>     'table', CT_TGEN, ...
>     'rows', 6, ...
>     'col', PMAX, ...
>     'chgtype', CT_REL, ...
>     'values', [] );
>
> It is a bit of a work around, but I believe it should work (I did
> something similar to set the Pmax for each conventional generator in a
> profile, so I imagine it will work the same).
>
> On Thu, Sep 21, 2017 at 5:39 AM, Joshua Sebben <[email protected]>
> wrote:
>
>> By the way,
>>
>>
>>
>> I have also tried setting the row count to [1 2 3 4 5 6 7] for my 7 extra
>> generators that I want to add, however when I run my code I get an error:
>>
>>
>>
>> Error using apply_profile (line 148)
>>
>> apply_profile: third dimension of profile.values should match length of
>> pro=
>>
>> file.rows
>>
>>
>>
>> Error in loadmd (line 508)
>>
>>         optab =3D apply_profile(profiles(p), optab);
>>
>>
>>
>> Error in Test (line 33)
>>
>> mdi =3D loadmd(mpc, transmat, xgd, [], [], profiles);
>>
>>
>> Regards,
>>
>> Josh
>>
>> On 20 September 2017 at 22:17, Joshua Sebben <[email protected]>
>> wrote:
>>
>>> Currently working on adding wind generator units to my model. I am
>>> working off the 30 bus example case in MOST.  I am trying to run the
>>> following code
>>>
>>> casefile = 'case30';
>>> mpc = loadcase(casefile);
>>> xgd = loadxgendata('xgd_uc', mpc);
>>> [iwind, mpc, xgd] = addwind('wind_uc_30', mpc, xgd);
>>> profiles = getprofiles('wind_profile', iwind);
>>> profiles = getprofiles('load_profile', profiles);
>>> nt = size(profiles(1).values, 1);       % number of periods
>>>
>>> %%-----  Full Transition Probabilities  -----
>>> transmat = ex_transmat(nt);
>>> mdi = loadmd(mpc, transmat, xgd, [], [], profiles);
>>> mdo = most(mdi, mpopt);
>>> if verbose
>>>     ms = most_summary(mdo);
>>> end
>>>
>>> However the added generator units of which there are 7 of them in
>>> wind_uc_30 don't seem to get the profile set to them in the output. Instead
>>> only the first Generator unit gets the profile while the rest of them are
>>> set at PMAX.
>>>
>>> windprofile = struct( ...
>>>     'type', 'mpcData', ...
>>>     'table', CT_TGEN, ...
>>>     'rows', 1, ...
>>>     'col', PMAX, ...
>>>     'chgtype', CT_REL, ...
>>>     'values', [] );
>>>
>>>  windprofile.values(:, :, 1) = [
>>>   0.80;
>>>   0.65;
>>>   0.60;
>>>   0.82;
>>>   1.00;
>>>   0.70;
>>>   0.50;
>>>   0.85;
>>>   1.00;
>>>   1.10;
>>>   1.06;
>>>   0.95;
>>>
>>> Above is a snippet from the wind_profile.  I am assuming it has
>>> something to do with the row count, however, I haven't been able to find a
>>> solution.
>>>
>>> Could I please get some help. to ensure all the generator units receive
>>> the load profile.
>>>
>>> Thankyou,
>>>
>>> --
>>> J.Sebben
>>>
>>
>>
>>
>> --
>> J.Sebben
>>
>
>

Reply via email to