if (solver.lastSolution().getBestInfo() == null)
logger.severe("No solution found :-(");
logger.info("Last solution:" + solver.lastSolution().getInfo());
logger.info("Best solution:" + solver.lastSolution().getBestInfo());
Solution best = solver.lastSolution();
best.restoreBest();
int value = 0;
for (Enumeration iv = best.getModel().assignedVariables().elements(); iv.hasMoreElements();) {
value += (int) ((Variable) iv.nextElement()).getAssignment().toDouble();