📄 fm_gamsfig.m
字号:
set(h2,'Checked','on'),else, set(h2,'Checked','off'),endh2 = uimenu('Parent',h1, ... 'Callback','fm_gamsfig basepg', ... 'Label','Use base generator powers', ... 'Tag','OBC', ... 'Accelerator','p');if GAMS.basepg, set(h2,'Checked','on'),else, set(h2,'Checked','off'),endh2 = uimenu('Parent',h1, ... 'Callback','fm_gamsfig option', ... 'Label','Edit GAMS Call Options', ... 'Tag','OTV', ... 'Accelerator','e');h2 = uimenu('Parent',h1, ... 'Callback','fm_tviewer', ... 'Label','Select Text Viewer', ... 'Tag','OTV', ... 'Accelerator','t', ... 'Separator', 'on');% Menu Linksh1 = uimenu('Parent',h0, ... 'Label','Links', ... 'Tag','MenuLink');h2 = uimenu('Parent',h1, ... 'Callback','web(''http://www.gams.com'');', ... 'Label','GAMS website', ... 'Tag','GAMSLink');h2 = uimenu('Parent',h1, ... 'Callback','web(''http://www.cs.wisc.edu/math-prog/matlab.html'')', ... 'Label','Matlab-GAMS interface website', ... 'Tag','MGLink');% Frameh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'ForegroundColor',Theme.color03, ... 'Position',[0.025 0.275*rs 0.95 0.675*df], ... 'Style','frame', ... 'Tag','Frame1');% List Boxh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.35 0.86*rs+dy 0.4*0.6552 0.05*rs], ... 'String','Line Selection', ... 'Style','text', ... 'Tag','StaticText12');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback', 'GAMS.line = get(gcbo,''Value'')-1; GAMS.line = GAMS.line(end); set(gcbo,''Value'',GAMS.line+1)', ... 'FontName', Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'Max', 100, ... 'Position',[0.35 0.49*rs 0.4*0.6552 0.4440], ... 'String',lines, ... 'Style','listbox', ... 'Tag','ListboxLines', ... 'Value',GAMS.line+1);if GAMS.method ~= 4 & GAMS.method ~= 6 & GAMS.method ~= 7 set(h1,'Enable','off')end% Popup Menush1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback', 'fm_gamsfig method', ... 'FontName', Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'Position',[0.6552 0.79*rs+dy 0.45*0.6552 0.06*rs], ... 'String',metodi, ... 'Style','popupmenu', ... 'Tag','PopupMenuMethod', ... 'Value',GAMS.method);if GAMS.type == 2 | GAMS.type == 4 set(h1,'String',metodi([1,2]))endif GAMS.method == 4 & GAMS.type == 3 set(h1,'Enable','off')endh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback', 'GAMS.flow = get(gcbo,''Value'')-1;', ... 'ForegroundColor',Theme.color05, ... 'FontName', Theme.font01, ... 'Position',[0.6552 0.64*rs+dy 0.45*0.6552 0.06*rs], ... 'String',flussi, ... 'Style','popupmenu', ... 'Tag','PopupMenuFlow', ... 'Value',GAMS.flow+1);if GAMS.method == 6 set(h1,'Enable','off','Value',2) GAMS.flow = 2;endh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.6552 0.71*rs+dy 0.45*0.6552 0.05*rs], ... 'String','Flow Limits', ... 'Style','text', ... 'Tag','StaticText11');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.6552 0.86*rs+dy 0.45*0.6552 0.05*rs], ... 'String','Optimization Model', ... 'Style','text', ... 'Tag','StaticText12');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback', 'fm_gamsfig type', ... 'ForegroundColor',Theme.color05, ... 'FontName', Theme.font01, ... 'Position',[0.6552 0.49*rs+dy 0.45*0.6552 0.06*rs], ... 'String',tipi, ... 'Style','popupmenu', ... 'Tag','PopupMenuType', ... 'UserData',GAMS.method, ... 'Value',GAMS.type);h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.6552 0.56*rs+dy 0.45*0.6552 0.05*rs], ... 'String','Solution Type', ... 'Style','text', ... 'Tag','StaticText11');h1 = uicontrol('Parent', h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback', 'GAMS.flatstart = get(gcbo,''Value'')-1;', ... 'ForegroundColor',Theme.color05, ... 'FontName', Theme.font01, ... 'Position',[0.6552 0.49*rs 0.45*0.6552 0.06*rs], ... 'String',guess, ... 'Style','popupmenu', ... 'Tag','PopupMenu2', ... 'Value',GAMS.flatstart+1);h1 = uicontrol('Parent', h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.6552 0.56*rs 0.45*0.6552 0.05*rs], ... 'String','Initial Guess', ... 'Style','text', ... 'Tag','StaticText11');h1 = uicontrol('Parent', h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'Callback', '', ... 'FontName', Theme.font01, ... 'Position',[0.05 0.49*rs 0.4*0.6552 0.06*rs], ... 'String',output, ... 'Style','popupmenu', ... 'Tag','PopupGamsFile', ... 'Value',1);h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.05 0.56*rs 0.4*0.6552 0.05*rs], ... 'String','GAMS Input/Output File', ... 'Style','text', ... 'Tag','StaticText11');% Pushbuttonsh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color03, ... 'Callback','fm_gams', ... 'FontWeight','bold', ... 'ForegroundColor',Theme.color09, ... 'Position',[0.05 0.33*rs 0.2833 0.0882*rs], ... 'String','Run GAMS', ... 'Tag','Pushbutton1');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'Callback','close(gcf)', ... 'Position',[0.6633 0.33*rs 0.2833 0.0882*rs], ... 'String','Close', ... 'Tag','Pushbutton2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'Callback','fm_gamsfig view', ... 'Position',[0.3583 0.33*rs 0.2833 0.0882*rs], ... 'String','View GAMS Output', ... 'Tag','Pushbutton2');% Parameter for the Optimizationh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback', 'fm_gamsfig omega', ... 'FontName',Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.05 0.79*rs+dy 0.4*0.6552 0.06*rs], ... 'Style','edit', ... 'String', GAMS.omega_s, ... 'Tag','EditText1');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.05 0.86*rs+dy 0.4*0.6552 0.05*rs], ... 'String','Weighting Factor [0,1]', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback', 'fm_gamsfig lmin', ... 'FontName',Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.05 0.64*rs+dy 0.4*0.6552 0.06*rs], ... 'Style','edit', ... 'String', GAMS.lmin_s, ... 'Tag','EditText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.05 0.71*rs+dy 0.4*0.6552 0.05*rs], ... 'String','Min Loading Parameter', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback','GAMS.lmax = fval(gcbo,GAMS.lmax);', ... 'FontName',Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.05 0.49*rs+dy 0.4*0.6552 0.06*rs], ... 'Style','edit', ... 'String', num2str(GAMS.lmax), ... 'Tag','EditText3');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','left', ... 'Position',[0.05 0.56*rs+dy 0.4*0.6552 0.05*rs], ... 'String','Max Loading Parameter', ... 'Style','text', ... 'Tag','StaticText3');% Bannerh1 = axes('Parent',h0, ... 'Box','on', ... 'CameraUpVector',[0 1 0], ... 'Color',Theme.color04, ... 'ColorOrder',Settings.color, ... 'Layer','top', ... 'Position',[0.025 0.025*rs 0.2*0.6552 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.color02, ... 'ColorOrder',Settings.color, ... 'Layer','top', ... 'Position',[0.844 0.025*rs 0.2*0.6552 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_gams'), ... 'Tag','Axes1Image1', ... 'XData',[8 92], ... 'YData',[8 92]);h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'ForegroundColor', [1 0 0], ... 'FontSize', 12, ... 'FontName', 'Times', ... 'FontWeight', 'bold', ... 'FontAngle', 'italic',... 'Position',[0.25 0.1*rs 0.5 0.07*rs], ... 'String','PSAT-GAMS Interface', ... 'Style','text', ... 'Tag','StaticText3');if nargout > 0, fig = h0; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -