jMetal / jMetal

jMetal: a framework for multi-objective optimization with metaheuristics

Home Page:https://jmetal.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation of chance constrained knapsack problem with NSGA-II

KenMak8 opened this issue · comments

Hi,

Please forgive me if I misunderstand something fundamental, I'm new to Java.

I'm trying to implement the knapsack problem and have the NSGA-II algorithm to solve it. So far, I've used the NSGAIIRunner.java file and created a CCKP.java file. I've been trying to create the knapsack problem from the OneZeroMax.java file because it too is a multiobjective problem.

Could anyone give me some pointers on how to go about this project?

As far as I know, you are supposed to use NSGAIIRunner if you want to run NSGA-II on your problem, but you have to create the data files required, not other Java stuff. I am not familiar enough with this process, so I hope @ajnebro will find some time to tell you what you need.

Thanks @matthieu-vergne,

Just a follow-up question.
This line of code in the NSGAIIRunner.java file
referenceParetoFront = "resources/referenceFrontsCSV/ZDT1.csv";
Exception in thread "main" java.io.FileNotFoundException: resources\referenceFrontsCSV\ZDT1.csv (The system cannot find the path specified)

Was causing a file not found error. I even moved the resources file into the same directory as the NSGAIIRunner's directory and it still threw the same error. Only after deleting that line did the program compile and display the graph. Is there any way to fix this, or did I do the right thing by removing the line of code.

The runner programs assume that the current working directory is the project root directory. If not, you have to modify the paths of the resource files.