-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.m
More file actions
23 lines (22 loc) · 774 Bytes
/
main.m
File metadata and controls
23 lines (22 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function main
% coded by huawei Tong, 2021-04-21
clc ; close all;clear;
global Initial_Value_1 Initial_Value_2 FOBJ;
Initial_Value_1=0.8;
Initial_Value_2=0.3;
global nfevalMAX lu Np Nc D;
D = 10; % Problem dimension
lu = [-10*ones(1,D);
10*ones(1,D)]; % Seach space
nfevalMAX = 20000; % Stopping criteria
Np = 20; % Number of packs
Nc = 5; % Number of coyotes
% Optimization problem
FOBJ = @(x) sum(x.^2);
ExperTime=10; % setup experiments times
for i = 1:ExperTime
disp(['=====Experiments: ',num2str(i),'====='])
[GlobalParams,GlobalMin,costs] =CCOA;
disp(['The cost is ',num2str(GlobalMin)]);
end
end