BIMK / PlatEMO

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

Output File Third-Party Compatibility #123

Open electronsandstuff opened 1 year ago

electronsandstuff commented 1 year ago

Hey folks. First, thank you for this project! I am working on some MOGA research, and platEMO is a truly amazing resource and is saving me a huge amount of time on benchmarking with competing algorithms.

I am not sure if this is the right place for this, but I ran into some difficulty around the .mat file output format used in saving optimization runs. I am using python for some of my work, and the language does support reading in matlab output, but not if it contains classes, such as the solution class in PlatEMO's output. This is apparently a general problem around opening .mat files in other languages because of the lack of documentation for how classes are stored in these files.

I am not a big user of matlab, but reading around, this supposedly can be solved by calling struct(obj) on class objects before saving them. This would allow the output files from PlatEMO to be opened by third-party tools.

Again, thanks for the project. I am not sure how feasible any of this is, but I thought that I would bring it to your attention. Thanks!

HanLeI187 commented 1 year ago

Thanks for using PlatEMO. In addition to saving the results as .mat files, the obtained results can also be represented by matrices and saved in text files. Please refer to the user manual for details.

electronsandstuff commented 1 year ago

Cool, thanks. I am having a hard time finding it in the manual. Could you point it out for me?

Specifically the outputs I am talking about are the values of the objectives and decision variables stored in the files with names like PlatEMO/Data/NSGAII/NSGAII_WFG1_M2_D10_1.mat. I know how to save the tables of metric values (labeled "result display" in the experiment module), but that isn't the data I am talking about.