Modifying an optimization problem

The sample emphasizes modification with respect to extraction and notification.

After the simple model is solved and the resulting objective value is passed to the output channel cplex.out, the remaining constraints are created and added to the model. At this time the model has already been extracted to the object cplex. As a consequence, whenever the model is modified by adding a constraint, this addition is immediately reflected in the object cplex via notification.