Skip to content

Commit

Permalink
v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
intLyc committed Oct 12, 2024
1 parent 6693b4e commit 7c50b7c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 41 deletions.
80 changes: 40 additions & 40 deletions MTO/GUI/MTO_GUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

% Properties that correspond to app components
properties (Access = public)
MTOPlatformMToPv14UIFigure matlab.ui.Figure
MTOPlatformMToPv16UIFigure matlab.ui.Figure
MTOPlatformGridLayout matlab.ui.container.GridLayout
MTOPlatformTabGroup matlab.ui.container.TabGroup
TestModuleTab matlab.ui.container.Tab
Expand Down Expand Up @@ -977,7 +977,7 @@ function EresetFormat(app)
end
if data_num < 1
msg = 'Select at least 1 data node to split';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
Expand All @@ -1002,7 +1002,7 @@ function EresetFormat(app)
end
if data_num < 2
msg = 'Select at least 2 data node to merge';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
Expand All @@ -1019,7 +1019,7 @@ function EresetFormat(app)
for i = 2:data_num
if data_selected(i).NodeData.Reps ~= reps
msg = 'The data''s reps not equal';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
Expand All @@ -1038,30 +1038,30 @@ function EresetFormat(app)
% check algo length
if length(algorithms) ~= length(data_selected(i).NodeData.Algorithms)
msg = 'The data''s algorithms not equal';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
for algo = 1:length(algorithms)
% check algo name
if ~strcmp(data_selected(i).NodeData.Algorithms(algo).Name, algorithms(algo).Name)
msg = 'The data''s algorithms not equal';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
% check algo para length
if length(algorithms(algo).Para) ~= length(data_selected(i).NodeData.Algorithms(algo).Para)
msg = 'The data''s algorithms not equal';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
for pa = 1:length(algorithms(algo).Para)
% check algo para name
if ~strcmp(data_selected(i).NodeData.Algorithms(algo).Para{pa}, algorithms(algo).Para{pa})
msg = 'The data''s algorithms not equal';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
Expand All @@ -1082,7 +1082,7 @@ function EresetFormat(app)
% check prob length
if length(problems) ~= length(data_selected(i).NodeData.Problems)
msg = 'The data''s problems not equal';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
Expand All @@ -1095,7 +1095,7 @@ function EresetFormat(app)
data_selected(i).NodeData.Problems(prob).N ~= problems(prob).N || ...
data_selected(i).NodeData.Problems(prob).maxFE ~= problems(prob).maxFE
msg = 'The data''s problems not equal';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
result = false;
return;
end
Expand Down Expand Up @@ -1145,7 +1145,7 @@ function DsaveData(app, MTOData)

% check selected file name
[file_name, dir_name] = uiputfile('MTOData.mat');
figure(app.MTOPlatformMToPv14UIFigure);
figure(app.MTOPlatformMToPv16UIFigure);
if file_name == 0
return;
end
Expand Down Expand Up @@ -1592,13 +1592,13 @@ function EStartButtonPushed(app, event)
prob_num = length(app.EProblemsTree.Children);
if algo_num == 0
msg = 'Please select the Algorithm first';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
app.EstartEnable(true);
return;
end
if prob_num == 0
msg = 'Please select the Problem first';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
app.EstartEnable(true);
return;
end
Expand Down Expand Up @@ -1754,7 +1754,7 @@ function EStartButtonPushed(app, event)

tEnd = toc(tStart);
msg = ['All Use Time: ', char(duration([0, 0, tEnd]))];
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'success', 'Icon', 'success');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'success', 'Icon', 'success');

app.EstartEnable(true);
app.EreloadTableData();
Expand Down Expand Up @@ -1797,7 +1797,7 @@ function EAlgorithmsDelButtonPushed(app, event)
algo_selected = app.EAlgorithmsTree.SelectedNodes;
if isempty(algo_selected)
msg = 'Select Algorithm node in tree first';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
end

for i = 1:length(algo_selected)
Expand Down Expand Up @@ -1851,7 +1851,7 @@ function EProblemsDelButtonPushed(app, event)
prob_selected = app.EProblemsTree.SelectedNodes;
if isempty(prob_selected)
msg = 'Select Problem node in tree first';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
end

for i = 1:length(prob_selected)
Expand Down Expand Up @@ -1896,13 +1896,13 @@ function ESaveDataButtonPushed(app, event)
% check data
if isempty(app.EData)
msg = 'Please run experiment first';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
return;
end

% check selected file name
[file_name, dir_name] = uiputfile('MTOData.mat');
figure(app.MTOPlatformMToPv14UIFigure);
figure(app.MTOPlatformMToPv16UIFigure);
if file_name == 0
return;
end
Expand Down Expand Up @@ -1951,7 +1951,7 @@ function ELoadDataButtonPushed(app, event)

