Home > matpower7.0 > most > lib > t > most_ex5_mpopf.m

most_ex5_mpopf

PURPOSE ^

MOST_EX5_MPOPF Examples of deterministic multiperiod DC OPF problems.

SYNOPSIS ^

function most_ex5_mpopf(quiet)

DESCRIPTION ^

MOST_EX5_MPOPF  Examples of deterministic multiperiod DC OPF problems.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function most_ex5_mpopf(quiet)
0002 %MOST_EX5_MPOPF  Examples of deterministic multiperiod DC OPF problems.
0003 
0004 %   MOST
0005 %   Copyright (c) 2015-2016, Power Systems Engineering Research Center (PSERC)
0006 %   by Ray Zimmerman, PSERC Cornell
0007 %
0008 %   This file is part of MOST.
0009 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0010 %   See https://github.com/MATPOWER/most for more info.
0011 
0012 %% set up options
0013 define_constants;
0014 verbose = 1;
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', 'MIPS');
0020 mpopt = mpoption(mpopt, 'most.dc_model', 1);
0021 if ~verbose
0022     mpopt = mpoption(mpopt, 'out.all', 0);
0023 end
0024 
0025 casefile = 'ex_case3b';
0026 mpc = loadcase(casefile);
0027 xgd = loadxgendata('ex_xgd_ramp', mpc);
0028 [iwind, mpc, xgd] = addwind('ex_wind', mpc, xgd);
0029 profiles = getprofiles('ex_wind_profile_d', iwind);
0030 profiles = getprofiles('ex_load_profile', profiles);
0031 nt = size(profiles(1).values, 1);       % number of periods
0032 
0033 %%-----  Multiperiod DC OPF (w/ramp)  -----
0034 mdi = loadmd(mpc, nt, xgd, [], [], profiles);
0035 mdo = most(mdi, mpopt);
0036 EPg1 = mdo.results.ExpectedDispatch;    % active generation
0037 Elam1 = mdo.results.GenPrices;          % nodal energy price
0038 if verbose
0039     most_summary(mdo);
0040 end
0041 
0042 %%-----  Multiperiod DC OPF (w/ramp+wear/tear)  -----
0043 xgd.RampWearCostCoeff(1:3) = 1;
0044 mdi = loadmd(mpc, nt, xgd, [], [], profiles);
0045 mdo = most(mdi, mpopt);
0046 EPg1 = mdo.results.ExpectedDispatch;    % active generation
0047 Elam1 = mdo.results.GenPrices;          % nodal energy price
0048 if verbose
0049     most_summary(mdo);
0050 end

Generated on Mon 24-Jun-2019 15:58:45 by m2html © 2005