How to plot 3 objective function pareto front in pso

Hi,
I have 3 objective function namely F1, F2, F3. I used PSO for solving this function by combining 3 into 1 as follows.
F=a1*F1+a2*F2+a3*F3
a1, a2, a3 are some constants.
I want to plot all the 3 objectrtive function together to show the result.
Please help me in this.
Thanks in advance.

 採用された回答

Tanmay Das
Tanmay Das 2021 年 12 月 30 日

0 投票

Hi,
You may find this example of Plotting 3-D Pareto Front helpful.
The example first shows how to obtain the plot using the built-in 'psplotparetof' plot function. Then solve the same problem and obtain the plot using 'gamultiobj', which requires slightly different option settings. The example shows how to obtain solution variables for a particular point in the Pareto plot. Then the example shows how to plot the points directly, without using a plot function, and shows how to plot an interpolated surface instead of Pareto points.

4 件のコメント

Muthukannan
Muthukannan 2021 年 12 月 31 日
Thank you..
Muthukannan
Muthukannan 2021 年 12 月 31 日
Hi,
I tried this command for my function.
options = optimoptions('paretosearch','UseVectorized',true,'ParetoSetSize',200,...
'PlotFcn','psplotparetof');
[x,f] = paretosearch(fun,3,[],[],[],[],lb,ub,[],options);
But it shows error as follows
Unable to perform assignment because the size of the left side is 199-by-3 and the size of the right side is 1-by-3.
Error in globaloptim.internal.FcnEvaluator/getAllPoints_vectorized (line 68)
fval(isFeasible,:) = fvalFeas;
Error in globaloptim.internal.FcnEvaluator/evaluateAll (line 12)
[idx, X, fval, residuals] = getAllPoints_vectorized(obj);
Error in globaloptim.paretosearch.coldstart (line 114)
[idx, objval, residuals] = optimState.FcnEvaluator.evaluateAll();
Error in globaloptim.paretosearch.initialize (line 32)
globaloptim.paretosearch.coldstart(objfun,linConstr,nonlcon,optimState,options);
Error in globaloptim.paretosearch.driver (line 28)
globaloptim.paretosearch.initialize(objfun,linConstr,nonlcon,optimState,options);
Error in paretosearch (line 234)
[X,FVAL,EXITFLAG,OUTPUT,CINEQ,CEQ] = globaloptim.paretosearch.driver(objfun,nonlcon,optimState,linConstr,options,OUTPUT);
Error in plot_traf (line 11)
[x,f] = paretosearch(@facility,nvars,[],[],[],[],lb,ub,[],options);
Please help me out this.
Walter Roberson
Walter Roberson 2021 年 12 月 31 日
You used 'UseVectorized', true . When you do that, your function needs to return a 2D array that is (number of input rows) x (number of objective functions). However your code is returning only one row instead when a 2D array is input.
Muthukannan
Muthukannan 2021 年 12 月 31 日
Thank you so much..

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

その他の回答 (0 件)

カテゴリ

製品

リリース

R2021b

質問済み:

2021 年 12 月 27 日

コメント済み:

2021 年 12 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by