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

The application in this example starts with an initial model cutOpt and through modifications eventually builds a second model patGen. This pattern generator patGen (in contrast to cutOpt) includes integer variables in the array Use. That array appears in the only constraint added to patGen: a scalar product making sure that the patterns used do not exceed the width of rolls. The application also adds a rudimentary objective function to patGen. This objective initially consists of only the constant 1 (one). The rest of the objective function depends on the solution found with the initial model cutOpt. The application will build that objective function as that information is computed. Here, in short, is patGen:

    IloModel patGen (env);

    IloObjective ReducedCost = IloAdd(patGen, IloMinimize(env, 1));
    IloNumVarArray Use(env, nWdth, 0, IloInfinity, ILOINT);
    patGen.add(IloScalProd(size, Use) <= rollWidth);