psat-2.1.10-oct.zip


psat-2.1.10-oct.zip
资源截图
代码片段和文件信息
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-2016 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-06-07 18:32  psat
     目录           0  2016-06-07 18:35  psat@ARclass
     文件        1007  2016-06-07 18:35  psat@ARclassARclass.m
     文件         268  2016-06-07 18:35  psat@ARclassase_areas.m
     文件        1275  2016-06-07 18:35  psat@ARclasslock_areas.m
     文件          43  2016-06-07 18:35  psat@ARclassdisplay_areas.m
     文件         168  2016-06-07 18:35  psat@ARclassgetidx_areas.m
     文件         570  2016-06-07 18:35  psat@ARclassgrowth_areas.m
     文件        1074  2016-06-07 18:35  psat@ARclassidnum_areas.m
     文件         115  2016-06-07 18:35  psat@ARclassinit_areas.m
     文件         161  2016-06-07 18:35  psat@ARclassmask_areas.m
     文件         122  2016-06-07 18:35  psat@ARclass
estore_areas.m
     文件        1822  2016-06-07 18:35  psat@ARclasssetup_areas.m
     文件         802  2016-06-07 18:35  psat@ARclasssubsasgn_areas.m
     文件        1117  2016-06-07 18:35  psat@ARclasssubsref_areas.m
     目录           0  2016-06-07 18:35  psat@AVclass
     文件         633  2016-06-07 18:35  psat@AVclassAVclass.m
     文件        3851  2016-06-07 18:35  psat@AVclassFxcall_exc.m
     文件         113  2016-06-07 18:35  psat@AVclassGycall_exc.m
     文件         102  2016-06-07 18:35  psat@AVclassadd_exc.m
     文件         313  2016-06-07 18:35  psat@AVclassdmatrix_exc.m
     文件        1045  2016-06-07 18:35  psat@AVclasslock_exc.m
     文件         202  2016-06-07 18:35  psat@AVclassceiling_exc.m
     文件          41  2016-06-07 18:35  psat@AVclassdisplay_exc.m
     文件         698  2016-06-07 18:35  psat@AVclassdynidx_exc.m
     文件        1191  2016-06-07 18:35  psat@AVclassequiv_exc.m
     文件        2359  2016-06-07 18:35  psat@AVclassfcall_exc.m
     文件         179  2016-06-07 18:35  psat@AVclassgcall_exc.m
     文件         242  2016-06-07 18:35  psat@AVclassgetxy_exc.m
     文件         192  2016-06-07 18:35  psat@AVclassinit_exc.m
     文件         504  2016-06-07 18:35  psat@AVclassmask_exc.m
............此处省略1732个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)