Package hu.u_szeged.nbo.res_alloc.main

Examples of hu.u_szeged.nbo.res_alloc.main.Solver


 
  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)
   
    }
View Full Code Here

TOP

Related Classes of hu.u_szeged.nbo.res_alloc.main.Solver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.