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

📄 fm_uwfig.m

📁 这是一个很适合研究和学习用的电力系统仿真软件
💻 M
📖 第 1 页 / 共 3 页
字号:
               'BackgroundColor',Theme.color02, ...
               'Callback', 'fm_uwfig o', ...
               'HorizontalAlignment','left', ...
               'Position',[x1 0.7266 dx 0.0339], ...
               'String','[-o] Limit control tol.', ...
               'Style','checkbox', ...
               'Tag','Check_o', ...
               'Value', UWPFLOW.opt.o.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback', 'UWPFLOW.opt.L.num = fval(gcbo,UWPFLOW.opt.L.num);', ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'Enable', onoff(UWPFLOW.opt.L.status), ...
               'HorizontalAlignment','left', ...
               'Position',[x1 0.5831 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.L.num), ...
               'Tag','Edit_L');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color02, ...
               'Callback', 'fm_uwfig L', ...
               'HorizontalAlignment','left', ...
               'Position',[x1 0.6299 dx 0.0339], ...
               'String','[-L] Initial loading factor', ...
               'Style','checkbox', ...
               'Tag','Check_L', ...
               'Value', UWPFLOW.opt.L.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback', 'UWPFLOW.opt.O.num = fval(gcbo,UWPFLOW.opt.O.num)', ...
               'Enable', onoff(UWPFLOW.opt.O.status), ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'HorizontalAlignment','left',  ...
               'Position',[x1 0.4865 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.O.num), ...
               'Tag','Edit_O');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'Callback', 'fm_uwfig O', ...
               'BackgroundColor',Theme.color02, ...
               'HorizontalAlignment','left', ...
               'Position',[x1 0.5333 dx 0.0339], ...
               'String','[-O] ac/dc TEF digits [6-10]', ...
               'Style','checkbox', ...
               'Tag','Check_O', ...
               'Value', UWPFLOW.opt.O.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback','UWPFLOW.opt.S.num = fval(gcbo,UWPFLOW.opt.S.num);', ...
               'Enable', onoff(UWPFLOW.opt.S.status), ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'HorizontalAlignment','left', ...
               'Position',[x1 0.3898 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.S.num), ...
               'Tag','Edit_S');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color02, ...
               'Callback', 'fm_uwfig S', ...
               'HorizontalAlignment','left', ...
               'Position',[x1 0.4366 dx 0.0339], ...
               'String','[-S] Max. loading factor [0,1]', ...
               'Style','checkbox', ...
               'Tag','Check_S', ...
               'Value', UWPFLOW.opt.S.status);

% Parameters (middle column)
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback', 'UWPFLOW.opt.k.num = fval(gcbo,UWPFLOW.opt.k.num);', ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'Enable', onoff(UWPFLOW.opt.k.status), ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.8731 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.k.num), ...
               'Tag','Edit_k');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color02, ...
               'Callback', 'fm_uwfig k', ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.9199 dx 0.0339], ...
               'String','[-k] Loading factor increment', ...
               'Style','checkbox', ...
               'Tag','Check_k', ...
               'Value', UWPFLOW.opt.k.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback', 'UWPFLOW.opt.u.num = fval(gcbo,UWPFLOW.opt.u.num)', ...
               'Enable', onoff(UWPFLOW.opt.u.status), ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'HorizontalAlignment','left',  ...
               'Position',[x2 0.7764 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.u.num), ...
               'Tag','Edit_u');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'Callback', 'fm_uwfig u', ...
               'BackgroundColor',Theme.color02, ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.8232 dx 0.0339], ...
               'String','[-u] Reduce eq. tol. [0,0.2]', ...
               'Style','checkbox', ...
               'Tag','Check_u', ...
               'Value', UWPFLOW.opt.u.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback','UWPFLOW.opt.U.num = fval(gcbo,UWPFLOW.opt.U.num);', ...
               'Enable', onoff(UWPFLOW.opt.U.status), ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.6798 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.U.num), ...
               'Tag','Edit_U');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color02, ...
               'Callback', 'fm_uwfig U', ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.7266 dx 0.0339], ...
               'String','[-U] Step # for sys. red. [2,100]', ...
               'Style','checkbox', ...
               'Tag','Check_U', ...
               'Value', UWPFLOW.opt.U.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback', 'UWPFLOW.opt.v.num = fval(gcbo,UWPFLOW.opt.v.num);', ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'Enable', onoff(UWPFLOW.opt.v.status), ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.5831 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.v.num), ...
               'Tag','Edit_v');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color02, ...
               'Callback', 'fm_uwfig v', ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.6299 dx 0.0339], ...
               'String','[-v] PQ bus voltage magnitude', ...
               'Style','checkbox', ...
               'Tag','Check_v', ...
               'Value', UWPFLOW.opt.v.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback', 'UWPFLOW.opt.z.num = fval(gcbo,UWPFLOW.opt.z.num)', ...
               'Enable', onoff(UWPFLOW.opt.z.status), ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'HorizontalAlignment','left',  ...
               'Position',[x2 0.4865 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.z.num), ...
               'Tag','Edit_z');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'Callback', 'fm_uwfig z', ...
               'BackgroundColor',Theme.color02, ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.5333 dx 0.0339], ...
               'String','[-z] Max. # of CM steps', ...
               'Style','checkbox', ...
               'Tag','Check_z', ...
               'Value', UWPFLOW.opt.z.status);

