374. INVALID DATA FRAME USAGE.

The data frame style of input allows us to enter the first dimension of a two-dimensional set along with an attribute of the same two-dimensional set in a single data statement.  In the example below, ROUTES is a two-dimensional set and one of its attributes is COST.  The first dimension of ROUTES is the primitive set WAREHOUSE.  Both the WAREHOUSE set and the COST attribute are initialized in the data section with a data frame:

! A 3 Warehouse, 4 Customer

  Transportation Problem;

SETS:

  WAREHOUSE    : CAPACITY;

  CUSTOMER     : DEMAND;

  ROUTES( WAREHOUSE, CUSTOMER) : COST, VOLUME;

ENDSETS

 

DATA:

  CUSTOMER = C1 C2 C3 C4;

 

  ! Here we use a data frame to input

    both WAREHOUSE and COST;

  WAREHOUSE, COST =

         W1   6  2  6  7

         W2   4  9  5  3

         W3   8  8  1  5

  ;

 

  CAPACITY =   30, 25, 21;

  DEMAND   = 15 17 22 12;

ENDDATA