> Discrete Optimization > Cutting Stock: Column Generation > Developing the Model: Building and Modifying

In this problem, an initial model cutOpt is built first. Later, through its modifications, another model patGen is built to generate the new columns.

The first model cutOpt, an instance of IloModel, is declared like this:

IloModel cutOpt (env);

An array of numeric variables (an instance of IloNumVarArray) Cut[j] is declared to represent the decision variables in the model. The index j indicates a pattern using the widths found in the array size. Consequently, a given variable Cut[j] in the solution will be the number of rolls to cut according to pattern j.

As a model for this problem is built, there will be opportunities to demonstrate to you how to modify a model by adding extractable objects, adding columns, changing coefficients in an objective function, and changing the type of a variable. When you modify a model by means of the methods of extractable objects, Concert Technology notifies the algorithms (instances of subclasses of IloAlgorithm, such as IloCplex or IloSolver) about the modification. (For more about that idea, see the concept of Notification in the Concert Technology Reference Manual.)

When IloCplex, for example, is notified about a change in an extractable object that it has extracted, it maintains as much of the current solution information as it can accurately and reasonably. Other parts of the ILOG CPLEX User's Manual offer more detail about how the algorithm responds to modifications in the model.