fg_names.m

来自「该程序是计算最优潮流的matlab工具箱。可以很好的求解目标函数不同的最优潮流问」· M 代码 · 共 24 行

M
24
字号
function [fun, grad] = fg_names(alg)%FG_NAMES Returns names of functions which evaluate objective, constraints & grad.%   [fun, grad] = fg_names(alg) returns the names of two functions. The first%   evaluates the objective function and constraints for the opf algorithm%   specified by alg, the numerical ID of the opf algorithm. The second%   evaluates the gradient of the first. These are in the form expected by%   'constr' in the Opt Toolbox.%   MATPOWER%   $Id: fg_names.m,v 1.5 2004/11/02 15:31:30 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.if opf_form(alg) == 1       %% standard    fun     = 'fun_std';    grad    = 'grad_std';else    %% 2                %% CCV    fun     = 'fun_ccv';    grad    = 'grad_ccv';endreturn;

⌨️ 快捷键说明

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