gaplotpareto not supported for this algorithm
14 views (last 30 days)
Show older comments
Hi,
I am running gamultiobj for an optimization of a simulation. I ran it with:
options = optimoptions('gamultiobj','PlotFcn',@gaplotpareto);
rng default % For reproducibility
fun = @CostFunctionOptim_Pareto;
[x,fval,exitflag,output] = gamultiobj(fun,4,A,b,Aeq,beq,lb,ub,nonlcon,options);
I cannot share the cost function because it's really long and requires external software, but I do not expect it is the issue because I have used it for optimziation before with patternsearch and ga.
Details about the cost function:
- Four design variables
- 3 Objectives to be minimized
- Runs external software, gets data, computes a mass, compliance and penalty based on a barrier method equation
- Objectives are to minimize mass, compliance and penalty
I get a graph for the pareto front saying:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/290970/image.png)
Would anyone be able to suggest why this is happening?
1 Comment
鹏蕾 李
on 6 Sep 2021
your target function definition is wrong.
function [obj1,obj2]=objective(x) %wrong
function obj=objective(x)
obj=[obj1,obj2] %Right
Accepted Answer
More Answers (2)
Modess Seyednezhad
on 24 May 2020
I have the same issue and that Link was not usefule for me. Anyone can help me?
0 Comments
Modess Seyednezhad
on 24 May 2020
My function is:
function COP = simpleMultiObjective(x)
% both dT and I0 & COP are vectors
% x(1)=dT;
% x(2)=I0;
% based on manufacturer data sheet
Vmax = 16.1; % unite : volt
Imax = 8; % unite : A
dTmax = 71; % unit : Kelvin
Th_nom = 30+273.15;
Th = 30+273.15; % the hot side temperature of 30 C
Tc = Th-x(1); % obtained from the chart
S = Vmax/Th_nom;
K = (Th_nom-dTmax)*(Vmax*Imax)/(2*Th_nom*dTmax);
R = (Th_nom-dTmax)*Vmax/(Th_nom*Imax);
Qc = S.*x(2).*Tc - (x(2).^2 .* R )/2 - K.*x(1);
Qh = S.*x(2).*Th + (x(2).^2 .* R )/2 - K.*x(1);
Qte = abs(Qh-Qc);
COP = Qc./Qte;
end
and the main function is :
close all ; clear ;clc;
fitness = @simpleMultiObjective;
nvar = 2;
Lb = [1, 3];
Ub = [19.2, 6.27];
options = optimoptions('gamultiobj','Display','iter', 'MaxGenerations',200,...
'PopulationSize',10,'FunctionTolerance',1e-4 ,'PlotFcn',@gaplotpareto);
[xf,fval,exitflag] = gamultiobj(fitness,nvar,[],[],[],[],Lb,Ub,options);
I have the same issue and cannot see data on the ParetoPlot.
Any suggestion?
0 Comments
See Also
Categories
Find more on Multiobjective Optimization 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!