% select mat file
[file_name, pathname] = uigetfile('*.mat', 'Select Data', './');
figure(app.MTOPlatformMToPv14UIFigure);
figure(app.MTOPlatformMToPv16UIFigure);

% check selected ile_name
if file_name == 0
Expand Down Expand Up @@ -1981,7 +1981,7 @@ function ESaveTableButtonPushed(app, event)
% check selected file name
filter = {'*.tex'; '*.xlsx';'*.csv';};
[file_name, dir_name] = uiputfile(filter);
% figure(app.MTOPlatformMToPv14UIFigure);
% figure(app.MTOPlatformMToPv16UIFigure);
if file_name == 0
return;
end
Expand Down Expand Up @@ -2044,7 +2044,7 @@ function DLoadDataButtonPushed(app, event)
% select mat file
file_name_list = {};
[file_name, pathname] = uigetfile('*.mat', 'select the data mat', './', 'MultiSelect', 'on');
figure(app.MTOPlatformMToPv14UIFigure);
figure(app.MTOPlatformMToPv16UIFigure);
file_name_list = [file_name_list, file_name];

% check selected file_name
Expand Down Expand Up @@ -2077,7 +2077,7 @@ function DDeleteDataButtonPushed(app, event)
end
if data_num == 0
msg = 'Select data node in tree first';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
end

data_selected = data_selected(data_mark == 1);
Expand All @@ -2104,7 +2104,7 @@ function DSaveDataButtonPushed(app, event)
end
if data_num == 0
msg = 'Select data node in tree first';
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
end

