📄 fm_opffig.m
字号:
'Style','popupmenu', ...
'Tag','PopupMenu3', ...
'Value',OPF.type);
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.608 0.56*rs+dy 0.3 0.05*rs], ...
'String','OPF Type', ...
'Style','text', ...
'Tag','StaticText11');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback', 'OPF.flatstart = get(gcbo,''Value'');', ...
'ForegroundColor',Theme.color05, ...
'FontName', Theme.font01, ...
'Position',[0.608 0.49*rs 0.342 0.06*rs], ...
'String',guess, ...
'Style','popupmenu', ...
'Tag','PopupMenu4', ...
'Value',OPF.flatstart);
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.608 0.56*rs 0.3 0.05*rs], ...
'String','Initial Guess', ...
'Style','text', ...
'Tag','StaticText11');
% Pushbuttons
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color03, ...
'Callback','fm_set opf', ...
'FontWeight','bold', ...
'ForegroundColor',Theme.color09, ...
'Position',[0.608 0.33*rs 0.16 0.0882*rs], ...
'String','Run OPF', ...
'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback','close(gcf)', ...
'Position',[0.794 0.33*rs 0.16 0.0882*rs], ...
'String','Close', ...
'Tag','Pushbutton2');
% Check Buttons
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback', 'OPF.basepl = get(gcbo,''Value'');', ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.33*rs 0.22 0.06], ...
'Style','checkbox', ...
'String', 'Use Base Load', ...
'Tag','CheckboxBaseLoad', ...
'Value',OPF.basepl);
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'Callback', 'OPF.basepg = get(gcbo,''Value'');', ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.395*rs 0.22 0.06], ...
'Style','checkbox', ...
'String', 'Use Base Gen.', ...
'Tag','CheckboxBaseGen', ...
'Value',OPF.basepg);
% Parameter for the Optimization
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback', 'fm_opffig omega', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.79*rs+dy 0.22 0.06*rs], ...
'Style','edit', ...
'String', OPF.omega_s, ...
'Tag','EditText1');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.86*rs+dy 0.22 0.05*rs], ...
'String','Weighting Factor [0,1]', ...
'Style','text', ...
'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback', 'fm_opffig lmin', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.637*rs+dy 0.22 0.06*rs], ...
'Style','edit', ...
'String', OPF.lmin_s, ...
'Tag','EditText2');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.707*rs+dy 0.22 0.05*rs], ...
'String','Min Loading Parameter', ...
'Style','text', ...
'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','OPF.lmax = fval(gcbo,OPF.lmax);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.483*rs+dy 0.22 0.06*rs], ...
'Style','edit', ...
'String', num2str(OPF.lmax), ...
'Tag','EditText3');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.553*rs+dy 0.22 0.05*rs], ...
'String','Max Loading Parameter', ...
'Style','text', ...
'Tag','StaticText3');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','OPF.deltat = fval(gcbo,OPF.deltat);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.33*rs+dy 0.22 0.06*rs], ...
'Style','edit', ...
'String', num2str(OPF.deltat), ...
'Tag','EditDeltat');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.40*rs+dy 0.22 0.05*rs], ...
'String','Time Interval', ...
'Style','text', ...
'Tag','StaticDeltat');
% Parameters for the Interior Point routine
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','OPF.sigma = fval(gcbo,OPF.sigma);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.33*rs 0.18 0.06*rs], ...
'Style','edit', ...
'String', num2str(OPF.sigma), ...
'Tag','EditSigma');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.40*rs 0.2 0.05*rs], ...
'String','Centering Parameter', ...
'Style','text', ...
'Tag','StaticSigma');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','OPF.gamma = fval(gcbo,OPF.gamma);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.33*rs+dy 0.18 0.06*rs], ...
'Style','edit', ...
'String', num2str(OPF.gamma), ...
'Tag','EditGamma');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.40*rs+dy 0.2 0.05*rs], ...
'String','Safety Factor', ...
'Style','text', ...
'Tag','StaticGamma');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','OPF.eps_mu = fval(gcbo,OPF.eps_mu);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.483*rs+dy 0.18 0.06*rs], ...
'Style','edit', ...
'String', num2str(OPF.eps_mu), ...
'Tag','EditEpsmu');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.553*rs+dy 0.2 0.05*rs], ...
'String',['mu Tolerance'], ...
'Style','text', ...
'Tag','StatiEpsmu');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','OPF.eps1 = fval(gcbo,OPF.eps1);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.637*rs+dy 0.18 0.06*rs], ...
'Style','edit', ...
'String', num2str(OPF.eps1), ...
'Tag','EditEps1');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.707*rs+dy 0.2 0.05*rs], ...
'String','PF eqs. Tolerance', ...
'Style','text', ...
'Tag','StaticEps1');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color04, ...
'Callback','OPF.eps2 = fval(gcbo,OPF.eps2);', ...
'FontName',Theme.font01, ...
'ForegroundColor',Theme.color05, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.79*rs+dy 0.18 0.06*rs], ...
'Style','edit', ...
'String', num2str(OPF.eps2), ...
'Tag','EditEps2');
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'HorizontalAlignment','left', ...
'Position',[0.35 0.86*rs+dy 0.2 0.05*rs], ...
'String','OF Tolerance', ...
'Style','text', ...
'Tag','StaticEps2');
% Banner
h1 = axes('Parent',h0, ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'Color',Theme.color04, ...
'ColorOrder',Settings.color, ...
'Layer','top', ...
'Position',[0.025 0.025*rs 0.1289 0.225*rs], ...
'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.color04, ...
'ColorOrder',Settings.color, ...
'Layer','top', ...
'Position',[0.84 0.025*rs 0.1289 0.225*rs], ...
'Tag','Axes1', ...
'XColor',Theme.color02, ...
'XLim',[0.5 110.5], ...
'XLimMode','manual', ...
'XTick',[], ...
'YColor',Theme.color02, ...
'YDir','reverse', ...
'YLim',[0.5 110.5], ...
'YLimMode','manual', ...
'YTick',[], ...
'ZColor',[0 0 0]);
h2 = image('Parent',h1, ...
'CData',fm_mat('logo_opf'), ...
'Tag','Axes1Image1', ...
'XData',[1 111], ...
'YData',[1 111]);
h1 = uicontrol('Parent',h0, ...
'Units', 'normalized', ...
'BackgroundColor',Theme.color02, ...
'ForegroundColor', [1 0 0], ...
'FontSize', 12, ...
'FontName', 'Times', ...
'FontWeight', 'bold', ...
'FontAngle', 'italic',...
'Position',[0.35 0.1*rs 0.3 0.07*rs], ...
'String','Optimal Power Flow', ...
'Style','text', ...
'Tag','StaticText3');
if nargout > 0, fig = h0; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -