Hello Community,
I am trying to run a multiperiod deterministic UC in a network which is based
on the example “most_ex6_uc”, but I haven’t been able to successfully implement
loads and res profiles so far. I have been following the manual, but it is not
clear to me which is the proper way to deal with profiles, since they won’t
vary with time unit (1:1:24 hrs).
My simplified network is composed of 5 buses, 3 traditional generators, 3 loads
modelled as negative gens (as showed in the abovementioned example) and 3 RES
generators: the traditional gens and the loads are described in the mpc case,
while the RES have been added in the xgd through the related loadxgendata
command.
I am attaching the relevant parts of the code in order to ease comprehension.
mpc.gen = [
1 1250 0 25 -25 1 100 1 200
60 0 0 0 0 0 0 0 250 250
0 0;
1 125 0 25 -25 1 100 1 200
65 0 0 0 0 0 0 0 250 250
0 0;
2 200 0 50 -50 1 100 1 500
60 0 0 0 0 0 0 0 600 600
0 0;
3 -400 0 0 0 1 100 1 0
-450 0 0 0 0 0 0 0 500 500
0 0;
4 -350 0 0 0 1 100 1 0 -350 0 0 0 0 0 0
0 500 500 0 0;
5 -300 0 0 0 1 100 1 0 -300 0 0 0 0 0 0
0 500 500 0 0;];
xgd_table.data = [
1 1 1 1 5 250 10 250 1e-9 1e-9 1e-6 250
1e-6 250;
1 1 3 1 1e-8 250 2e-8 250 1e-9 1e-9 1e-6 250
1e-6 250;
1 1 1 1 1.5 600 3 600 1e-9 1e-9 10 100
10 250;
2 1 1 1 1e-8 800 2e-8 800 1e-9 1e-9 1e-6 800
1e-6 800;
2 1 1 1 1e-8 800 2e-8 800 1e-9 1e-9 1e-6 800
1e-6 800;
2 1 1 1 1e-8 800 2e-8 800 1e-9 1e-9 1e-6 800
1e-6 800;];
%(Main script)
mpc = loadcase(casefile);
xgd = loadxgendata('ex_xgd_ucR', mpc);
[iwind, mpc, xgd] = addwind('ex_wind_ucR', mpc, xgd);
% create load profiles
aux1=ex_load_profileR; %extracting profiles through an auxiliary
variable
load_values=aux1.values;
load_values = load_values./repmat(max(load_values,[],2),1,24); %conversion
to pu
iload = 4:6;
for i = 1:size(load_values, 1)
wp = load_values(i,:)';
if i==1
profiles = getprofiles('ex_load_profile_d_R',iload(i));
else
profiles = getprofiles('ex_load_profile_d_R',profiles,iload(i));
end
end
% create res profiles
aux2=ex_wind_profileR;
RES_values=aux2.values;
for i = 1:1:size(RES_values,2)
wp = RES_values(:,i);
profiles = getprofiles('ex_wind_profile_d_R',profiles,iwind(i)); %
RES_values profiles
end
nt = 24;
mpc_full = mpc;
xgd_full = xgd;
mdi = loadmd(mpc, nt, xgd, [], [], profiles);
mdo = most(mdi, mpopt);
if verbose
ms = most_summary(mdo);
end
%ex_load_profile (idx_gen & idx_ct defined)
loadprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TLOAD, ...
'rows', 0, ...
'col', CT_LOAD_ALL_PQ, ...
'chgtype', CT_REP, ...
'values', [] );
tmp2=load('tload_profiles.mat');
tload_profiles=tmp2.three_load_profiles;
loadprofile.values = tload_profiles; %(3x24 matrix)
%ex_load_profile_d
global wp;
loadprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 0, ...
'col', PMAX, ...
'chgtype', CT_REP, ...
'values', [] );
loadprofile.values(:, 1, :) = -wp;
%wind_profile (idx_gen & idx_ct defined)
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 0, ...
'col', PMAX, ...
'chgtype', CT_REP, ...
'values', [] );
tmp1=load('res_profiles.mat');
res_profiles=tmp1.three_res_profiles;
windprofile.values = res_profiles; %(24x3 matrix)
%ex_wind_profile_d
global wp;
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 0, ...
'col', PMAX, ...
'chgtype', CT_REP, ...
'values', [] );
windprofile.values(:, 1, :) = wp;
Only the first res profile is recognized, while the load ones are not uploaded
and only the Pmin values are given in the resulting optimased dispatch. I would
like to ask for advice and for further clarification about the use of CT_REP
and REL, since I cannot understand where and how to set these parameters and
for what extent.
Ps I set the Gurobi method as solver.
Thanks in advance,
Best Regards.
Antonio L’Abbate.
Inviato da Posta per Windows 10