Package org.xilaew.jampl

Examples of org.xilaew.jampl.JAMPL.solve()


  public static void main(String[] args) throws IOException {
    JAMPL jampl = AmplFactory.createJAMPL();
    jampl.setSolver("cplex");
    jampl.loadModel("output/assignment.mod");
    jampl.loadData("output/assignment0.dat");
    SolveResult result = jampl.solve();
    printResult(result);
    jampl.setSolver("couenne");
    printResult(jampl.solve());
    System.out.println("found a result!");
    System.out.println("a is: "+jampl.getParameter("a"));
View Full Code Here


    jampl.loadModel("output/assignment.mod");
    jampl.loadData("output/assignment0.dat");
    SolveResult result = jampl.solve();
    printResult(result);
    jampl.setSolver("couenne");
    printResult(jampl.solve());
    System.out.println("found a result!");
    System.out.println("a is: "+jampl.getParameter("a"));
    System.out.println("x is: "+jampl.getVariable("x"));
    jampl.kill();
  }
View Full Code Here

        ampl.setSolver(solver);
      }
      // Solve the Model and Data to get Input data
      SolveResult solved;
      try {
        solved = ampl.solve();
      } catch (IOException e) {
        ampl = AmplFactory.createJAMPL();
        ampl.setSolver(solver);
        ampl.loadModel(ActTCG2AMPLModel.transform(tcgActivity));
        System.out.println("RESET!!!");
View Full Code Here

        ampl.setSolver(solver);
        ampl.loadModel(ActTCG2AMPLModel.transform(tcgActivity));
        System.out.println("RESET!!!");
        ampl.loadData(Path2AMPLData.transform(p));
        try {
          solved = ampl.solve();
        } catch (IOException e1) {
          e1.printStackTrace();
          break;
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.