Hello all

i wanted to compare between AC OPF results and DC OPF results using MOST

My code for AC OPF is:

++++++++++++++++++++++++++++++++++++++++++++

define_constants;
verbose = 1;
mpopt = mpoption('verbose', verbose);
mpopt = mpoption(mpopt, 'out.gen', 1);
mpopt = mpoption(mpopt, 'model', 'AC');
mpopt = mpoption(mpopt, 'opf.ac.solver', 'MIPS');
mpopt = mpoption(mpopt, 'most.solver', 'MIPS');
if ~verbose
    mpopt = mpoption(mpopt, 'out.all', 0);
end

casefile = 'ex_case3b';
mpc = loadcase(casefile);
xgd = loadxgendata('ex_xgd_ramp', mpc);
profiles = getprofiles('ex_load_profile');
nt = size(profiles(1).values, 1);       % number of periods

mdi = loadmd(mpc, nt, xgd, [], [], profiles);
mdo = most(mdi, mpopt);
EPg1 = mdo.results.ExpectedDispatch;    % active generation
Elam1 = mdo.results.GenPrices;          % nodal energy price
if verbose
    most_summary(mdo);
end


++++++++++++++++++++++++++++++++++

For DC OPF

++++++++++++++++++++++++++++++++++

%% set up options
define_constants;
verbose = 1;
mpopt = mpoption('verbose', verbose);
mpopt = mpoption(mpopt, 'out.gen', 1);
mpopt = mpoption(mpopt, 'model', 'DC');
mpopt = mpoption(mpopt, 'opf.dc.solver', 'MIPS');
mpopt = mpoption(mpopt, 'most.solver', 'MIPS');
mpopt = mpoption(mpopt, 'most.dc_model', 1);
if ~verbose
    mpopt = mpoption(mpopt, 'out.all', 0);
end

casefile = 'ex_case3b';
mpc = loadcase(casefile);
xgd = loadxgendata('ex_xgd_ramp', mpc);
profiles = getprofiles('ex_load_profile');
nt = size(profiles(1).values, 1);       % number of periods

%%-----  Multiperiod DC OPF (w/ramp)  -----
mdi = loadmd(mpc, nt, xgd, [], [], profiles);
mdo = most(mdi, mpopt);
EPg1 = mdo.results.ExpectedDispatch;    % active generation
Elam1 = mdo.results.GenPrices;          % nodal energy price
if verbose
    most_summary(mdo);
end

+++++++++++++++++++++++++++++++


i suppose to get in the results, isn't it?

the results are attached, i don't find any difference between them!

Attachment: DC OPF.pdf
Description: Adobe PDF document

Attachment: AC OPF.pdf
Description: Adobe PDF document

Reply via email to