gaplotpareto not supported for this algorithm

27 ビュー (過去 30 日間)
Ayman Al-Sukhon
Ayman Al-Sukhon 2020 年 5 月 6 日
コメント済み: 鹏蕾 李 2021 年 9 月 6 日
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
Gifari Zulkarnaen 2020 年 5 月 7 日
  1 件のコメント
Ayman Al-Sukhon
Ayman Al-Sukhon 2020 年 5 月 7 日
Thank you, sorry for missing that.

サインインしてコメントする。

その他の回答 (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 Center および File ExchangeMultiobjective Optimization についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by