data_selected = data_selected(data_mark == 1);
Expand All @@ -2128,7 +2128,7 @@ function DRepsSplitButtonPushed(app, event)
for i = 1:length(data_selected)
if data_selected(i).NodeData.Reps <= 1
msg = ['The ', data_selected(i).Text, '''s reps <= 1'];
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
continue;
end
for rep = 1:data_selected(i).NodeData.Reps
Expand Down Expand Up @@ -2177,7 +2177,7 @@ function DAlgorithmsSplitButtonPushed(app, event)
for i = 1:length(data_selected)
if length(data_selected(i).NodeData.Algorithms) <= 1
msg = ['The ', data_selected(i).Text, '''s algorithms <= 1'];
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
continue;
end
for algo = 1:length(data_selected(i).NodeData.Algorithms)
Expand Down Expand Up @@ -2227,7 +2227,7 @@ function DProblemsSplitButtonPushed(app, event)
for i = 1:length(data_selected)
if length(data_selected(i).NodeData.Problems) <= 1
msg = ['The ', data_selected(i).Text, '''s problems <= 1'];
uiconfirm(app.MTOPlatformMToPv14UIFigure, msg, 'error', 'Icon','warning');
uiconfirm(app.MTOPlatformMToPv16UIFigure, msg, 'error', 'Icon','warning');
continue;
end
task = [data_selected(i).NodeData.Problems.T];
Expand Down Expand Up @@ -2952,14 +2952,14 @@ function SampleNumberEditFieldValueChanged(app, event)
% Create UIFigure and components
function createComponents(app)

% Create MTOPlatformMToPv14UIFigure and hide until all components are created
app.MTOPlatformMToPv14UIFigure = uifigure('Visible', 'off');
app.MTOPlatformMToPv14UIFigure.Color = [1 1 1];
app.MTOPlatformMToPv14UIFigure.Position = [100 100 1046 755];
app.MTOPlatformMToPv14UIFigure.Name = 'MTO-Platform (MToP) v1.4';
% Create MTOPlatformMToPv16UIFigure and hide until all components are created
app.MTOPlatformMToPv16UIFigure = uifigure('Visible', 'off');
app.MTOPlatformMToPv16UIFigure.Color = [1 1 1];
app.MTOPlatformMToPv16UIFigure.Position = [100 100 1046 755];
app.MTOPlatformMToPv16UIFigure.Name = 'MTO-Platform (MToP) v1.6';

% Create MTOPlatformGridLayout
app.MTOPlatformGridLayout = uigridlayout(app.MTOPlatformMToPv14UIFigure);
app.MTOPlatformGridLayout = uigridlayout(app.MTOPlatformMToPv16UIFigure);
app.MTOPlatformGridLayout.ColumnWidth = {'1x'};
app.MTOPlatformGridLayout.RowHeight = {'1x'};
app.MTOPlatformGridLayout.ColumnSpacing = 5;
Expand Down Expand Up @@ -4075,7 +4075,7 @@ function createComponents(app)
app.DDataTree.Layout.Column = 1;

% Create SelectedAlgoContextMenu
app.SelectedAlgoContextMenu = uicontextmenu(app.MTOPlatformMToPv14UIFigure);
app.SelectedAlgoContextMenu = uicontextmenu(app.MTOPlatformMToPv16UIFigure);
app.SelectedAlgoContextMenu.ContextMenuOpeningFcn = createCallbackFcn(app, @SelectedAlgoContextMenuOpening, true);

% Assign app.SelectedAlgoContextMenu
Expand All @@ -4087,7 +4087,7 @@ function createComponents(app)
app.SelectedAlgoSelectAllMenu.Text = 'Select All';

% Create DDataContextMenu
app.DDataContextMenu = uicontextmenu(app.MTOPlatformMToPv14UIFigure);
app.DDataContextMenu = uicontextmenu(app.MTOPlatformMToPv16UIFigure);
app.DDataContextMenu.ContextMenuOpeningFcn = createCallbackFcn(app, @DDataContextMenuOpening, true);

% Assign app.DDataContextMenu
Expand All @@ -4099,7 +4099,7 @@ function createComponents(app)
app.SelectedAlgoSelectAllMenu_2.Text = 'Select All';

% Create SelectedProbContextMenu
app.SelectedProbContextMenu = uicontextmenu(app.MTOPlatformMToPv14UIFigure);
app.SelectedProbContextMenu = uicontextmenu(app.MTOPlatformMToPv16UIFigure);

% Assign app.SelectedProbContextMenu
app.EProblemsTree.ContextMenu = app.SelectedProbContextMenu;
Expand All @@ -4111,7 +4111,7 @@ function createComponents(app)
app.SelectedProbSelectAllMenu.Text = 'Select All';

% Create AlgorithmsContextMenu
app.AlgorithmsContextMenu = uicontextmenu(app.MTOPlatformMToPv14UIFigure);
app.AlgorithmsContextMenu = uicontextmenu(app.MTOPlatformMToPv16UIFigure);
app.AlgorithmsContextMenu.ContextMenuOpeningFcn = createCallbackFcn(app, @AlgorithmsContextMenuOpening, true);

% Assign app.AlgorithmsContextMenu
Expand All @@ -4123,7 +4123,7 @@ function createComponents(app)
app.AlgorithmsSelectAllMenu.Text = 'Select All';

% Create ProblemsContextMenu
app.ProblemsContextMenu = uicontextmenu(app.MTOPlatformMToPv14UIFigure);
app.ProblemsContextMenu = uicontextmenu(app.MTOPlatformMToPv16UIFigure);

% Assign app.ProblemsContextMenu
app.EProblemsListBox.ContextMenu = app.ProblemsContextMenu;
Expand All @@ -4135,7 +4135,7 @@ function createComponents(app)
app.ProblemsSelectAllMenu.Text = 'Select All';

% Show the figure after all components are created
app.MTOPlatformMToPv14UIFigure.Visible = 'on';
app.MTOPlatformMToPv16UIFigure.Visible = 'on';
end
end

Expand All @@ -4149,7 +4149,7 @@ function createComponents(app)
createComponents(app)

% Register the app with App Designer
registerApp(app, app.MTOPlatformMToPv14UIFigure)
registerApp(app, app.MTOPlatformMToPv16UIFigure)

% Execute the startup function
runStartupFcn(app, @startupFcn)
Expand All @@ -4163,7 +4163,7 @@ function createComponents(app)
function delete(app)

% Delete UIFigure when app is deleted
delete(app.MTOPlatformMToPv14UIFigure)
delete(app.MTOPlatformMToPv16UIFigure)
end
end
end
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Multitask Optimization Platform (MToP)

[![](https://img.shields.io/badge/Download-Latest-green)](https://github.com/intLyc/MTO-Platform/archive/refs/heads/master.zip)
[![](https://img.shields.io/badge/Release-v1.5-orange)](#mto-platform)
[![](https://img.shields.io/badge/Release-v1.6-orange)](#mto-platform)
[![](https://img.shields.io/badge/Matlab-%3E%3DR2020b-blue)](#mto-platform)

[![GitHub Repo stars](https://img.shields.io/github/stars/intLyc/MTO-Platform?style=social)](#mto-platform)
Expand Down Expand Up @@ -38,6 +38,15 @@ MToP is a user-friendly tool with a graphical user interface that makes it easy
}
```

## Release Highlights of MToP v1.6

- Fix the bug of multifactorial algorithms run in many-task problems
- New Algorithm:
- TNG-NES (Single-objective Many-task TEVC24)
- MTDE-ADKT (Single-objective Multi-task ASOC24)
- AR-MOEA, MSEA (Multi-objective Single-task)
- New Problem: LSMaTSO (Large-scale many-task single-objective)

## Release Highlights of MToP v1.5

- Fix the bug when GUI parallel runs experiments with save Dec.
Expand Down

0 comments on commit 7c50b7c

Please sign in to comment.