⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idx_cost.m

📁 该程序是计算最优潮流的matlab工具箱。可以很好的求解目标函数不同的最优潮流问题。
💻 M
字号:
function [PW_LINEAR, POLYNOMIAL, MODEL, STARTUP, SHUTDOWN, N, COST] = idx_cost%IDX_COST   Defines constants for named column indices to gencost matrix.%%   [PW_LINEAR, POLYNOMIAL, MODEL, STARTUP, SHUTDOWN, N, COST] = idx_cost%%   Some examples of usage, after defining the constants using the line above,%   are:%%    start = gencost(4, STARTUP);       % get startup cost of generator 4%    gencost(2, [MODEL, N:COST+1]) = [ POLYNOMIAL 2 30 0 ];%    % set the cost of generator 2 to a linear function COST = 30 * Pg% %   The index, name and meaning of each column of the gencost matrix is given%   below:% %   columns 1-5%    1  MODEL       cost model, 1 - piecewise linear, 2 - polynomial%    2  STARTUP     startup cost in US dollars%    3  SHUTDOWN    shutdown cost in US dollars%    4  N           number of cost coefficients to follow for polynomial cost%                   function, or number of data points for piecewise linear%    5  COST        1st column of cost parameters%                   cost data defining total cost function%                   For polynomial cost (highest order coeff first):%                           e.g. c2, c1, c0%                   where the polynomial is c0 + c1*P + c2*P^2%                   For piecewise linear cost:%                           x0, y0, x1, y1, x2, y2, ...%                   where x0 < x1 < x2 < ... and the points (x0,y0), (x1,y1),%                   (x2,y2), ... are the end- and break-points of the total%                   cost function.% %   additional constants, used to assign/compare values in the MODEL column%    1  PW_LINEAR   piecewise linear generator cost model%    2  POLYNOMIAL  polynomial generator cost model%   MATPOWER%   $Id: idx_cost.m,v 1.5 2004/12/15 22:46:29 ray Exp $%   by Ray Zimmerman, PSERC Cornell%   Copyright (c) 1996-2004 by Power System Engineering Research Center (PSERC)%   See http://www.pserc.cornell.edu/matpower/ for more info.%% define cost modelsPW_LINEAR   = 1;POLYNOMIAL  = 2;%% define the indicesMODEL       = 1;    %% cost model, 1 - piecewise linear, 2 - polynomial STARTUP     = 2;    %% startup cost in US dollarsSHUTDOWN    = 3;    %% shutdown cost in US dollarsN           = 4;    %% number breakpoints in piecewise linear cost function,                    %% or number of coefficients in polynomial cost functionCOST        = 5;    %% beginning of cost parameters,                    %% piecewise linear data as:                    %%      x0, y0, x1, y1, x2, y2, ...                    %% and polynomial data as:                    %%      c2, c1, c0                    %% where the polynomial is c2*P^2 + c1*P + c0                    %% note: polynomials can be of any degree, highest                    %% order coefficient always goes firstreturn;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -