Closed MohammedQaraad closed 2 years ago
Hi,
Assuming that you are referring to the constraint violation, it can be computed as cx:
cx = (sum([sum(g.*(g>0),1); sum(abs(h).*(abs(h)>eps),1)])./const_num);
where g
and h
are the vectors of inequality and equality constraints, const_num
is the total number of constraints, and eps
is the threshold for the conversion of equality constraints, which has been set to 1e-4 in the research.
See EDAPP/COMPARISON/ALG_EDAPP/conFcnCEC2020.m as:
function out = conFcnCEC2020(x)
global fcnNum const_num;
[~,g,h] = cec20_func(x,fcnNum);
out = (sum([sum(g.*(g>0),1); sum(abs(h).*(abs(h)>1e-4),1)])./const_num);
end
salam 3alekom i hope this email finds you well thank you for your reply I have the problem to develop a platform to solve cec2020 MO Eng problems I have tried to solve these benchmarks with PSO (attached) but I still have a problem I hope you can help me to fix it you can delete any part in my code or update it (feel free) finally Ramadan Kareem
On Thu, Mar 31, 2022 at 6:57 PM Abolfazl Shirazi @.***> wrote:
Hi,
Assuming that you are referring to the constraint violation, it can be computed as cx:
cx = (sum([sum(g.(g>0),1); sum(abs(h).(abs(h)>eps),1)])./const_num);
where g and h are the vectors of inequality and equality constraints, const_num is the total number of constraints, and eps is the threshold for the conversion of equality constraints, which has been set to 1e-4 in the research.
See EDAPP/COMPARISON/ALG_EDAPP/conFcnCEC2020.m https://github.com/abolfazlshirazi/EDAPP/blob/master/COMPARISON/ALG_EDAPP/conFcnCEC2020.m as:
function out = conFcnCEC2020(x) global fcnNum const_num; [~,g,h] = cec20_func(x,fcnNum); out = (sum([sum(g.(g>0),1); sum(abs(h).(abs(h)>1e-4),1)])./const_num); end
— Reply to this email directly, view it on GitHub https://github.com/abolfazlshirazi/EDAPP/issues/1#issuecomment-1084844780, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMAYL7RTFPE7FVZZEKQPSM3VCXKOZANCNFSM5SAATEXQ . You are receiving this because you authored the thread.Message ID: @.***>
hi i hope this message finds you well I just wondering about your way to calculate Vio term I am working on the python version def p1(x):
Heat Exchanger Network Design (case 1)
how to evaluate fx according to g(x) and (hx) thanks in advance