An interesting feature of this model is all of the data is imported from an external text file using the @FILE function (for more information on @FILE, see Interfacing with External Files). More specifically, @FILE reads all the data from a single file, MRP.LDT, that is pictured below:

! Parts list;

  U, ! Unicycles;

  B, ! Bicycles;

  T, ! Tandems;

  S, ! Seats;

  W, ! Wheels;

  C, ! Chains;

  H, ! Hubs;

  P, ! sPokes;

  L~ ! Links;

 

!  The set of periods;

  1..9 ~

 

! The parent-child use relationships

 (i.e., Unicycles  use Seats, etc.)

 The number of child parts required

 in each parent- child relationship,

 respectively (i.e, Unicycles use 1

 Seat, Wheels use 36 sPokes, etc.);

U S 1,  U W 1,  B S 1,  B W 2,  B C 1,

T S 2,  T W 2,  T C 2,  W H 1,  W P 36,

C L 84~

 

! The lead times for each part;

  1, 2, 1, 1, 3, 1, 1, 2, 2~

 

! The external demands or master schedule;

!             Time period;

!         1  2  3  4  5  6  7  8  9;

  ! U;   0, 0, 0, 0, 0, 0, 0,10, 0,

  ! B;   0, 0, 0, 0, 0, 0, 0, 0,20,

  ! T;   0, 0, 0, 0, 0, 0, 0, 0,20,

  ! S;   0, 0, 0, 0, 0, 0, 0, 0, 0,

  ! W;   0, 0, 0, 0, 0, 0, 0, 0, 0,

  ! C;   0, 0, 0, 0, 0, 0, 0, 0, 0,

  ! H;   0, 0, 0, 0, 0, 0, 0, 0, 0,

  ! P;   0, 0, 0, 0, 0, 0, 0, 0, 0,

  ! L;   0, 0, 0, 0, 0, 0, 0, 0, 0

File: MRP.LDT

You will recall the tilde (~) is LINGO's end-of-record mark. Whenever a tilde is encountered in a data file, LINGO stops reading input from the data file and begins reading where it left off in the model file.