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일

추가 답변 (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