forked from ankurzing/bleaq2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smd9.m
35 lines (26 loc) · 1.54 KB
/
smd9.m
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
30
31
32
33
34
35
function [ulEliteFunctionValue, llEliteFunctionValue, ulEliteIndiv, llEliteIndiv, ulFunctionEvaluations, llFunctionEvaluations,llCalls,gen,ulDim,llDim,ulPopSize,llPopSize] = smd9(ulPopSize, llPopSize, ulMaxGens, llMaxGens, ulDim, llDim)
problemName = 'smd9'; % Test problem name
if nargin==0
ulPopSize=20; % Size of UL population
ulMaxGens=2000; % Maximum number of generations allowed at UL
ulDim=2; % Number of UL dimensions
llPopSize=30; % Size of LL population
llMaxGens=2000; % Maximum number of generations allowed at LL
llDim=3; % Number of LL dimensions
end
r = floor(ulDim/2);
p = ulDim - r;
q = llDim - r;
size_xu1 = p;
size_xu2 = r;
size_xl1 = q;
size_xl2 = r;
ulDimMin = -5*ones(1,ulDim); % Minimum bound accross UL dimensions
ulDimMax = [10*ones(1,p) 1*ones(1,r)]; % Maximum bound accross UL dimensions
eps = 0.00001;
llDimMin = [-5*ones(1,q) -1+eps*ones(1,r)]; % Minimum bound accross LL dimensions
llDimMax = [10*ones(1,q) -1+exp(1)*ones(1,r)]; % Maximum bound accross LL dimensions
ulStoppingCriteria = 1e-4;
llStoppingCriteria = 1e-5;
[ulEliteFunctionValue, llEliteFunctionValue, ulEliteIndiv, llEliteIndiv, ulFunctionEvaluations, llFunctionEvaluations,llCalls,gen]=ulSearch(problemName, ulPopSize, ulMaxGens, ulDim, ulDimMin, ulDimMax, llPopSize, llMaxGens, llDim, llDimMin, llDimMax, ulStoppingCriteria, llStoppingCriteria);
save('smd9');