📄 fm_main.m
字号:
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.098522 0.5965 0.4766 0.042056], ...
'String','', ...
'Style','edit', ...
'Tag','EditCommand');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'Callback','fm_set listcommand', ...
'BackgroundColor',Theme.color01, ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'Position',[0.098522 0.3940 0.4766 0.17134], ...
'String',{'<empty>'}, ...
'Style','listbox', ...
'Tag','ListCommand', ...
'Value',1);
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.3940 0.14778 0.037383], ...
'String','Max Dyn Iterations', ...
'Style','text', ...
'Tag','StaticText8');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.dyntol = fval(gcbo,Settings.dyntol);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.69089 0.4563 0.096059 0.038941], ...
'String',num2str(Settings.dyntol), ...
'Style','edit', ...
'Tag','EditText7');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.4563 0.14778 0.037383], ...
'String','Dyn. Tolerance', ...
'Style','text', ...
'Tag','StaticText7');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.5186 0.14778 0.037383], ...
'String','Max PF Iterations', ...
'Style','text', ...
'Tag','StaticText6');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.lfmit = fval(gcbo,Settings.lfmit);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.69089 0.5186 0.096059 0.038941], ...
'String',num2str(Settings.lfmit), ...
'Style','edit', ...
'Tag','EditText6');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.5809 0.14778 0.037383], ...
'String','PF Tolerance', ...
'Style','text', ...
'Tag','StaticText5');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.lftol = fval(gcbo,Settings.lftol);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.69089 0.5809 0.096059 0.038941], ...
'String',num2str(Settings.lftol), ...
'Style','edit', ...
'Tag','EditText5');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.6432 0.14778 0.037383], ...
'String','Ending Time (s)', ...
'Style','text', ...
'Tag','StaticText4');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.tf = fval(gcbo,Settings.tf);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.69089 0.6432 0.096059 0.038941], ...
'String',num2str(Settings.tf), ...
'Style','edit', ...
'Tag','EditText4');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.7055 0.14778 0.037383], ...
'String','Starting Time (s)', ...
'Style','text', ...
'Tag','StaticText3');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.t0 = fval(gcbo,Settings.t0);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HitTest','off', ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',[0.69089 0.7055 0.096059 0.038941], ...
'String',num2str(Settings.t0), ...
'Style','edit', ...
'Tag','EditText3');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.7678 0.14778 0.037383], ...
'String','Power Base (MVA)', ...
'Style','text', ...
'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.mva = fval(gcbo,Settings.mva);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.69089 0.7678 0.096059 0.038941], ...
'String',num2str(Settings.mva), ...
'Style','edit', ...
'Tag','EditText2');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.79926 0.8301 0.14778 0.037383], ...
'String','Freq. Base (Hz)', ...
'Style','text', ...
'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','Settings.freq = fval(gcbo,Settings.freq); Settings.rad = 2*3.14159265358979*Settings.freq;', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.69089 0.8301 0.094828 0.038941], ...
'String',num2str(Settings.freq), ...
'Style','edit', ...
'Tag','EditText1');
% Menubar
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_open'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set setdata', ...
'Position',[0.0379 0.9375 0.0379 0.05], ...
'TooltipString','Open Data File', ...
'Tag','Pushbutton7');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_opensys'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set opensys', ...
'Position',[0.0379*2 0.9375 0.0379 0.05], ...
'TooltipString','Open System', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_pert'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set setpert', ...
'Position',[0.0379*3 0.9375 0.0379 0.05], ...
'TooltipString','Open Perturbation File', ...
'Tag','Pushbutton8');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_settings'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_setting', ...
'Position',[0.0379*4+0.0190 0.9375 0.0379 0.05], ...
'TooltipString','Settings', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_save'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set savesys', ...
'Position',[0.0379*5+0.0190 0.9375 0.0379 0.05], ...
'TooltipString','Save System', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_exit'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set close', ...
'Position',[0.0379*6+0.0190 0.9375 0.0379 0.05], ...
'TooltipString','Close window or stop process', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_sym'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback',fmlib, ...
'Position',[0.0379*7+0.0379 0.9375 0.0379 0.05], ...
'TooltipString','Open PSAT Simulink Library', ...
'Tag','Pushbutton8');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_lf'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set lf', ...
'Position',[0.0379*8+0.0569 0.9375 0.0379 0.05], ...
'TooltipString','Solve Power Flow', ...
'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_cpf'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_cpf(''main'');', ...
'Position',[0.0379*9+0.0569 0.9375 0.0379 0.05], ...
'TooltipString','Continuation Power Flow', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_opf'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_set opf', ...
'Position',[0.0379*10+0.0569 0.9375 0.0379 0.05], ...
'TooltipString','Optimal Power Flow', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_eigen'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_eigfig', ...
'Position',[0.0379*11+0.0759 0.9375 0.0379 0.05], ...
'TooltipString','Eigenvalue Analysis', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_time'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_int', ...
'Position',[0.0379*12+0.0759 0.9375 0.0379 0.05], ...
'TooltipString','Time Domain Simulation', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_conv'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_dir(0)', ...
'Position',[0.0379*13+0.0949 0.9375 0.0379 0.05], ...
'TooltipString','Data Format Conversion', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_make'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_comp copen', ...
'Position',[0.0379*14+0.0949 0.9375 0.0379 0.05], ...
'TooltipString','Component Browser', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_snapshot'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_snap', ...
'Position',[0.0379*15+0.0949 0.9375 0.0379 0.05], ...
'TooltipString','Snapshots', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_static'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_stat', ...
'Position',[0.0379*16+0.1139 0.9375 0.0379 0.05], ...
'TooltipString','Static Report', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_matrix'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_matrx', ...
'Position',[0.0379*17+0.1139 0.9375 0.0379 0.05], ...
'TooltipString','Sparse Matrix Visualization', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_plot'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_plotfig', ...
'Position',[0.0379*18+0.1139 0.9375 0.0379 0.05], ...
'TooltipString','Plotting Utilities', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_history'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_hist', ...
'Position',[0.0379*19+0.1329 0.9375 0.0379 0.05], ...
'TooltipString','History', ...
'Tag','Pushbutton4');
h1 = uicontrol('Parent',h0, ...
'CData',fm_mat('main_info'), ...
'Units','normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','fm_about', ...
'Position',[0.0379*20+0.1625 0.9375 0.0379 0.05], ...
'TooltipString','About PSAT', ...
'Tag','Pushbutton8');
% Message bar
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'ForegroundColor',Theme.color03, ...
'CreateFcn','Hdl.frame = gcbo;', ...
'Enable', 'inactive', ...
'Position',[0.04064 0.035826 0.92118 0.043614], ...
'Style','frame', ...
'Tag','Frame2');
if ispc, set(h1,'Style','edit'), end
h1 = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',Theme.color04, ...
'CreateFcn','Hdl.text = gcbo;', ...
'Enable', 'inactive', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.0542 0.0400 0.8916 0.0312], ...
'String',['PSAT version ',Settings.version, ...
', Copyright (C) 2002-2006 Federico Milano'], ...
'TooltipString','Double click for viewing the command history.', ...
'Style','text', ...
'Tag','StaticText13');
if nargout > 0, fig = h0; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -