Modeling by nonzeros
Java methods support modeling by nonzeros in this example of a Java application of CPLEX.
The last of the three functions for building the model is populateByNonzero .
This function creates the variables with only their bounds, and the empty constraints, that is,
ranged constraints with only lower and upper bound but with no expression. Only after that are the
expressions constructed over these existing variables, in a manner similar to the ones already
described; they are installed in the existing constraints with the method
IloRange.setExpr(ilog.concert.IloNumExpr
expr).