Failure in user-supplied fitness function evaluation. GA cannot continue
Show older comments
Thats the fitness function:
function F = ReductionEfficienyforTheCoreBase(epslion)
EI = 1.728e9; % E = 3e7 kPa ; EI = 1.728e9 kNm^2 for concrete core
EIo = 1.488e8; % EIo = effective bending stiffness of outriggers E = 2.1e8 kPa ; EIo = 1.488e8 kNm^2
EAc = 1.365e7; % EAc = axial stiffness of columns E = 2.1e8 kPa ; Ac = 0.065m^2 ; EAc = 1.365e7 kNm^2
H = 200; % StoryHeight = 4 H = Building of heigh
w = 115.2; % w = horizontal uniform wind load per unit height; 3.2kpa for Height = 200m and width of building = 36m therefore, w=115.2kPa
d = 36; % d = horizontal distance from the centre of the core to the far end of the outriggers
S = 1/EI+2/(d^2*EAc); % 5. S = 1/EI+2/(d^2*EAc)
S1 = d/(12*EIo); % 6. S1= d/(12*EIo)
omega = S1/(S*H); % 10. omega = beta/(12*(1+alpha)) = S1/(S*H)
A = [omega+(1-epslion(1)) 1-epslion(2) 1-epslion(3) 1-epslion(4); ...
1-epslion(2) omega+(1-epslion(2)) 1-epslion(3) 1-epslion(4); ...
1-epslion(3) 1-epslion(3) omega+(1-epslion(3)) 1-epslion(4); ...
1-epslion(4) 1-epslion(4) 1-epslion(4) omega+(1-epslion(4))];
B = [1-epslion(1)^3 1-epslion(2)^3 1-epslion(3)^3 1-epslion(4)^3];
e = [1 1 1 1];
F = (-1/3)*e*inv(A)*B';
end
and ga
Aineq = [];
Bineq = [];
lb = [0 0 0 0];
ub = [1 1 1 1];
opts = optimoptions(@ga, ...
'PopulationSize', 200, ...
'MaxGenerations', 200, ...
'EliteCount', 4, ...
'FunctionTolerance', 1e-8, ...
'PlotFcn', @gaplotbestf);
rng default;
[xbest, fbest, exitflag] = ga(@ReductionEfficienyforTheCoreBase, 4, Aineq, Bineq, [], [], ...
lb, ub, @Constraint, opts);
and it returned
Error in TrialOptimizationForFourOutriggerConstantVolumeCITYU (line 118)
[xbest, fbest, exitflag] = ga(@ReductionEfficienyforTheCoreBase, 4, Aineq, Bineq, [], [], ...
Caused by:
Failure in user-supplied fitness function evaluation. GA cannot continue.
1 Comment
Walter Roberson
on 9 Mar 2019
We need the function Constraint to test.
Answers (1)
Matt J
on 9 Mar 2019
Sounds like a job for
>> dbstop if error
Categories
Find more on Global or Multiple Starting Point Search in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!