In the appendix of the reference paper, $PL$ is defined as follows:
$$PL = \sum{i=1}^{6}\sum{j=1}^{6} x{i}x{j}B_{ij},$$
where, $\boldsymbol{x} = (x_1, \dots, x_6)$ is a decision vector, and $B$ is the matrix that describes the relation among the decision variables. This definition represents the square of a generalized norm in a distorted space by the matrix $B$, such as the Mahalanobis distance.
In contrast, $PL$ is calculated as the following code:
where the variable x is a matrix that stores the decision vector for each solution in each row.
Although the appendix seems to contain some errata, this code is clearly wrong. It seems strange to calculate the sum of the products with the first decision variable of the first six solutions (i.e., x(j)).
This code should be modified as follows:
PL = zeros(size(x,1),1);
for i = 1 : size(x,2)
for j = 1 : size(x,2)
PL = PL + x(:,i) .* B(i,j) .* x(:,j);
end
end
, or
PL = diag(x * B * x.')
I will send a PR with the former code. If there is no problem, please merge the PR.
In the appendix of the reference paper, $PL$ is defined as follows: $$PL = \sum{i=1}^{6}\sum{j=1}^{6} x{i}x{j}B_{ij},$$ where, $\boldsymbol{x} = (x_1, \dots, x_6)$ is a decision vector, and $B$ is the matrix that describes the relation among the decision variables. This definition represents the square of a generalized norm in a distorted space by the matrix $B$, such as the Mahalanobis distance.
In contrast, $PL$ is calculated as the following code:
https://github.com/BIMK/PlatEMO/blob/3714c36490ce70f85c7ac3a666fb019981beb2ef/PlatEMO/Problems/Multi-objective%20optimization/RWMOPs/RWMOP50.m#L44-L49
where the variable
x
is a matrix that stores the decision vector for each solution in each row.Although the appendix seems to contain some errata, this code is clearly wrong. It seems strange to calculate the sum of the products with the first decision variable of the first six solutions (i.e.,
x(j)
).This code should be modified as follows:
, or
I will send a PR with the former code. If there is no problem, please merge the PR.