| > Discrete Optimization > Food Manufacturing 2: Using Logical Constraints > Representing the Data | 
| Representing the Data | INDEX  PREVIOUS
    
    NEXT | 
To represent the problem accurately, there are several questions to consider:
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:
That matrix could equally well be filled by data read from a file in a large-scale application.
| Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |