Dear Matpower users,
I'm solving SCUC using MOST, but it was extremely slow to formulate the
problem with contingency scenarios.

For example, I'm running the following code (case_ACTIVSg200), it took more
than 2 hours to formulate one instance of SCUC. Without contingencies, one
SCUC is formulated in 3 seconds.

clear;

define_constants;
nt = 24; % 24 hours
area_ind = 2:7;
na = length(area_ind); % 6 areas

mpc = loadcase('case_ACTIVSg200');
mpc.bus(:, BUS_AREA) = mpc.bus(:, ZONE);
ng = size(mpc.gen,1);

scenarios = scenarios_ACTIVSg200; % get a change table

xgd.colnames = {'CommitKey','CommitSched','MinUp','MinDown','InitialState'};
xgd.data = [ones(ng,1), ones(ng,1), ones(ng,1),ones(ng,1), zeros(ng,1)];
xgd = loadxgendata(xgd, mpc);

indices = (1:nt*na); % indices for the load scenarios of the first day
load_data = scenarios(indices, end); % last column: loads of 6 areas
area_load1 = reshape(load_data, na, nt)'; % nt-by-na matrix
profiles = struct( ...
    'type', 'mpcData', ...
    'table', CT_TAREALOAD, ...
    'rows', area_ind, ...
    'col', CT_LOAD_ALL_P, ...
    'chgtype', CT_REP, ...
    'values', [] );
profiles.values(:, 1, :) = area_load1;

%% perform UC regardless of mdo.UC.CommitKey, consider DC line flow
constraints
mpopt = mpoption('most.uc.run',1,'most.dc_model', 1, 'most.skip_prices',
1);

%% Construct MOST struct
mdi = loadmd(mpc, nt, xgd, [], [], profiles); % WITHOUT contingencies
% contab = contab_ACTIVSg200;
% mdi = loadmd(mpc, nt, xgd, [], contab, profiles); % WITH contingencies
mdo = most(mdi,mpopt);


Thanks,
Steven
clear;

define_constants;
nt = 24; % 24 hours
area_ind = 2:7;
na = length(area_ind); % 6 areas

mpc = loadcase('case_ACTIVSg200');
mpc.bus(:, BUS_AREA) = mpc.bus(:, ZONE); 
ng = size(mpc.gen,1);

scenarios = scenarios_ACTIVSg200; % get a change table

xgd.colnames = {'CommitKey','CommitSched','MinUp','MinDown','InitialState'};
xgd.data = [ones(ng,1), ones(ng,1), ones(ng,1),ones(ng,1), zeros(ng,1)];
xgd = loadxgendata(xgd, mpc);

indices = (1:nt*na); % indices for the load scenarios of the first day
load_data = scenarios(indices, end); % last column: loads of 6 areas
area_load1 = reshape(load_data, na, nt)'; % nt-by-na matrix
profiles = struct( ...
    'type', 'mpcData', ...
    'table', CT_TAREALOAD, ...
    'rows', area_ind, ...
    'col', CT_LOAD_ALL_P, ...
    'chgtype', CT_REP, ...
    'values', [] );
profiles.values(:, 1, :) = area_load1;

%% perform UC regardless of mdo.UC.CommitKey, consider DC line flow constraints
mpopt = mpoption('most.uc.run',1,'most.dc_model', 1, 'most.skip_prices', 1); 

%% Construct MOST struct
mdi = loadmd(mpc, nt, xgd, [], [], profiles); % WITHOUT contingencies
% contab = contab_ACTIVSg200;
% mdi = loadmd(mpc, nt, xgd, [], contab, profiles); % WITH contingencies
mdo = most(mdi,mpopt);


Reply via email to