gaplotpareto not supported for this algorithm

30 次查看(过去 30 天)
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:
Would anyone be able to suggest why this is happening?
  1 个评论
鹏蕾 李
鹏蕾 李 2021-9-6
your target function definition is wrong.
function [obj1,obj2]=objective(x) %wrong
function obj=objective(x)
obj=[obj1,obj2] %Right

请先登录,再进行评论。

采纳的回答

Gifari Zulkarnaen

更多回答(2 个)

Modess Seyednezhad
Modess Seyednezhad 2020-5-24
I have the same issue and that Link was not usefule for me. Anyone can help me?

Modess Seyednezhad
Modess Seyednezhad 2020-5-24
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?

类别

Help CenterFile Exchange 中查找有关 Multiobjective Optimization 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by