-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestmain.m
More file actions
29 lines (24 loc) · 748 Bytes
/
testmain.m
File metadata and controls
29 lines (24 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
% function bestfit = testmain(x)
clc
c1 = 0.685;
c2 = 0.653;
shift1 = 527.392;
shift2 = 380.811;
scale1 = 0.423;
scale2 = 0.571;
stallgenlimit = 500;
TolFun = 1e-6;
Na = 'testfunc4';
localnum = 1;
glocal = 0;
cont = num2str(17);
fitnessfunc = [Na, cont];
plots = 1;
[c1, c2, shift1, shift2, scale1, scale2, numofballs, numofdims, ...
numofruns, Xmininit, Xmaxinit] = initialization(fitnessfunc);
Xmin = repmat(Xmininit, numofballs, 1);
Xmax = repmat(Xmaxinit, numofballs, 1);
[worsts, meanfits, bests, bestfit, bestpop, Neval] = IPO(numofballs,...
numofdims, numofruns, stallgenlimit, TolFun, c1, c2, shift1,...
shift2, scale1, scale2, Xmininit, Xmaxinit, fitnessfunc, glocal, localnum, plots);
display(bestfit)