ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Using Logical Constraints: Food Manufacture 2 > Representing the Data > What Is Known?

In this particular example, the planning period is six months, and there are five kinds of oil to be blended. Those details are represented as constants, like this:

const IloInt nbMonths   = 6;
const IloInt nbProducts = 5;

The five kinds of oil (vegetable and non vegetable) are represented by an enumeration, like this:

typedef enum { v1, v2, o1, o2, o3 } Product;

The varying price of the five kinds of oil over the six-month planning period is represented in a numeric matrix, like this:

      NumMatrix cost(env, nbMonths);
      cost[0]=IloNumArray(env, nbProducts, 110.0, 120.0, 130.0, 110.0, 115.0);
      cost[1]=IloNumArray(env, nbProducts, 130.0, 130.0, 110.0,  90.0, 115.0);
      cost[2]=IloNumArray(env, nbProducts, 110.0, 140.0, 130.0, 100.0,  95.0);
      cost[3]=IloNumArray(env, nbProducts, 120.0, 110.0, 120.0, 120.0, 125.0);
      cost[4]=IloNumArray(env, nbProducts, 100.0, 120.0, 150.0, 110.0, 105.0);
      cost[5]=IloNumArray(env, nbProducts,  90.0, 100.0, 140.0,  80.0, 135.0);

That matrix could equally well be filled by data read from a file in a large-scale application.