Configuring the MOEA/D algorithm

This quick-start tutorial demonstrates how to configure the MOEA/D algorithm and apply it to the DTLZ2 problem with two objectives. Furthermore, it is demonstrated how numerical results can be reported and how the visualization of the final population can be performed. The complete source code for this tutorial can be found here: TODO — will be published soon (framework’s version at least TODO). In what follows, the relevant commented code blocks are presented, and the expected results are visualized for convenience.

The overview of the source code:

Let us start with defininf the criteria/objectives:

Now, we can define the problem-specifica data:

Then, we can proceed to instantiating the MOEA/D algorithm:

Now, we can execute the method. Two means of doing that are presented:

The following piece of code accesses the specimens and prints the information on their objective and decision vectors:

Expected first lines of the console output:

0.000 1.002 : 1.000 0.514 0.484 0.508 0.499 0.496 0.514 0.479 0.496 0.490 0.518 0.504
0.036 1.002 : 0.977 0.489 0.513 0.508 0.495 0.488 0.514 0.478 0.526 0.498 0.519 0.504
0.074 0.999 : 0.953 0.490 0.506 0.510 0.508 0.497 0.482 0.473 0.496 0.516 0.489 0.504
0.115 0.995 : 0.927 0.514 0.505 0.508 0.495 0.497 0.482 0.479 0.496 0.490 0.489 0.504
0.158 0.989 : 0.899 0.517 0.487 0.507 0.500 0.511 0.482 0.479 0.501 0.494 0.505 0.507

Additionally, we can calculate the hypervolume attained by the final population and compare it with the easy-to-calculate optimum:

Expected console output:

HV = 0.4076069855708936
Optimal HV = 0.4246018366025519
Difference = 0.01699485103165832

We can finally visualize the last population constructed by MOEA/D. It begins by creating the plot:

Then, a dedicated Frame object (extends the Java Swing’s Frame class) must be instantiated:

After instantiating the plot and the frame, we can start preparing the data sets to be visualized:

The following piece of code displays the rendered plot:

Lastly, this tutorial showcases how to create the plot’s screenshot that can be then used, e.g., in one’s publication:

The expected final render is provided below. Note the satisfactory performance in terms of distribution, which is often attributed to the decomposition-based methods.