BIMK / PlatEMO

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

How to use one script function with multiple objectives in `UserProblem'? #143

Closed ehancer06 closed 9 months ago

ehancer06 commented 9 months ago

Dear Board,

Sorry for disturbing you. For a problem with multiple objectives, I need to define an individual function for each objective for UserProblem.m file as seen follows: f1 = @obj_func1(x); f2 = @obj_func2(x); PRO = UserProblem('objFcn',{f1,f2},'N',50,'maxFE',1000,'D',nvars); ALG = NSGAII();

However, I need to define a single function with multiple objectives due to the structure of the problem as follows: f = @obj_func(x); PRO = UserProblem('objFcn',{f},'N',50,'maxFE',1000,'D',nvars); ALG = NSGAII();

How can I achieve this? Note that I also attempted to use 'evalFcn', but my objective function lacks definitions for solution repair and constraint functions. Thanks for your concern.