Hi Edward,
When I run your code I get …
p =
15.9023 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
600.0000 580.6055 557.8242 543.9727 545.1328
>> define_constants
>> mpc.gen(:, RAMP_30)
ans =
16
68
208
80
240
So, it doesn’t look to me like any ramp limits are being violated. It’s
possible that you are looking at the values of the load following ramp
reserves, which are meaningless unless you have a non-zero cost on them. Try
changing the xgd data definition to …
xgd_table.colnames =
{'CommitKey','MinUp','MinDown','PositiveLoadFollowReservePrice','NegativeLoadFollowReservePrice'};
xgd_table.data = [ones(ng,1),ones(ng,1)*2,ones(ng,1),1e-9*ones(ng,2)];
… and see if the results make more sense. This is due to the fact that the
delta_+ and delta_- variables in (4.26) and (4.27) in the manual are only
“tight” against these constraints if they have a positive cost on them.
Ray
> On Sep 14, 2017, at 1:40 AM, Quarm JNR, Edward A
> <[email protected]> wrote:
>
> Hi community,
>
> I am running a multi-period simulation in MOST with the following constraints:
> Zonal reserve requirement
> Generator Minimum up time and down time
>
> I obtain output generation (P) but they violate ramp_30 on the last generator
> (which limits the period to period ramping). Can you please help me
> understand why this is so? Have I done something wrong somewhere?
>
> When I include 'loadfollow' ramping constraints the ramp_30 constraints are
> violated further.
>
> Thanks in advance.
>
> My code is below:
>
> clear all
> casefile = 'case5';
> mpc = loadcase(casefile);
> ng = size(mpc.gen, 1);
> nb = size(mpc.bus, 1);
>
> TCL MERGE ERROR ( 09/14/2017 09:57:55 ): "invalid command name "reserve""
OutmailID: 121827745, List: 'matpower-l', MemberID: 75174736
SCRIPT: "reserve data > mpc.reserves.zones = ones(1,ng); >
mpc.reserves.cost = [0.07;0.03;0.05;0.12; 0.09]; > mpc.reserves.qty =
mpc.gen(:,9).*0.4; > mpc.reserves.req = sum(mpc.reserves.qty)*0.3; > >"
> cost1 = [0.35;0.83;0.58;0.54;0.91];
> cost2 = [0.28;0.75;0.75;0.38;0.56];
> %
> mpc.gen(:,18) = mpc.gen(:,9)*0.4; %generators can ramp up to 40% of max
> capacity in 10 sec
> mpc.gen(:,19) = mpc.gen(:,9)*0.4; %generators can ramp up to 40% of max
> capacity in 30sec
>
> xgd_table.colnames = {'CommitKey','MinUp','MinDown'};
> xgd_table.data = [ones(ng,1),ones(ng,1)*2,ones(ng,1)];
>
> xgd = loadxgendata(xgd_table, mpc);
> nt = 5;% five periods
>
> TCL MERGE ERROR ( 09/14/2017 09:57:55 ): "invalid command name "generate""
OutmailID: 121827745, List: 'matpower-l', MemberID: 75174736
SCRIPT: "generate load values > pd = mpc.bus(:,3)*0.9; > pt = [175.19; 165.15;
158.67; 154.73; 155.06; 160.48; ... > 173.39; 177.60; 186.81; 206.96;
228.61; 236.10; ... > 242.18; 243.60; 248.86; 255.79; 256.00; 246.74; ...
> 245.97; 237.35; 237.31; 232.67; 195.93; 195.60;]; > > pt = (pt /
max(pt)); > pt = pt(1:nt); > pdt = (pd*pt'); > >"
> define_constants
> [CT_LABEL, CT_PROB, CT_TABLE, CT_TBUS, CT_TGEN, CT_TBRCH, CT_TAREABUS, ...
> CT_TAREAGEN, CT_TAREABRCH, CT_ROW, CT_COL, CT_CHGTYPE, CT_REP, ...
> CT_REL, CT_ADD, CT_NEWVAL, CT_TLOAD, CT_TAREALOAD, CT_LOAD_ALL_PQ, ...
> CT_LOAD_FIX_PQ, CT_LOAD_DIS_PQ, CT_LOAD_ALL_P, CT_LOAD_FIX_P, ...
> CT_LOAD_DIS_P, CT_TGENCOST, CT_TAREAGENCOST, CT_MODCOST_F, ...
> CT_MODCOST_X] = idx_ct;
>
> loadprofile = struct( ...
> 'type', 'mpcData', ...
> 'table', CT_TLOAD, ...
> 'rows', (mpc.bus(:,1))', ...
> 'col', CT_LOAD_FIX_P, ...
> 'chgtype', CT_REP, ...
> 'values', [] );
>
>
> loadprofile.values(:, 1, :) = pdt';
>
> profiles = getprofiles(loadprofile);
>
> mdi = loadmd(mpc,nt,xgd,[],[], profiles);
>
> for it=1:nt
> mdi.FixedReserves(it,1,1)=mpc.reserves;
> end
>
> mpopt = mpoption('most.dc_model', 1);
> mpopt = mpoption(mpopt,'most.fixed_res',1);
> mdo = most(mdi, mpopt);
> p = mdo.results.ExpectedDispatch;