Hi community,
I am running a multi-period simulation in MOST with the following constraints:
1. Zonal reserve requirement
2. 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);
%% 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
%% 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;