Project-Platypus / Platypus

A Free and Open Source Python Library for Multiobjective Optimization
GNU General Public License v3.0
563 stars 153 forks source link

maximization with NSGA III #137

Closed harsha3080 closed 1 year ago

harsha3080 commented 4 years ago

Is there any possible way using NSGA III for 3 objectives problem with 2 objectives are minimized and the one should be maximized?

dhadka commented 4 years ago

Yes, this should be possible by setting the directions:

problem.directions[0] = Problem.MINIMIZE
problem.directions[1] = Problem.MINIMIZE
problem.directions[2] = Problem.MAXIMIZE
harsha3080 commented 4 years ago

Hi...Thanks for the reply but it says as it is shown in the attached figure. Capture

dhadka commented 4 years ago

Oh, lol...thanks for pointing that out :) I don't remember why I didn't add support for maximizing...

Alternatively, you can negate the objective value instead. Maximizing objective f(x) is the same as minimizing -f(x).

harsha3080 commented 4 years ago

Yeah....thanks dhadka. Let me try that....i am just comparing nsga 2 and nsga 3 for an engineering problem with 3 objectives. Nsga 2 is giving distributed results while nsga 3 is sticking to the small part. Anyway...thanks for the wonderful library.

github-actions[bot] commented 1 year ago

This issue is stale and will be closed soon. If you feel this issue is still relevant, please comment to keep it active. Please also consider working on a fix and submitting a PR.