Omitting Values in a Data Section

You can omit values in a data statement to indicate you don't want to fix the values of particular members. For instance, suppose you have a manufacturing company and you need to do some capacity planning for the next 5 years. Furthermore, suppose it takes some time to boost capacity. As such, it would be impossible to increase capacity over the next two years. In such a case, you might do something like the following:

SETS:

  YEARS /1..5/: CAPACITY;

ENDSETS

DATA:

  CAPACITY = 34, 34, , , ;

ENDDATA

We have set CAPACITY for the first two years to 34, but have omitted values for the last three years. LINGO will assume, therefore, it is free to determine the values for CAPACITY in the last three years.

Note:You must use commas when omitting values. If you do not use the commas, LINGO will think you did not enter the correct number of values for the attribute, which will trigger an error message.