资源简介
May 26, 2016: PSAT version 2.1.10. Compatible with Matlab R2014b, R2015a and R2015b. Some bugs have been fixed.
代码片段和文件信息
function check = autorun(msgtype)
% AUTORUN properly launch PSAT routine checking for data
% files and previous power flow solutions
%
% CHECK = AUTORUN(MSG)
% MSG message to be displayed
% TYPE 0 for static analysis 1 for dynamic analysis
% CHECK 1 if everything goes fine 0 otherwise
%
%Author: Federico Milano
%Date: 29-Oct-2003
%Version: 1.0.0
%
%E-mail: federico.milano@ucd.ie
%Web-site: faraday1.ucd.ie/psat.html
%
% Copyright (C) 2002-2013 Federico Milano
global Settings File Bus
global DAE LIB SNB OPF CPF clpsat Comp
check = 0;
% check for data file
if isempty(File.data)
fm_disp([‘Set a data file before running ‘msg‘.‘]2)
return
end
% check for initial power flow solution
if ~Settings.init
solvepf
if ~Settings.init return end
end
% check for dynamic components if running a static analysis
if ~type && DAE.n && ~clpsat.init
dynlf = sum(prod(Comp.prop(:[3 6 9])2));
iscpf = strcmp(msg‘Continuation Power Flow‘);
if ~Settings.static && ~dynlf
Settings.ok = 0;
uiwait(fm_choice(‘Dynamic components will be discarded. Continue?‘))
if Settings.ok
Settings.static = 1;
solvepf
Settings.static = 0; % reset initial condition
else
return
end
elseif ~Settings.static && ~dynlf && iscpf
Settings.ok = 0;
uiwait(fm_choice([‘Dynamic components can lead to numerical ‘ ...
‘problems discard?‘]))
if Settings.ok
Settings.static = 1;
solvepf
Settings.static = 0; % reset initial condition
end
elseif iscpf
Settings.ok = 1;
%uiwait(fm_choice([‘Dynamic components can lead to numerical ‘ ...
% ‘problems continue?‘]))
%if ~Settings.ok return end
else
uiwait(fm_choice([‘Dynamic components are not supported for ‘ ...
‘static analysis‘]2))
return
end
end
% check for previous CPF & ATC solutions
if strcmp(msg‘SNB Direct Method‘)
one = 1;
else
one = 0;
end
if CPF.init && ~(one && CPF.init == 1)
switch CPF.init
case 1 met = ‘CPF‘;
case 2 met = ‘ATC‘;
case 3 met = ‘N-1 Cont. An.‘;
case 4 met = ‘Continuation OPF (PSAT-GAMS)‘;
end
Settings.ok = 0;
if clpsat.init
Settings.ok = clpsat.refresh;
else
uiwait(fm_choice([met‘ has been run last. Do you want to‘ ...
‘ restore initial PF solution?‘]))
end
if Settings.ok
solvepf
fm_disp([‘Initial PF solution will be used as ‘ ...
‘base case solution.‘])
else
fm_disp([‘Last ‘met‘ solution will be used as ‘ ...
‘base case solution.‘])
end
CPF.init = 0;
end
% check for previous time domain simulations
if Settings.init == 2
Settings.ok = 0;
if clpsat.init
Settings.ok = clpsat.refresh;
else
uiwait(fm_choice([‘TD has been run last. Do you want to‘ ...
‘ restore initial PF solution?‘]))
end
if Settings.ok
solvepf
fm_disp([‘Initial PF solution will be u
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-05-26 16:35 psat\
目录 0 2013-09-27 05:48 psat\@ARclass\
文件 1007 2013-09-27 05:48 psat\@ARclass\ARclass.m
文件 262 2013-09-27 05:48 psat\@ARclass\ba
文件 1269 2013-09-27 05:48 psat\@ARclass\block.m
文件 37 2013-09-27 05:48 psat\@ARclass\display.m
文件 162 2013-09-27 05:48 psat\@ARclass\getidx.m
文件 519 2013-09-27 05:48 psat\@ARclass\growth.m
文件 1068 2013-09-27 05:48 psat\@ARclass\idnum.m
文件 109 2013-09-27 05:48 psat\@ARclass\init.m
文件 155 2013-09-27 05:48 psat\@ARclass\mask.m
文件 104 2013-09-27 05:48 psat\@ARclass\restore.m
文件 1796 2013-09-27 05:48 psat\@ARclass\setup.m
文件 796 2013-09-27 05:48 psat\@ARclass\subsasgn.m
文件 1111 2013-09-27 05:48 psat\@ARclass\subsref.m
目录 0 2013-09-27 05:48 psat\@AVclass\
文件 633 2013-09-27 05:48 psat\@AVclass\AVclass.m
文件 3839 2013-09-27 05:48 psat\@AVclass\Fxcall.m
文件 109 2013-09-27 05:48 psat\@AVclass\Gycall.m
文件 94 2013-09-27 05:48 psat\@AVclass\add.m
文件 309 2013-09-27 05:48 psat\@AVclass\bdmatrix.m
文件 1041 2013-09-27 05:48 psat\@AVclass\block.m
文件 198 2013-09-27 05:48 psat\@AVclass\ceiling.m
文件 37 2013-09-27 05:48 psat\@AVclass\display.m
文件 694 2013-09-27 05:48 psat\@AVclass\dynidx.m
文件 1179 2013-09-27 05:48 psat\@AVclass\equiv.m
文件 2347 2013-09-27 05:48 psat\@AVclass\fcall.m
文件 175 2013-09-27 05:48 psat\@AVclass\gcall.m
文件 238 2013-09-27 05:48 psat\@AVclass\getxy.m
文件 188 2013-09-27 05:48 psat\@AVclass\init.m
文件 500 2013-09-27 05:48 psat\@AVclass\mask.m
............此处省略1735个文件信息
评论
共有 条评论