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);
}
});