h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color04, ...
               'Callback','UWPFLOW.opt.two.num = fval(gcbo,UWPFLOW.opt.two.num);', ...
               'Enable', onoff(UWPFLOW.opt.two.status), ...
               'FontName',Theme.font01, ...
               'ForegroundColor',Theme.color05, ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.3898 dx 0.0308], ...
               'Style','edit', ...
               'String', num2str(UWPFLOW.opt.two.num), ...
               'Tag','Edit_two');
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color02, ...
               'Callback', 'fm_uwfig two', ...
               'HorizontalAlignment','left', ...
               'Position',[x2 0.4366 dx 0.0339], ...
               'String','[-2] Step # for dir. change', ...
               'Style','checkbox', ...
               'Tag','Check_two', ...
               'Value', UWPFLOW.opt.two.status);

% Banner
h1 = axes('Parent',h0, ...
          'Box','on', ...
          'CameraUpVector',[0 1 0], ...
          'Color',Theme.color04, ...
          'ColorOrder',Settings.color, ...
          'Layer','top', ...
          'Position',[0.0329 0.0169 0.8*0.1540 0.8*0.1371], ...
          'Tag','Axes1', ...
          'XColor',Theme.color02, ...
          'XLim',[0.5 100.5], ...
          'XLimMode','manual', ...
          'XTick',[], ...
          'YColor',Theme.color02, ...
          'YDir','reverse', ...
          'YLim',[0.5 100.5], ...
          'YLimMode','manual', ...
          'YTick',[], ...
          'ZColor',[0 0 0]);
h2 = image('Parent',h1, ...
           'CData',fm_mat('logo_psat'), ...
           'Tag','Axes1Image1', ...
           'XData',[1 101], ...
           'YData',[1 101]);
h1 = axes('Parent',h0, ...
          'Box','on', ...
          'CameraUpVector',[0 1 0], ...
          'Color',Theme.color02, ...
          'ColorOrder',Settings.color, ...
          'Layer','top', ...
          'Position',[0.8491 0.0169 0.8*0.1540 0.8*0.1371], ...
          'Tag','Axes1', ...
          'XColor',Theme.color02, ...
          'XLim',[0.5 100.5], ...
          'XLimMode','manual', ...
          'XTick',[], ...
          'YColor',Theme.color02, ...
          'YDir','reverse', ...
          'YLim',[0.5 100.5], ...
          'YLimMode','manual', ...
          'YTick',[], ...
          'ZColor',[0 0 0]);
h2 = image('Parent',h1, ...
           'CData',fm_mat('logo_uwpflow'), ...
           'Tag','Axes1Image1', ...
           'XData',[1 101], ...
           'YData',[1 101]);
h1 = uicontrol('Parent',h0, ...
               'Units', 'normalized', ...
               'BackgroundColor',Theme.color02, ...
               'ForegroundColor', [0 0 1], ...
               'FontSize', 12, ...
               'FontName', 'Times', ...
               'FontWeight', 'bold', ...
               'FontAngle', 'italic',...
               'Position',[0.2915 0.0516 0.4221 0.0355], ...
               'String','PSAT-UWPFLOW Interface', ...
               'Style','text', ...
               'Tag','StaticText3');

if nargout > 0, fig = h0; end

% ---------------------------------------------------------
function output = onoff(input)

if input, output = 'on'; else, output = 'off'; end

% ---------------------------------------------------------
function checkon(field)

global UWPFLOW Fig

if isfield(UWPFLOW.opt,field)
  a = getfield(UWPFLOW.opt,field);
  a.status = ~a.status;
  UWPFLOW.opt = setfield(UWPFLOW.opt,field,a);

  try % strcmp(get(gcbo,'Style'),'checkbox')
    set(gcbo,'Value',a.status)
    hdl = findobj(Fig.uwpflow,'Tag',['Edit_',field]);
    set(hdl,'Enable',onoff(a.status))
  catch
    set(gcbo,'Checked',onoff(a.status))
  end

end

⌨️ 快捷键说明

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