-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGet_Functions_details.m
More file actions
44 lines (38 loc) · 1.81 KB
/
Copy pathGet_Functions_details.m
File metadata and controls
44 lines (38 loc) · 1.81 KB
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
36
37
38
39
40
41
42
43
44
%___________________________________________________________________________%
% Conscious Neighborhood-Based Jellyfish Search Optimizer for Solving %
% Optimal Power Flow Problems %
% %
% source codes version 1.0 %
% %
% Developed in MATLAB R2018a %
% %
% Author and programmer: Mohammad H. Nadimi-Shahraki, M. Banaie-Dezfouli, %
% H. Zamani %
% %
% e-Mail: nadimi@yuntech.edu.tw, m.dezfouli@sco.iaun.ac.ir, %
% hoda_zamani@sco.iaun.ac.ir %
% %
% Mathematics 2025, 13(19), 3068; https://doi.org/10.3390/math13193068 %
%___________________________________________________________________________%
function [lb,ub,dim,fobj] = Get_Functions_details(F)
switch F
case 'F1'
fobj = @F1;
lb=-100; % lb is the lower bound
ub=100; % up is the uppper bound
dim=30; % dim is the number of variables
case 'F2'
fobj = @F2;
lb=-10; % lb is the lower bound
ub=10; % up is the uppper bound
dim=30; % dim is the number of variables
end
end
% F1
function o = F1(x)
o=sum(x.^2);
end
% F2
function o = F2(x)
o=sum(abs(x))+prod(abs(x));
end