0001 function most_ex4_dcopf_ss(quiet)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 define_constants;
0014 verbose = 0;
0015 mpopt = mpoption('verbose', verbose);
0016 mpopt = mpoption(mpopt, 'out.gen', 1);
0017 mpopt = mpoption(mpopt, 'model', 'DC');
0018 mpopt = mpoption(mpopt, 'opf.dc.solver', 'MIPS');
0019 mpopt = mpoption(mpopt, 'most.solver', 'DEFAULT');
0020 if ~verbose
0021 mpopt = mpoption(mpopt, 'out.all', 0);
0022 end
0023
0024 casefile = 'ex_case3a';
0025 mpc = loadcase(casefile);
0026 xgd = loadxgendata('ex_xgd_res', mpc);
0027
0028
0029
0030 mdi = loadmd(mpc, [], xgd, [], 'ex_contab');
0031 mdo = most(mdi, mpopt);
0032 EPg1 = mdo.results.ExpectedDispatch;
0033 Elam1 = mdo.results.GenPrices;
0034 if verbose
0035 most_summary(mdo);
0036 end
0037
0038
0039
0040 [iwind, mpc, xgd] = addwind('ex_wind', mpc, xgd);
0041 transmat = {[0.158655253931457; 0.682689492137086; 0.158655253931457]};
0042 nt = 1;
0043 nj = 3;
0044 profiles = getprofiles(uniformwindprofile(nt, nj), iwind);
0045
0046
0047 mdi = loadmd(mpc, transmat, xgd, [], [], profiles);
0048 mdo = most(mdi, mpopt);
0049 EPg2 = mdo.results.ExpectedDispatch;
0050 Elam2 = mdo.results.GenPrices;
0051 if verbose
0052 most_summary(mdo);
0053 end
0054
0055
0056
0057 mdi = loadmd(mpc, transmat, xgd, [], 'ex_contab', profiles);
0058 mdo = most(mdi, mpopt);
0059 EPg3 = mdo.results.ExpectedDispatch;
0060 Elam3 = mdo.results.GenPrices;
0061 if verbose
0062 most_summary(mdo);
0063 end
0064
0065
0066
0067 casefile = 'ex_case3b';
0068 mpc = loadcase(casefile);
0069 xgd = loadxgendata('ex_xgd_uc', mpc);
0070 [iwind, mpc, xgd] = addwind('ex_wind_uc', mpc, xgd);
0071 mpc = scale_load(350, mpc, [], struct('scale', 'QUANTITY'));
0072 mpc.gencost(:, STARTUP) = 0;
0073 mpc.gencost(:, SHUTDOWN) = 0;
0074 mpc.reserves.zones = [mpc.reserves.zones 0];
0075
0076 mdi = loadmd(mpc, transmat, xgd, [], 'ex_contab', profiles);
0077 mdo = most(mdi, mpopt);
0078 u = mdo.UC.CommitSched;
0079 EPg4 = mdo.results.ExpectedDispatch;
0080 Elam4 = mdo.results.GenPrices;
0081 if verbose
0082 most_summary(mdo);
0083 end
0084
0085 EPg = [[EPg1; NaN] EPg2 EPg3 EPg4]
0086 Elam = [[Elam1; NaN] Elam2 Elam3 Elam4]