home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / math / lindo.zip / TEST5.DAT < prev   
Text File  |  1991-07-27  |  713b  |  25 lines

  1. bat
  2. !
  3. !  We want to decide how to place 7 songs on a record album so as to
  4. !  maximize the number of songs on the "short" side of the album.  The
  5. !  short side must contain no more than half the total music time. The
  6. !  times by song are:
  7. !
  8. !     SONG:    1   2   3   4   5   6   7
  9. !     TIME:    2   5   2   2   7   2   2
  10. !
  11. !  Y<i> = 1 if song <i> is assigned to short side, else 1
  12. !
  13.  MAX    Y1 +   Y2 +   Y3 +   Y4 +   Y5 +   Y6 +   Y7
  14.  SUBJECT TO
  15.       2 Y1 + 5 Y2 + 2 Y3 + 2 Y4 + 7 Y5 + 2 Y6 + 2 Y7 <= 11
  16.  END
  17. !
  18. !  The Y's must be 0/1:
  19. INT 7
  20. !
  21. ! Type "GO" to solve the model, and "SOLU" to get a solution report.
  22. ! Songs 1, 3, 4, 6, and 7 should appear on the short side.
  23.  bat
  24.  leave
  25.