gaplotpareto not supported for this algorithm

25 vues (au cours des 30 derniers jours)
Ayman Al-Sukhon
Ayman Al-Sukhon le 6 Mai 2020
Commenté : 鹏蕾 李 le 6 Sep 2021
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 commentaire
鹏蕾 李
鹏蕾 李 le 6 Sep 2021
your target function definition is wrong.
function [obj1,obj2]=objective(x) %wrong
function obj=objective(x)
obj=[obj1,obj2] %Right

Connectez-vous pour commenter.

Réponse acceptée

Gifari Zulkarnaen
Gifari Zulkarnaen le 7 Mai 2020
  1 commentaire
Ayman Al-Sukhon
Ayman Al-Sukhon le 7 Mai 2020
Thank you, sorry for missing that.

Connectez-vous pour commenter.

Plus de réponses (2)

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

Modess Seyednezhad
Modess Seyednezhad le 24 Mai 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?

Catégories

En savoir plus sur Multiobjective Optimization dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by