📄 fm_equivfig.m
字号:
% Menu File/Openhm = uimenu('Parent',h1, ... 'Label','File', ... 'Tag','MenuFile');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig setdata', ... 'Label', 'Set Optpow File', ... 'Tag','OpenData', ... 'Accelerator','s');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig setbuslist', ... 'Label', 'Set Bus List', ... 'Tag','OpenLF', ... 'Accelerator','b');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig clearbuslist', ... 'Label', 'Clear Bus List', ... 'Tag','OpenLF', ... 'Accelerator','r');hs = uimenu('Parent',hm, ... 'Callback','close(gcf)', ... 'Label', 'Exit', ... 'Tag','OpenLF', ... 'Separator','on', ... 'Accelerator','q');hm = uimenu('Parent',h1, ... 'Label','Edit', ... 'Tag','MenuFile');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig view mfile', ... 'Label', 'View original data', ... 'Tag','OpenOrigMatlab', ... 'Accelerator','m');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig view buslist', ... 'Label', 'View bus list', ... 'Tag','OpenData', ... 'Accelerator','l');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig view finalmfile', ... 'Label', 'View equivalent data', ... 'Enable', 'off', ... 'Tag','OpenMatlab', ... 'Accelerator','1');hm = uimenu('Parent',h1, ... 'Label','Options', ... 'Tag','MenuFile');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig createlist', ... 'Label', 'Create custom bus list', ... 'Tag','OpenData', ... 'Accelerator','c');hs = uimenu('Parent',hm, ... 'Callback','fm_equivfig gentypepv', ... 'Label', 'Use PV equiv. gen.', ... 'Tag','GenTypePV');if EQUIV.gentype == 1 set(hs,'Checked','on')endhs = uimenu('Parent',hm, ... 'Callback','fm_equivfig gentypepq', ... 'Label', 'Use PQ equiv. gen.', ... 'Tag','GenTypePQ');if EQUIV.gentype == 2 set(hs,'Checked','on')endhs = uimenu('Parent',hm, ... 'Callback','fm_equivfig stopisland', ... 'Label', 'Stop if the internal network is not interconnected', ... 'Tag','ComputeSI', ... 'Checked', 'Off', ... 'Accelerator','n');h2 = uipanel(... 'Parent',h1,... 'Units','normalized',... 'FontSize',10,... 'BackgroundColor', Theme.color01, ... 'Title',{ 'Main Settings' },... 'Tag','uipanel1',... 'Clipping','on',... 'Position',[0.075154 0.15957 0.38497 0.80053]);h8 = uipanel(... 'Parent',h1,... 'Units','normalized',... 'FontSize',10,... 'BackgroundColor', Theme.color01, ... 'Title',{ 'Advanced Settings' },... 'Tag','uipanel2',... 'Clipping','on',... 'Position',[0.53528 0.15957 0.38497 0.80053]);ht = uicontrol( ... 'Parent',h2, ... 'Units','normalized', ... 'BackgroundColor', Theme.color01, ... 'Enable', 'inactive', ... 'HorizontalAlignment','left', ... 'Position',[0.1 0.9 0.8 0.05], ... 'String',['Equivalent method'], ... 'Style','text', ... 'Tag','Text1');h3 = uicontrol(... 'Parent',h2,... 'Units','normalized',... 'Callback','fm_equivfig equivalent',... 'BackgroundColor', Theme.color01, ... 'FontSize',10,... 'Position',[0.1 0.8 0.8 0.085],... 'String',equivalent_methods,... 'Style','popupmenu',... 'Value',EQUIV.equivalent_method,... 'Tag','equivalent_popup');h6 = uicontrol(... 'Parent',h2,... 'BackgroundColor', Theme.color01, ... 'Units','normalized',... 'Callback','fm_equivfig run',... 'FontSize',10,... 'Position',[0.1 0.05 0.35 0.125],... 'String',{ 'Start' }, ... 'Tag','pushbutton2', ... 'CreateFcn', 'set(gcbo,''Position'',[0.1 0.05 0.35 0.125])' );h6 = uicontrol(... 'Parent',h2,... 'BackgroundColor', Theme.color01, ... 'Units','normalized',... 'Callback','close(gcf)',... 'FontSize',10,... 'Position',[0.55 0.05 0.35 0.125], ... 'String',{ 'Close' }, ... 'Tag','pushbutton3', ... 'CreateFcn', 'set(gcbo,''Position'',[0.55 0.05 0.35 0.125])');ht = uicontrol( ... 'Parent',h2, ... 'Units','normalized', ... 'BackgroundColor', Theme.color01, ... 'Enable', 'inactive', ... 'HorizontalAlignment','left', ... 'Position',[0.1 0.7 0.8 0.05], ... 'String',['Bus selection'], ... 'Style','text', ... 'Tag','BusSelText');h7 = uicontrol(... 'Parent',h2,... 'Units','normalized',... 'Callback','fm_equivfig bus',... 'BackgroundColor', Theme.color01, ... 'FontSize',10,... 'Position',[0.1 0.6 0.8 0.085],... 'String',bus_selection_methods, ... 'Style','popupmenu',... 'Value',EQUIV.bus_selection,... 'Tag','popupmenu3');h7 = uicontrol(... 'Parent',h2,... 'Units','normalized',... 'Callback','fm_equivfig checkdepth',... 'BackgroundColor', Theme.color01, ... 'FontSize',10,... 'Position',[0.1 0.3 0.8 0.085],... 'String',bus_selection_methods, ... 'Style','checkbox',... 'CreateFcn', 'set(gcbo,''Position'',[0.1 0.3 0.8 0.085])', ... 'Value',EQUIV.bus_depth,... 'String','Use bus depth', ... 'Tag','checkbox1');% -----------------------------------------------------------------% Set bus list% -----------------------------------------------------------------h11 = uicontrol(... 'Parent',h8,... 'Units','normalized',... 'BackgroundColor', Theme.color01, ... 'Callback','fm_equivfig setbuslist',... 'FontSize',10,... 'Position',[0.1 0.85 0.8 0.085+0.02],... 'String',{ 'Set custom bus list' },... 'Enable','Off', ... 'Tag','buttonbus');h12 = uicontrol(... 'Parent',h2,... 'Units','normalized',... 'Callback','',... 'FontSize',10,... 'ForegroundColor', [0.8 0 0], ... 'BackgroundColor', [1 1 1], ... 'Position',[0.1 0.45 0.8 0.085],... 'String',{ '<No bus list>' },... 'FontName','Curier', ... 'Style','edit',... 'Enable','Off',... 'Tag','edit_bus_list');if ~isempty(EQUIV.custom_path) set(h12,'String',{EQUIV.custom_file})end% -----------------------------------------------------------------% Area% -----------------------------------------------------------------ht = uicontrol( ... 'Parent',h8, ... 'Units','normalized', ... 'CreateFcn','', ... 'BackgroundColor', Theme.color01, ... 'Enable', 'inactive', ... 'HorizontalAlignment','left', ... 'Position',[0.1 0.75 0.8 0.05], ... 'String','Area number', ... 'Enable','Off', ... 'Style','text', ... 'Tag','TextArea');h13 = uicontrol(... 'Parent',h8,... 'Units','normalized',... 'HorizontalAlignment','center', ... 'BackgroundColor',[1 1 1],... 'FontName','Curier', ... 'Callback','fm_equivfig area',... 'FontSize',10,... 'Position',[0.1 0.65 0.8 0.085],... 'Enable','Off', ... 'String',num2str(EQUIV.area_num),... 'Style','edit',... 'Tag','EditArea',... 'Behavior',get(0,'defaultuicontrolBehavior'),... 'CreateFcn', '' );% -----------------------------------------------------------------% Region% -----------------------------------------------------------------ht = uicontrol( ... 'Parent',h8, ... 'Units','normalized', ... 'BackgroundColor', Theme.color01, ... 'Enable', 'inactive', ... 'HorizontalAlignment','left', ... 'Position',[0.1 0.55 0.8 0.05], ... 'String','Region number', ... 'Enable','Off', ... 'Style','text', ... 'Tag','TextRegion');h13 = uicontrol(... 'Parent',h8,... 'Units','normalized',... 'HorizontalAlignment','center', ... 'BackgroundColor',[1 1 1],... 'FontName','Curier', ... 'Callback','fm_equivfig region',... 'FontSize',10,... 'Position',[0.1 0.45 0.8 0.085],... 'Enable','Off', ... 'String',num2str(EQUIV.region_num),... 'Style','edit',... 'Tag','EditRegion');% -----------------------------------------------------------------% Bus voltage% -----------------------------------------------------------------ht = uicontrol( ... 'Parent',h8, ... 'Units','normalized', ... 'CreateFcn','', ... 'BackgroundColor', Theme.color01, ... 'Enable', 'inactive', ... 'HorizontalAlignment','left', ... 'Position',[0.1 0.35 0.8 0.05], ... 'String','Bus voltage [kV]', ... 'Style','text', ... 'Tag','TextVoltage');h13 = uicontrol(... 'Parent',h8,... 'Units','normalized',... 'HorizontalAlignment','center', ... 'BackgroundColor',[1 1 1],... 'FontName','Curier', ... 'Callback','fm_equivfig busvoltage',... 'FontSize',10,... 'Position',[0.1 0.25 0.8 0.085],... 'String',num2str(EQUIV.bus_voltage),... 'Style','edit',... 'Tag','EditVoltage',... 'Behavior',get(0,'defaultuicontrolBehavior'),... 'CreateFcn', '' );% -----------------------------------------------------------------% Bus depth% -----------------------------------------------------------------ht = uicontrol( ... 'Parent',h8, ... 'Units','normalized', ... 'BackgroundColor', Theme.color01, ... 'Enable', 'inactive', ... 'HorizontalAlignment','left', ... 'Position',[0.1 0.15 0.8 0.05], ... 'String',['Bus depth'], ... 'Enable','Off', ... 'Style','text', ... 'Tag','TextDepth');h13 = uicontrol(... 'Parent',h8,... 'Units','normalized',... 'HorizontalAlignment','center', ... 'BackgroundColor',[1 1 1],... 'FontName','Curier', ... 'Callback','fm_equivfig busdepth',... 'Enable','Off', ... 'FontSize',10,... 'Position',[0.1 0.05 0.8 0.085],... 'String',{'0','1','2','3','4','5','6','7','8','9','10'},... 'Value', EQUIV.bus_depth , ... 'Style','popupmenu',... 'Tag','EditDepth');% -----------------------------------------------------------------% Messages% -----------------------------------------------------------------h14 = uipanel(... 'Parent',h1,... 'Units','normalized',... 'FontSize',10,... 'BackgroundColor', Theme.color01, ... 'Title',{ 'Messages' },... 'Tag','uipanel1',... 'Clipping','on',... 'Position', [0.075154 0.031915 0.84509 0.10372]);h15 = uicontrol( ... 'Parent',h14, ... 'Units','normalized', ... 'Enable', 'inactive', ... 'FontName','Curier', ... 'BackgroundColor', Theme.color01, ... 'ForegroundColor',[0 0 0.8], ... 'HorizontalAlignment','left', ... 'Position',[0.02 0.1 0.8 0.8], ... 'String',['EQUIV GUI version 0.1'], ... 'Style','text', ... 'Tag','MsgText');fm_equivfig bus
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -