Main Content

paretoplot

多目的値のパレート プロット

R2022a 以降

説明

paretoplot(val) は、val 内の目的関数のパレート プロットを作成します。val に 3 つを超える目的関数が含まれている場合、paretoplot は最初の 3 つの目的関数をプロットします。

paretoplot(val,objlabels) は、objlabels にリストされている目的関数のパレート プロットを作成します。目的関数ごとに異なるラベルがある場合は、この構文を使用します。

paretoplot(val,objindex) は、objindex にリストされている目的関数のパレート プロットを作成します。目的関数にラベルが付いていない場合は、この構文を使用します。

h = paretoplot(___) は、前記のすべての入力構文に対して、得られる散布図オブジェクトのハンドル h を返します。作成後の散布図オブジェクトのプロパティを設定するには、h を使用します。

paretoplot(ax,___) は、ハンドル ax をもつ座標軸にプロットします。

すべて折りたたむ

最適化変数を使用して多目的最適化問題を作成し、解きます。

x = optimvar("x",LowerBound=-1,UpperBound=2);
prob = optimproblem;
prob.Objective.obj1 = x^2;
prob.Objective.obj2 = (x-1)^2;
[sol,fval] = solve(prob,Solver="paretosearch");
Solving problem using paretosearch.

Pareto set found that satisfies the constraints. 

Optimization completed because the relative change in the volume of the Pareto set 
is less than 'options.ParetoSetChangeTolerance' and constraints are satisfied to within 
'options.ConstraintTolerance'.

パレート フロントをプロットします。

paretoplot(sol)

4 つの名前付き目的関数を含む多目的最適化問題を作成し、解きます。

x = optimvar("x",2,LowerBound=-2,UpperBound=4);
prob = optimproblem;
prob.Objective.obj1 = norm(x)^2;
prob.Objective.obj2 = norm(x - [1;0])^2;
prob.Objective.obj3 = norm(x - [0;1])^2;
prob.Objective.obj4 = norm(x - [1;1])^2;
sol = solve(prob,Solver="paretosearch");
Solving problem using paretosearch.

Pareto set found that satisfies the constraints. 

Optimization completed because the relative change in the distance of the Pareto set 
is less than 'options.ParetoSetChangeTolerance' and constraints are satisfied to within 
'options.ConstraintTolerance'.

最初の 3 つの目的関数のパレート プロットを作成します。

paretoplot(sol)

最後の 3 つの目的関数のパレート プロットを作成します。

paretoplot(sol,["obj2" "obj3" "obj4"])

4 つの目的関数を含む多目的最適化問題を作成し、解きます。目的関数は 4 要素ベクトルを返します。

x = optimvar("x",2,LowerBound=-2,UpperBound=4);
prob = optimproblem;
obj = [norm(x)^2,norm(x - [1;0])^2,norm(x - [0;1])^2,norm(x - [1;1])^2];
prob.Objective = obj;
sol = solve(prob,Solver="paretosearch");
Solving problem using paretosearch.

Pareto set found that satisfies the constraints. 

Optimization completed because the relative change in the distance of the Pareto set 
is less than 'options.ParetoSetChangeTolerance' and constraints are satisfied to within 
'options.ConstraintTolerance'.

最初の 3 つの目的関数のパレート プロットを作成します。

paretoplot(sol)

最後の 3 つの目的関数のパレート プロットを作成します。

paretoplot(sol,[2 3 4])

最適化変数を使用して多目的最適化問題を作成し、解きます。

x = optimvar("x",LowerBound=-1,UpperBound=2);
prob = optimproblem;
prob.Objective.obj1 = x^2;
prob.Objective.obj2 = (x-1)^2;
[sol,fval] = solve(prob,Solver="paretosearch");
Solving problem using paretosearch.

Pareto set found that satisfies the constraints. 

Optimization completed because the relative change in the volume of the Pareto set 
is less than 'options.ParetoSetChangeTolerance' and constraints are satisfied to within 
'options.ConstraintTolerance'.

パレート フロントをプロットします。編集を有効にするには、プロットのハンドルを取得します。

h = paretoplot(sol);

マーカーを青色の 'o' から赤色の 'x' に変更します。歪み補正されたビューを表示するには、座標軸の長さが等しくなるように設定します。

h.Marker = "x";
h.MarkerEdgeColor = "r";
axis equal

編集可能なプロパティの完全なリストについては、Scatter のプロパティを参照してください。

入力引数

すべて折りたたむ

最適化値。OptimizationValues オブジェクトとして指定します。通常、vals は多目的問題の解、solvesol 出力です。

paretoplot は、2 つまたは 3 つの目的関数をプロットできます。3 つを超える目的関数がある場合、paretoplot は最初の 3 つをプロットします。objlabels 引数または objindex 引数を使用して、プロットする 2 つまたは 3 つの目的関数を指定してください。

例: sol

目的関数ラベル。2 つまたは 3 つのエントリの string ベクトルとして指定します。このエントリは、最適化問題の目的関数ラベルです。

例: ["obj1" "obj2"]

データ型: char | string

目的関数インデックス。正の整数ベクトルとして指定します。objindex には、1 ~ 目的関数の数までの範囲で 2 つまたは 3 つのエントリが含まれている必要があります。

例: [4 1 3]

データ型: double

プロットの座標軸。ハンドルとして指定します。

バージョン履歴

R2022a で導入

参考

(Global Optimization Toolbox) | (Global Optimization Toolbox) |