try{
if (solver.isFeasible()) {
// Solution sol = solutions.get(0);
for (String s : varMap.keySet()) {
// System.out.println(s+ ": "+varMap.get(s));
IntDomainVar v = solver.getVar(varMap.get(s));
if (v != null)
res.put(s, factor * v.getVal());
else
res.put(s, 0.0);
}
return res;
}