NSGA-II icon indicating copy to clipboard operation
NSGA-II copied to clipboard

introduce a new problem to solve with nsgaII algorithm

Open nabil215 opened this issue 6 years ago • 4 comments

hello everyone i would like to know how to adapt a new problem with this code like the new objective functions the new operators new variables

nabil215 avatar Apr 23 '20 15:04 nabil215

@nabil215 To adapt this to new objective functions, you simply have to write your objective function by extending the IObjectiveFunction interface and implement its objectiveFunctionTitle() and getObjectiveValue() functions. All you have to do then is add a new object of your objective function in the Configuration's buildObjectives() method.

As an example, you can see two objective functions, SCH_1 and SCH_2 written which implements the IObjectiveFunction interface and which is then added in Configuration's buildObjectives() as

newObjectives.add(0, new SCH_1());
newObjectives.add(1, new SCH_2());

Hope this helps. But I am unsure what you mean by "new operators new variables". Do elaborate.

onclave avatar Apr 24 '20 06:04 onclave

Thanks i will try But since i have problems with dependencies i can't run It show me on netbeans that some dependency artifacts are not in the local repository Any ideas how to solve this problem

Le ven. 24 avr. 2020 à 7:18 AM, Debabrata Acharya [email protected] a écrit :

@nabil215 https://github.com/nabil215 To adapt this to new objective functions, you simply have to write your objective function by extending the IObjectiveFunction interface https://github.com/onclave/NSGA-II/blob/master/src/main/java/io/onclave/nsga/ii/interfaces/IObjectiveFunction.java and implement its objectiveFunctionTitle() and getObjectiveValue() functions. All you have to do then is add a new object of your objective function in the Configuration https://github.com/onclave/NSGA-II/blob/master/src/main/java/io/onclave/nsga/ii/api/Configuration.java's buildObjectives() method.

As an example, you can see two objective functions, SCH_1 https://github.com/onclave/NSGA-II/blob/master/src/main/java/io/onclave/nsga/ii/objectivefunction/SCH_1.java and SCH_2 https://github.com/onclave/NSGA-II/blob/master/src/main/java/io/onclave/nsga/ii/objectivefunction/SCH_2.java written which implements the IObjectiveFunction interface and which is then added in Configuration's buildObjectives() as

newObjectives.add(0, new SCH_1()); newObjectives.add(1, new SCH_2());

Hope this helps. But I am unsure what you mean by "new operators new variables". Do elaborate.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/onclave/NSGA-II/issues/2#issuecomment-618825144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF44AMIBHAH4RX5SEPZ5ELDROEVJXANCNFSM4MPFHFFQ .

nabil215 avatar Apr 24 '20 10:04 nabil215

@nabil215 can you post the complete error that netbeans is throwing you?

Side note: since this is a maven project, make sure all your dependencies are downloaded before you can build the project by running the POM file. Netbeans should do that for you automatically on your first run or you can right click on dependencies and select “download dependency”.

This project has jfreecharts dependency.

onclave avatar Apr 24 '20 13:04 onclave

Closing this issue due to inactivity. Reopen if necessary.

onclave avatar May 11 '20 19:05 onclave