Josh, Looks like you got it working by splitting out the individual wind profiles. It should also work to set the rows field to [1:7] and then define a matrix of profiles for each of the 7 generators by assigning an nt x 7 matrix to windprofile(:, 1, :).
Hope this helps, Ray > On Sep 23, 2017, at 9:20 PM, Joshua Sebben <joshkeep...@gmail.com> wrote: > > Stephen, > > Thank you so much! That works a treat! > > Regards, > > Josh > > From: Stephen Suffian <mailto:ssuff...@villanova.edu> > Sent: Saturday, 23 September 2017 3:03 AM > To: MATPOWER discussion forum <mailto:matpowe...@list.cornell.edu> > Subject: Re: Adding Wind Generation to Profiles > > Check out the 'help get_profile'. Much like you pass the previous profiles > object on the load profile line, you can pass the previous profiles object on > the other lines: > > profiles = getprofiles('wind_profile1',iwind); > profiles = getprofiles('wind_profile2',profiles,iwind); > profiles = getprofiles('load_profile_30',profiles) > > See if that works! > > On Thu, Sep 21, 2017 at 7:24 PM, Joshua Sebben <joshkeep...@gmail.com > <mailto:joshkeep...@gmail.com>> wrote: > Stephen, > > Thank you for your reply. > > casefile = 'case30_modified_MedPen'; > mpc = loadcase(casefile); > xgd = loadxgendata('xgd_uc_30_MedPen', mpc); > [iwind, mpc, xgd] = addwind('wind_uc_30_MedPen', mpc, xgd); > profiles = getprofiles('wind_profile1', iwind); > profiles = getprofiles('wind_profile2', iwind); > profiles = getprofiles('wind_profile3', iwind); > profiles = getprofiles('wind_profile4', iwind); > profiles = getprofiles('wind_profile5', iwind); > profiles = getprofiles('wind_profile6', iwind); > profiles = getprofiles('wind_profile7', iwind); > profiles = getprofiles('load_profile_30', profiles); > nt = size(profiles(1).values, 1); % number of periods > > I created the 7 wind profiles with each of the row counts changed to 1 to 7 > for their respective generators. > > This would then change my main code assuming to the snippet above? > This again also has the problem of only changing the last generator in the > list as each of the previous wind profile changes are overwritten by the new > getprofile? > > Regards, > Josh > > On 22 September 2017 at 04:02, Stephen Suffian <ssuff...@villanova.edu > <mailto:ssuff...@villanova.edu>> 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 1:52 PM, Stephen Suffian <stephen.suff...@gmail.com > <mailto:stephen.suff...@gmail.com>> 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 <joshkeep...@gmail.com > <mailto:joshkeep...@gmail.com>> 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 <joshkeep...@gmail.com > <mailto:joshkeep...@gmail.com>> 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 > > TCL MERGE ERROR ( 09/27/2017 11:34:31 ): "extra characters after close-quote" OutmailID: 121877606, List: 'matpower-l', MemberID: 75174736 SCRIPT: "----- 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 > > > > > > -- > J.Sebben > > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> --Apple-Mail=_5E841FDC-FD55-4C15-A8A6-51F4D5454155 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="us-ascii" <html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Josh,<div class=""><br class=""></div><div class="">Looks like you got it working by splitting out the individual wind profiles. It should also work to set the <font face="Courier" class="">rows</font> field to <font face="Courier" class="">[1:7]</font> and then define a matrix of profiles for each of the 7 generators by assigning an <font face="Courier" class="">nt</font> x 7 matrix to <font face="Courier" class="">windprofile(:, 1, :)</font>.</div><div class=""><br class=""></div><div class="">Hope this helps,</div><div class=""><br class=""></div><div class=""> Ray</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2017, at 9:20 PM, Joshua Sebben <<a href="mailto:joshkeep...@gmail.com" class="">joshkeep...@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Stephen,</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thank you so much! That works a treat!</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Regards,</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Josh</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; border: none; padding: 0cm;" class=""><b class="">From:<span class="Apple-converted-space"> </span></b><a href="mailto:ssuff...@villanova.edu" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Stephen Suffian</a><br class=""><b class="">Sent:<span class="Apple-converted-space"> </span></b>Saturday, 23 September 2017 3:03 AM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b><a href="mailto:matpowe...@list.cornell.edu" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">MATPOWER discussion forum</a><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>Re: Adding Wind Generation to Profiles</div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">Check out the 'help get_profile'. Much like you pass the previous profiles object on the load profile line, you can pass the previous profiles object on the other lines:</p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile1',iwind);</div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile2',profiles,iwind);</div></div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">profiles = getprofiles('load_profile_30',profiles)</p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">See if that works!</div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Thu, Sep 21, 2017 at 7:24 PM, Joshua Sebben <<a href="mailto:joshkeep...@gmail.com" target="_blank" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">joshkeep...@gmail.com</a>> wrote:</div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;" class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Stephen,</div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thank you for your reply.</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">casefile = 'case30_modified_MedPen';</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mpc = loadcase(casefile);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">xgd = loadxgendata('xgd_uc_30_MedPen', mpc);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[iwind, mpc, xgd] = addwind('wind_uc_30_MedPen', mpc, xgd);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile1', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile2', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile3', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile4', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile5', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile6', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile7', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('load_profile_30', profiles);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">nt = size(profiles(1).values, 1); % number of periods</div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I created the 7 wind profiles with each of the row counts changed to 1 to 7 for their respective generators.</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">This would then change my main code assuming to the snippet above? </div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">This again also has the problem of only changing the last generator in the list as each of the previous wind profile changes are overwritten by the new getprofile?</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Regards,</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Josh</div></div></div><div class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On 22 September 2017 at 04:02, Stephen Suffian <<a href="mailto:ssuff...@villanova.edu" target="_blank" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">ssuff...@villanova.edu</a>> wrote:</div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;" class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><img border="0" width="1" height="1" id="_x0000_i1025" src="https://mail.google.com/mail/u/0/images/cleardot.gif" alt="https://mail.google.com/mail/u/0/images/cleardot.gif" style="width: 0.0104in; height: 0.0104in;" class=""></div></div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">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.</p><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">windprofile = struct( ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'type', 'mpcData', ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'table', CT_TGEN, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'rows', 5, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'col', PMAX, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'chgtype', CT_REL, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'values', [] );</div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">And then for row 6 you would add another profile with the struct looking tlike this:</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">windprofile = struct( ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'type', 'mpcData', ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'table', CT_TGEN, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'rows', 6, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'col', PMAX, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'chgtype', CT_REL, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'values', [] );</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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).</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Thu, Sep 21, 2017 at 1:52 PM, Stephen Suffian <<a href="mailto:stephen.suff...@gmail.com" target="_blank" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">stephen.suff...@gmail.com</a>> wrote:</div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;" class=""><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;">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.</p><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">windprofile = struct( ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'type', 'mpcData', ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'table', CT_TGEN, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'rows', 5, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'col', PMAX, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'chgtype', CT_REL, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'values', [] );</div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">And then for row 6 you would add another profile with the struct looking tlike this:</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">windprofile = struct( ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'type', 'mpcData', ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'table', CT_TGEN, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'rows', 6, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'col', PMAX, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'chgtype', CT_REL, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'values', [] );</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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).</div></div></div></div></div><div class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Thu, Sep 21, 2017 at 5:39 AM, Joshua Sebben <<a href="mailto:joshkeep...@gmail.com" target="_blank" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">joshkeep...@gmail.com</a>> wrote:</div><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;" class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">By the way,</div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> </p><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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:</div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> </p><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Error using apply_profile (line 148)</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">apply_profile: third dimension of profile.values should match length of pro=</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">file.rows</div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> </p><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Error in loadmd (line 508)</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> optab =3D apply_profile(profiles(p), optab);</div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> </p><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Error in Test (line 33)</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mdi =3D loadmd(mpc, transmat, xgd, [], [], profiles);</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Regards,</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Josh</div></div><div class=""><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On 20 September 2017 at 22:17, Joshua Sebben <<a href="mailto:joshkeep...@gmail.com" target="_blank" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">joshkeep...@gmail.com</a>> wrote:</div><div class=""><div class=""><blockquote style="border-style: none none none solid; border-left-width: 1pt; border-left-color: rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;" class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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 <br clear="all" class=""></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">casefile = 'case30';</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mpc = loadcase(casefile);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">xgd = loadxgendata('xgd_uc', mpc);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">[iwind, mpc, xgd] = addwind('wind_uc_30', mpc, xgd);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('wind_profile', iwind);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">profiles = getprofiles('load_profile', profiles);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">nt = size(profiles(1).values, 1); % number of periods</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">" ----- Full Transition Probabilities -----</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">transmat = ex_transmat(nt);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mdi = loadmd(mpc, transmat, xgd, [], [], profiles);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">mdo = most(mdi, mpopt);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">if verbose</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> ms = most_summary(mdo);</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">end</div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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.</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">windprofile = struct( ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'type', 'mpcData', ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'table', CT_TGEN, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'rows', 1, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'col', PMAX, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'chgtype', CT_REL, ...</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 'values', [] );</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> windprofile.values(:, :, 1) = [</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.80;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.65;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.60;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.82;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 1.00;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.70;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.50;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.85;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 1.00;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 1.10;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 1.06;</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> 0.95;</div></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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.<br class=""><br class="">Could I please get some help. to ensure all the generator units receive the load profile.</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thankyou,</div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(136, 136, 136);" class=""><o:p class=""> </o:p></span></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="m5283455457455680649m-8938459024843767280m-7280928080257393954m-8006595772592506661m-3734860020012635803hoenzb"><span style="color: rgb(136, 136, 136);" class="">--<span class="Apple-converted-space"> </span></span><o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(136, 136, 136);" class="">J.Sebben</span></div></div></div></blockquote></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br clear="all" class=""><span class="m5283455457455680649m-8938459024843767280hoenzb"><o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="m5283455457455680649m-8938459024843767280m-7280928080257393954m-8006595772592506661hoenzb"><span style="color: rgb(136, 136, 136);" class="">--<span class="Apple-converted-space"> </span></span><o:p class=""></o:p></span></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(136, 136, 136);" class="">J.Sebben</span></div></div></div></div></blockquote></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></div></blockquote></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></blockquote></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br clear="all" class=""></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="m5283455457455680649hoenzb"><span style="color: rgb(136, 136, 136);" class="">--<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></span></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="color: rgb(136, 136, 136);" class="">J.Sebben</span></div></div></div></div></blockquote></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><table style="border-top-width: 1px; border-top-style: solid; border-top-color: rgb(211, 212, 222);" class=""><tbody class=""><tr class=""><td style="width: 55px; padding-top: 13px;" class=""><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: rgb(149, 79, 114); text-decoration: underline;" class=""><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" class=""></a></td><td style="width: 470px; padding-top: 12px; color: rgb(65, 66, 78); font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;" class="">Virus-free.<span class="Apple-converted-space"> </span><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: rgb(68, 83, 234); text-decoration: underline;" class="">www.avast.com</a></td></tr></tbody></table></div></div></blockquote></div><br class=""></div></body></html>