}
// generate an optimality cut
IloRange r = (IloRange) master.le(master.diff(expr, flowCost), 0);
//test the cut against the current solution
IloLinearNumExpr rexpr = (IloLinearNumExpr) r.getExpr();
IloLinearNumExprIterator it = rexpr.linearIterator();
double lhs = 0;
double rhs = r.getUB();
while (it.hasNext()) {
IloNumVar v = it.nextNumVar();
lhs += it.getValue()*msol.get(v);