public void run() {
NBOServer.log("ResourceAllocationSolver STARTED for " +
user.getUserName() + "'s task: " + task + ".", 1);
Solver solver = new Solver();
solver.solve(this.task);
Result result = new Result(this.uniqueHash, this.problemName);
result.add(this.problemName, solver.getOutput());
try {
for (String filename: new String[] { "eredmeny.txt", "ertekeles.txt", "kimaradt_munkak.txt" }) {
String fileData;
//System.out.println(System.getProperty("user.dir") + this.pathOfTask + "/" + filename);
File file = new File(this.pathOfTask + "/" + filename);
char buffer[] = new char[(int)file.length()];
FileReader fileReader = new FileReader(file);
fileReader.read(buffer);
fileData = new String(buffer);
result.add(filename, fileData);
}
user.getLogs().put(this.uniqueHash, solver.getLog());
NBOServer.log("ResourceAllocationSolver FINISHED " +
user.getUserName()+"'s task: " + task + ".", 1);
}