Package net.sf.javailp

Examples of net.sf.javailp.Result


    problem.setObjective(constructObjective(), OptType.MIN);
   
    //TODO Relaxations relax = new Relaxations();
   
    final Solver solver = factory.get();
    final Result result = solver.solve(problem);
   
    if (result == null) {
      System.out.println("[ERROR]: cannot enforce constraints, no result for LP");
    } else {
     
      /* apply elevation values */
     
      FaultTolerantIterationUtil.iterate(variables, new Operation<LPVariablePair>() {
        @Override public void perform(LPVariablePair v) {
         
          VectorXYZ posXYZ = v.getPosXYZ().addY(
              + result.get(v.posVar()).doubleValue()
              - result.get(v.negVar()).doubleValue());
         
          v.setPosXYZ(posXYZ);
         
        }
      });
View Full Code Here

TOP

Related Classes of net.sf.javailp.Result

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.