BIMK / PlatEMO

Evolutionary multi-objective optimization platform
1.5k stars 455 forks source link

Wrong constraint on RWMOP50 #124

Open TakatoKinoshita opened 1 year ago

TakatoKinoshita commented 1 year ago

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:

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.

HanLeI187 commented 1 year ago

Thank you very much for the insightful correction of RWMOP50, we will merge the PR asap