Jsun Yui Wong
"These tests suggest that LB1 is adequate for problems with up to 35 departments. For larger problems, the linear programs become too large and too difficult to solve with the currently available LP solvers" (Amaral 2009). "Our computational results suggest that this approach can routinely obtain optimal layouts for SRFLPs with up to 25 facilities in a few hours, and in several dozen hours for SRFLPs with up to 30 facilities" (Anjos and Vannelli 2008).
The computer program listed below tries to solve a case for 37 departments. Used in line 62 through line 71, the flows are from Skorin-Kapov (1990, p. 40). The department lengths are almost all the lengths on page 824 of Simmons (1969)--2, 3, 4, 5, 6, 3, 7, 4, 5, 6, 5, 4, 5, 4, 6, 5, 2, 8, ,,,, 7, 6, 3, 9. In order to have integer locations, these Simmons' lengths were multiplied by two to give the minimum centroid-to-centroid distances of line 32 through line 48 below.
The computer program below is a heuristic procedure. To mitigate this shortcoming, one can use the multi-computer method that uses a number of personal computers running simultaneously and independently. To save human labor, each computer runs a very slightly different computer program. For example, if there are three computers, one computer can run with 126 IMAR=10+RND*5000, the second can run with 126 IMAR=10+RND*6000, and the third can run with 126 IMAR=10+RND*7000. This method is illustrated below.
0 DEFINT A-Z
2 DEFSNG S,P,M,T
5 DIM X(466),A(466),L(466),K(466),P(466),B(466),S(466),J(466)
7 DIM TM(44,44),HR(44,44),HS(44,44)
21 FOR IW=1 TO 36
23 FOR JW=IW+1 TO 37
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
32 DATA 5,6,7,8,5,9,6,7,8,7,6,7,6,8,7,4,10,11,9,5,6,8,10,11,7,9,8,10,9,7,8,10,9,8,5,11
33 DATA 7,8,9,6,10,7,8,9,8,7,8,7,9,8,5,11,12,10,6,7,9,11,12,8,10,9,11,10,8,9,11,10,9,6,12
34 DATA 9,10,7,11,8,9,10,9,8,9,8,10,9,6,12,13,11,7,8,10,12,13,9,11,10,12,11,9,10,12,11,10,7,13
35 DATA 11,8,12,9,10,11,10,9,10,9,11,10,7,13,14,12,8,9,11,13,14,10,12,11,13,12,10,11,13,12,11,8,14
36 DATA 9,13,10,11,12,11,10,11,10,12,11,8,14,15,13,9,10,12,14,15,10,13,12,14,13,11,12,14,13,12,9,15
37 DATA 10,7,8,9,8,7,8,7,9,8,5,11,12,10,6,7,9,11,12,8,10,9,11,10,8,9,11,10,9,6,12
38 DATA 11,12,13,12,11,12,11,13,12,9,15,16,14,10,11,13,15,16,12,14,13,15,14,12,13,15,14,13,10,16
39 DATA 9,10,9,8,9,8,10,9,6,12,13,11,7,8,10,12,13,9,11,10,12,11,9,10,12,11,10,9,13,11,10,9,10,9,11,10,7,13,14,12,8,9,11,13,14,10,12,11,13,12,10,11,13,12,11,8,14
40 DATA 11,10,11,10,12,11,8,14,15,13,9,10,12,14,15,10,13,12,14,13,11,12,14,13,12,9,15,9,10,9,11,10,7,13,14,12,8,9,11,13,14,10,12,11,13,12,10,11,13,12,11,8,14
41 DATA 9,8,10,9,6,12,13,11,7,8,10,12,13,9,11,10,12,11,9,10,12,11,10,7,13,9,11,10,7,13,14,12,8,9,11,13,14,10,12,11,13,12,10,11,13,12,11,8,14
42 DATA 10,9,6,12,13,11,7,8,10,12,13,9,11,10,12,11,9,10,12,11,10,7,13,11,8,14,15,13,9,10,12,14,15,11,13,12,14,13,11,12,14,13,12,9,15
43 DATA 7,13,14,12,8,9,11,13,14,10,12,11,13,12,10,11,13,12,11,8,14,10,11,9,5,6,8,10,11,7,9,8,10,9,7,8,10,9,8,5,11
44 DATA 17,15,11,12,14,16,17,13,15,14,16,15,13,14,16,15,14,11,17,16,12,13,15,17,18,14,16,15,17,16,14,15,17,16,15,12,18
45 DATA 10,11,13,15,16,12,14,13,15,14,12,13,15,14,13,10,16,7,9,11,12,8,10,9,11,10,8,9,11,10,9,6,12
46 DATA 10,12,13,9,11,10,12,11,9,10,12,11,10,9,13,14,15,11,13,12,14,13,11,12,14,13,12,9,15,17,13,15,14,16,15,13,14,16,15,14,11,17
47 DATA 14,16,15,17,16,14,15,17,16,15,12,18,12,11,13,12,10,11,13,12,11,8,14,13,15,14,12,13,15,14,13,10,16,14,13,11,12,14,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0,1,2,0,2
68 DATA 0,0,0,5,5,2,5,0,5,1,5,1,5,0,5,2,0,5,5,2,0,4,0,0,0,0,0,2,2,0,0,5,2,0,5,1,0,0,5,1,1,0,3,5,0,2,1,5,1,5,6,0,3,5,0,5,5,5,0,0,2,2,6,10,0,2,0,2,2,10
69 DATA 2,0,5,1,0,1,0,0,0,3,2,10,4,5,5,2,5,1,1,2,5,0,0,3,1,2,0,2,10,10,5,2,1,2,1,0,10,2,5,0,0,2,0,4,4,1,1,0,5,1,5,10,1,0,0,5,5,5,2,5,2,10,0,2,0,2,4,0,2,5
70 DATA 5,2,0,2,0,2,0,5,2,0,2,1,5,10,6,2,10,0,2,0,0,5,3,5,2,0,10,10,1,4,0,5,4,1,0,2,2,1,1,0,2,10,5,0,1,5,0,0,10,2,5,2,0,2,3,0,5,0,3,2,0,3,2,5,0,10,2,0,5,5
71 DATA 0,0,0,3,6,5,0,5,1,0,5,4,10,5,1,2,0,5,2,0,2,2,4,1,2,0,2,5,0,0,2,1,0,5,2,0
81 FOR JJJJ=-32000 TO 32000
82 RANDOMIZE JJJJ
83 M=-9999999!
85 FOR II=1 TO 37
88 A(II)=RND*499
89 NEXT II
126 IMAR=10+RND*5000
128 FOR I=1 TO IMAR
129 FOR KK=1 TO 37
131 X(KK)=A(KK)
132 NEXT KK
223 IJL=1+FIX(RND*37)
234 X(IJL)=RND*499
533 FOR IX=1 TO 36
534 FOR JX=IX+1 TO 37
543 IF ABS(X(IX)-X(JX))-HR(IX,JX)<-.0001 THEN TM(IX,JX)=99999! ELSE TM(IX,JX)=0
545 NEXT JX
547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 36
1614 FOR IR2=IR1+1 TO 37
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1631 SUMUL=0
1632 FOR IS1=1 TO 36
1634 FOR IS2=IS1+1 TO 37
1636 SUMUL=SUMUL+HS(IS1,IS2)*ABS(X(IS1)-X(IS2))
1637 NEXT IS2
1639 NEXT IS1
1645 P=-SUMUL-SUMTL
1647 PZZZ=-SUMUL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 37
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1663 MM=PZZZ
1666 GOTO 128
1670 NEXT I
1890 IF M>-220000! THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1924 PRINT A(36),A(37),MM,M,JJJJ
1999 NEXT JJJJ
The BASIC computer program above was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solution produced during the first 20 hours of running is presented below.
192 329 153 122 367
257 93 228 60 163
70 216 185 250 17
175 222 340 397 239
146 322 266 45 287
313 415 302 135 380
80 29 109 4 354
275 203 -208555 -208555 -31937
The best candidate solution from the computer running with 126 IMAR=10+RND*6000 is as follows:
242 179 248 114 392
347 406 354 279 152
316 270 58 300 290
171 325 421 197 259
307 162 234 137 462
211 89 103 366 46
124 380 74 336 222
185 438 -210411 -210411 -31980
The best candidate solution from the computer running with 126 IMAR=10+RND*7000 is as follows:
275 219 234 294 244
334 97 341 326 159
210 262 148 254 137
70 167 354 56 39
270 226 380 413 430
174 82 199 123 186
110 368 313 25 283
302 395 -204529 -204529 -31902
Interpreted in accordance with line 1912 through line 1924, these three candidate solutions were produced during the first 20 hours of simultaneous running on three personal computers each with speed of about 2.66 GHz. and with the IBM basica/D interpreter, which is not a compiler.
References
Amaral, A. R. S., "A New Lower Bound for the Single Row Facility Layout Problem," Discrete Applied Mathematics 157, 183-190 (2009).
Anjos, M. F., and A. Vannelli, "Computing Globally Optimal Solutions for Single-Row Layout Problems Using Semidefinite Programming and Cutting Planes," INFORMS Journal on Computing 20, 611-617 (2008).
Microsoft Corp. BASIC. Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.
Simmons, D. M., "One-Dimensional Space Allocation: an Ordering Algorithm," Operations Research 17, 812-826 (1969).
Skorin-Kapov, J., "Tabu Search Applied to the Quadratic Assignment Problem," ORSA Journal on Computing 2, 33-45 (1990).
Thursday, December 3, 2009
Thursday, November 26, 2009
A Computer Program for Scheduling 107 Activities among Eight Facilities
Jsun Yui Wong
The computer program listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 263 for a case of scheduling 107 activities among eight facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 106 and activity 107 are 1, 4, 1, ..., and 9, respectively. These data were not selected randomly or scientifically; most of the numbers in line 101 below were obtained from Simmons (1969).
0 DEFINT A-Z
4 DIM X(107),A(107)
7 DIM TM(107,107),HR(107,107)
21 FOR IW=1 TO 106
23 FOR JW=IW+1 TO 107
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0,1,2,4,4,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,4,3,4
103 DATA 1,9,3,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,5,6,3,4,2,7,4,2,3,4,3,2
104 DATA 4,3,1,7,7,1,0,4,2,3,7,4,3,0,6,3,2,2,3,2,3,5,0,6,5,3,5,4,2,9,2,7,9,3,7
105 DATA 3,4,5,7,3,5,0,1,2,5,5,2,3,0,6,3,2,2,3,4,0,4,0,2,6,3,5,2,6,8,2,3,4,3,2
106 DATA 9,3,1,7,3,4,0,1,2,5,5,4,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0,6,0,6,7,6,7,6,7,9,6,7,3,7,3
255 DATA 2,4,1,4,2,0,1,6,4,5,0,4,7,8,6,3,2,6,8,4,8,1,6,6,5,2,5,2,7,6,2,5,4,7,5
256 DATA 7,4,4,4,2,3,4,5,2,2,5,3,7,3,6,6,2,7,2,4,0,5,5,5,4,2,5,2,5,9,5,5,6,2,4
257 DATA 2,2,1,2,2,2,4,7,4,4,4,6,6,6,3,3,3,7,2,3,3,1,0,6,7,3,7,2,7,3,2,7,6,7,2
258 DATA 2,4,2,4,4,0,1,4,2,2,4,4,7,3,5,3,2,5,2,4,1,1,0,6,7,2,7,2,7,9,2,7,1,7,2
259 DATA 9,3,1,3,2,3,4,9,2,2,0,5,5,3,6,3,2,7,2,2,0,2,2,6,7,2,2,9,7,9,2,7,6,2,5
260 DATA 7,4,4,4,2,0,5,7,2,5,5,4,7,3,7,3,2,8,8,4,0,1,8,6,8,2,7,2,8,8,2,7,6,7,0
261 DATA 5,4,1,4,2,0,1,5,2,2,0,4,7,8,6,3,2,7,2,8,5,3,0,6,7,4,6,4,7,4,2,7,6,7,4
262 DATA 2,4,1,4,2,0,1,7,3,2,0,4,7,4,7,3,9,7,2,4,0,1,0,6,4,2,7,2,4,4,2,7,6,4,8
263 DATA 9
1065 FOR JJJJ=-32000 TO 32000
1074 RANDOMIZE JJJJ
1076 M=-32000
1085 FOR I=1 TO 107
1088 A(I)=FIX(RND*7)
1089 NEXT I
1126 IMAR=10+FIX(RND*2000)
1128 FOR I=1 TO IMAR
1129 FOR KK=1 TO 107
1131 X(KK)=A(KK)
1132 NEXT KK
1223 IJL=1+FIX(RND*107)
1234 X(IJL)=FIX(RND*8)
1533 FOR IX=1 TO 106
1534 FOR JX=IX+1 TO 107
1542 IF X(IX)=X(JX) THEN TM(IX,JX)=HR(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 106
1614 FOR IR2=IR1+1 TO 107
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 107
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-1330 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),A(79),A(80)
1928 PRINT A(81),A(82),A(83),A(84),A(85)
1929 PRINT A(86),A(87),A(88),A(89),A(90)
1930 PRINT A(91),A(92),A(93),A(94),A(95)
1931 PRINT A(96),A(97),A(98),A(99),A(100)
1932 PRINT A(101),A(102),A(103),A(104),A(105)
1937 PRINT A(106),A(107),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions produced during the first 20 hours of running are presented below. Only the candidate solution at JJJJ=-31926 is presented in full; each of the other candidate solutions below is briefly presented with its line
1937.
1 1 6 3 5
7 2 1 1 6
7 2 3 4 1
4 2 7 6 7
0 4 1 4 3
5 7 6 1 6
2 7 5 0 5
1 2 6 0 6
7 2 1 2 6
7 2 3 7 1
0 0 7 4 3
5 0 6 4 7
4 4 6 1 6
4 4 5 2 3
0 2 5 2 3
0 0 1 6 6
3 0 3 7 1
3 4 3 7 7
5 0 5 2 6
5 0 5 1 5
4 4 5 7 3
1 4 -1315 -31926
4 1 -1328 -31908
7 1 -1328 -31897
7 5 -1326 -31838
4 3 -1320 -31681
Interpreted in accordance with line 1912 through line 1937, these candidate solutions were produced during the first 20 hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
References
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
Microsoft Corp. BASIC. Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.
Simmons, D. M., "One-Dimensional Space Allocation: an Ordering Algorithm," Operations Research 17, 812-826 (1969).
The computer program listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 263 for a case of scheduling 107 activities among eight facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 106 and activity 107 are 1, 4, 1, ..., and 9, respectively. These data were not selected randomly or scientifically; most of the numbers in line 101 below were obtained from Simmons (1969).
0 DEFINT A-Z
4 DIM X(107),A(107)
7 DIM TM(107,107),HR(107,107)
21 FOR IW=1 TO 106
23 FOR JW=IW+1 TO 107
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0,1,2,4,4,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,4,3,4
103 DATA 1,9,3,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,5,6,3,4,2,7,4,2,3,4,3,2
104 DATA 4,3,1,7,7,1,0,4,2,3,7,4,3,0,6,3,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X+1 TO 107
1542 IF X(IX)=X(JX) THEN TM(IX,JX)=HR(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 106
1614 FOR IR2=IR1+1 TO 107
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 107
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-1330 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),A(79),A(80)
1928 PRINT A(81),A(82),A(83),A(84),A(85)
1929 PRINT A(86),A(87),A(88),A(89),A(90)
1930 PRINT A(91),A(92),A(93),A(94),A(95)
1931 PRINT A(96),A(97),A(98),A(99),A(100)
1932 PRINT A(101),A(102),A(103),A(104),A(105)
1937 PRINT A(106),A(107),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions produced during the first 20 hours of running are presented below. Only the candidate solution at JJJJ=-31926 is presented in full; each of the other candidate solutions below is briefly presented with its line
1937.
1 1 6 3 5
7 2 1 1 6
7 2 3 4 1
4 2 7 6 7
0 4 1 4 3
5 7 6 1 6
2 7 5 0 5
1 2 6 0 6
7 2 1 2 6
7 2 3 7 1
0 0 7 4 3
5 0 6 4 7
4 4 6 1 6
4 4 5 2 3
0 2 5 2 3
0 0 1 6 6
3 0 3 7 1
3 4 3 7 7
5 0 5 2 6
5 0 5 1 5
4 4 5 7 3
1 4 -1315 -31926
4 1 -1328 -31908
7 1 -1328 -31897
7 5 -1326 -31838
4 3 -1320 -31681
Interpreted in accordance with line 1912 through line 1937, these candidate solutions were produced during the first 20 hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
References
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
Microsoft Corp. BASIC. Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.
Simmons, D. M., "One-Dimensional Space Allocation: an Ordering Algorithm," Operations Research 17, 812-826 (1969).
Tuesday, November 24, 2009
A Computer Program for Scheduling 100 Activities among Seven Facilities
Jsun Yui Wong
The computer program listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 242 for a case of scheduling 100 activities among seven facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 99 and activity 100 are
1, 4, 1, ..., and 9, respectively. These data were not selected randomly or scientifically.
0 DEFINT A-Z
4 DIM X(100),A(100)
7 DIM TM(100,100),HR(100,100)
21 FOR IW=1 TO 99
23 FOR JW=IW+1 TO 100
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0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
237 DATA 4,5,1,4,2,0,5,1,2,2,4,4,3,3,6,3,2,4,2,4,0,1,0,4,6,2,2,2,7,9,2,4,6,3,5
238 DATA 5,3,4,4,2,0,1,3,2,4,0,4,3,3,6,3,2,3,2,4,0,9,0,4,6,2,4,2,7,9,2,7,6,3,9
239 DATA 4,6,1,4,2,0,1,4,2,4,0,4,6,3,6,3,2,4,5,4,0,1,0,6,6,2,6,2,7,9,2,7,5,3,6
240 DATA 5,4,6,5,2,0,1,6,2,4,0,4,3,4,6,3,2,6,2,4,0,1,0,7,6,2,2,2,7,9,2,7,6,3,0
241 DATA 7,4,1,4,2,0,1,7,2,2,0,4,7,3,6,3,2,7,2,4,0,1,0,6,7,2,7,2,7,9,2,7,6,7,5
242 DATA 9,7,1,4,5,0,1,1,7,2,0,4,3,3,9
1065 FOR JJJJ=-32000 TO 32000
1074 RANDOMIZE JJJJ
1076 M=-32000
1085 FOR I=1 TO 100
1088 A(I)=FIX(RND*7)
1089 NEXT I
1126 IMAR=10+FIX(RND*2000)
1128 FOR I=1 TO IMAR
1129 FOR KK=1 TO 100
1131 X(KK)=A(KK)
1132 NEXT KK
1223 IJL=1+FIX(RND*100)
1234 X(IJL)=FIX(RND*7)
1533 FOR IX=1 TO 99
1534 FOR JX=IX+1 TO 100
1542 IF X(IX)=X(JX) THEN TM(IX,JX)=HR(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 99
1614 FOR IR2=IR1+1 TO 100
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 100
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-1300 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),A(79),A(80)
1928 PRINT A(81),A(82),A(83),A(84),A(85)
1929 PRINT A(86),A(87),A(88),A(89),A(90)
1930 PRINT A(91),A(92),A(93),A(94),A(95)
1931 PRINT A(96),A(97),A(98),A(99),A(100)
1937 PRINT M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions produced in 20 hours of running are presented below. Only the candidate solution at JJJJ=-31786 is presented in full; each of the other candidate solutions below is briefly presented with its line
1937.
4 4 5 5 6
0 2 4 4 3
0 3 0 3 4
6 2 0 6 0
5 4 6 3 5
3 1 5 4 5
3 1 5 0 3
4 2 5 5 2
2 2 6 3 2
2 3 0 6 4
2 3 0 6 0
1 4 6 5 0
1 1 2 4 1
2 1 0 0 3
4 3 5 5 1
1 0 4 2 6
0 5 6 3 4
3 6 6 2 1
1 6 1 4 0
1 1 0 4 5
-1261 -31786
-1292 -31592
-1299 -31580
-1292 -31485
-1276 -31469
Interpreted in accordance with line 1912 through line 1937, these candidate solutions were produced in 20 hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
Reference
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
The computer program listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 242 for a case of scheduling 100 activities among seven facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 99 and activity 100 are
1, 4, 1, ..., and 9, respectively. These data were not selected randomly or scientifically.
0 DEFINT A-Z
4 DIM X(100),A(100)
7 DIM TM(100,100),HR(100,100)
21 FOR IW=1 TO 99
23 FOR JW=IW+1 TO 100
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0,1,2,4,4,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,4,3,4
103 DATA 1,9,3,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,5,6,3,4,2,7,4,2,3,4,3,2
104 DATA 4,3,1,7,7,1,0,4,2,3,7,4,3,0,6,3,2,2,3,2,3,5,0,6,5,3,5,4,2,9,2,7,9,3,7
105 DATA 3,4,5,7,3,5,0,1,2,5,5,2,3,0,6,3,2,2,3,4,0,4,0,2,6,3,5,2,6,8,2,3,4,3,2
106 DATA 9,3,1,7,3,4,0,1,2,5,5,4,3,0,6,3,2,2,8,4,0,1,0,6,2,3,5,2,7,1,2,7,8,3,2
107 DATA 7,4,1,0,3,5,0,1,2,4,5,4,3,0,6,3,2,2,3,4,1,1,0,6,5,5,8,2,7,9,2,7,8,3,6
108 DATA 2,2,3,7,3,5,3,3,2,5,5,4,3,3,6,3,2,2,3,4,0,3,0,2,6,3,5,2,3,8,2,7,8,3,4
109 DATA 5,4,1,6,5,7,0,1,2,5,5,4,3,0,6,3,2,2,3,4,2,1,2,6,6,3,5,2,7,8,2,7,2,3,5
110 DATA 2,4,1,7,3,5,1,1,2,4,2,4,3,0,5,3,2,2,3,4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1 TO 99
1534 FOR JX=IX+1 TO 100
1542 IF X(IX)=X(JX) THEN TM(IX,JX)=HR(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 99
1614 FOR IR2=IR1+1 TO 100
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 100
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-1300 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),A(79),A(80)
1928 PRINT A(81),A(82),A(83),A(84),A(85)
1929 PRINT A(86),A(87),A(88),A(89),A(90)
1930 PRINT A(91),A(92),A(93),A(94),A(95)
1931 PRINT A(96),A(97),A(98),A(99),A(100)
1937 PRINT M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions produced in 20 hours of running are presented below. Only the candidate solution at JJJJ=-31786 is presented in full; each of the other candidate solutions below is briefly presented with its line
1937.
4 4 5 5 6
0 2 4 4 3
0 3 0 3 4
6 2 0 6 0
5 4 6 3 5
3 1 5 4 5
3 1 5 0 3
4 2 5 5 2
2 2 6 3 2
2 3 0 6 4
2 3 0 6 0
1 4 6 5 0
1 1 2 4 1
2 1 0 0 3
4 3 5 5 1
1 0 4 2 6
0 5 6 3 4
3 6 6 2 1
1 6 1 4 0
1 1 0 4 5
-1261 -31786
-1292 -31592
-1299 -31580
-1292 -31485
-1276 -31469
Interpreted in accordance with line 1912 through line 1937, these candidate solutions were produced in 20 hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
Reference
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
Monday, November 23, 2009
An IP Computer Program Applied to a One-Dimensional Space Allocation Problem, Second Edition
An Integer-Programming Computer Program Applied to a One-Dimensional Space
Allocation Problem, Second Edition
Jsun Yui Wong
The computer program listed below seeks to solve Problem S8 of Amaral (2006),
which is a problem from Simmons (1969). In order to have integer locations, the
department lengths used in the computer program below have been made twice as
long as the given department lengths.
0 DEFINT A-Z
15 DIM X(11),A(11)
16 DIM TM(24,24),HR(24,24),HS(24,24)
21 FOR IW=1 TO 7
23 FOR JW=IW+1 TO 8
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
32 DATA 5,6,7,8,5,9,6,7,8,9,6,10,7,9,10,7,11,8,11,8,12,9,9,13,10,10,7,11
41 FOR IZ=1 TO 7
43 FOR JZ=IZ+1 TO 8
46 READ HS(IZ,JZ)
48 NEXT JZ
49 NEXT IZ
52 DATA 6,4,1,7,3,5,0,1,2,5,2,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2
65 FOR JJJJ=-32000 TO 32000
74 RANDOMIZE JJJJ
76 M=-32000
85 FOR II=1 TO 8
88 A(II)=RND*99
89 NEXT II
126 IMAR=10+FIX(RND*2000)
128 FOR I=1 TO IMAR
129 FOR KK=1 TO 8
131 X(KK)=A(KK)
132 NEXT KK
223 IJL=1+FIX(RND*8)
234 X(IJL)=RND*99
533 FOR IX=1 TO 7
534 FOR JX=IX+1 TO 8
543 IF ABS(X(IX)-X(JX))-HR(IX,JX)<-.0001 THEN TM(IX,JX)=1000 ELSE TM(IX,JX)=0
545 NEXT JX
547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 7
1614 FOR IR2=IR1+1 TO 8
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1631 SUMUL=0
1632 FOR IS1=1 TO 7
1634 FOR IS2=IS1+1 TO 8
1636 SUMUL=SUMUL+HS(IS1,IS2)*ABS(X(IS1)-X(IS2))
1637 NEXT IS2
1639 NEXT IS1
1645 P=-SUMUL-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 8
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 128
1670 NEXT I
1890 IF M>-1605 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1914 PRINT A(6),A(7),A(8),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions through JJJJ=-21042 are presented below. What immediately follows is a manual copy from the computer screen.
67 72 49 26 59
34 82 41 -1602 -31520
38 33 56 79 46
71 23 64 -1602 -25855
60 65 42 19 52
27 75 34 -1602 -25642
19 14 37 60 27
52 4 45 -1602 -22630
54 59 36 13 46
21 69 28 -1602 -22263
62 67 44 21 54
29 77 36 -1602 -22006
75 80 57 34 67
42 90 49 -1602 -21959
70 75 52 29 62
37 85 44 -1602 -21042
1602 is optimal. Interpreted in accordance with line 1912 and line 1914, the output through JJJJ=-21042 was produced in three hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter.
References
Amaral, A. R. S., "On the exact solution of a facility layout problem," European Journal of Operational Research 173, 508-518 (2006).
Simmons, D. M., "One-dimensional space allocation: an ordering algorithm," Operations Research 17, 812-826 (1969).
Allocation Problem, Second Edition
Jsun Yui Wong
The computer program listed below seeks to solve Problem S8 of Amaral (2006),
which is a problem from Simmons (1969). In order to have integer locations, the
department lengths used in the computer program below have been made twice as
long as the given department lengths.
0 DEFINT A-Z
15 DIM X(11),A(11)
16 DIM TM(24,24),HR(24,24),HS(24,24)
21 FOR IW=1 TO 7
23 FOR JW=IW+1 TO 8
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
32 DATA 5,6,7,8,5,9,6,7,8,9,6,10,7,9,10,7,11,8,11,8,12,9,9,13,10,10,7,11
41 FOR IZ=1 TO 7
43 FOR JZ=IZ+1 TO 8
46 READ HS(IZ,JZ)
48 NEXT JZ
49 NEXT IZ
52 DATA 6,4,1,7,3,5,0,1,2,5,2,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2
65 FOR JJJJ=-32000 TO 32000
74 RANDOMIZE JJJJ
76 M=-32000
85 FOR II=1 TO 8
88 A(II)=RND*99
89 NEXT II
126 IMAR=10+FIX(RND*2000)
128 FOR I=1 TO IMAR
129 FOR KK=1 TO 8
131 X(KK)=A(KK)
132 NEXT KK
223 IJL=1+FIX(RND*8)
234 X(IJL)=RND*99
533 FOR IX=1 TO 7
534 FOR JX=IX+1 TO 8
543 IF ABS(X(IX)-X(JX))-HR(IX,JX)<-.0001 THEN TM(IX,JX)=1000 ELSE TM(IX,JX)=0
545 NEXT JX
547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 7
1614 FOR IR2=IR1+1 TO 8
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1631 SUMUL=0
1632 FOR IS1=1 TO 7
1634 FOR IS2=IS1+1 TO 8
1636 SUMUL=SUMUL+HS(IS1,IS2)*ABS(X(IS1)-X(IS2))
1637 NEXT IS2
1639 NEXT IS1
1645 P=-SUMUL-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 8
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 128
1670 NEXT I
1890 IF M>-1605 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1914 PRINT A(6),A(7),A(8),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions through JJJJ=-21042 are presented below. What immediately follows is a manual copy from the computer screen.
67 72 49 26 59
34 82 41 -1602 -31520
38 33 56 79 46
71 23 64 -1602 -25855
60 65 42 19 52
27 75 34 -1602 -25642
19 14 37 60 27
52 4 45 -1602 -22630
54 59 36 13 46
21 69 28 -1602 -22263
62 67 44 21 54
29 77 36 -1602 -22006
75 80 57 34 67
42 90 49 -1602 -21959
70 75 52 29 62
37 85 44 -1602 -21042
1602 is optimal. Interpreted in accordance with line 1912 and line 1914, the output through JJJJ=-21042 was produced in three hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter.
References
Amaral, A. R. S., "On the exact solution of a facility layout problem," European Journal of Operational Research 173, 508-518 (2006).
Simmons, D. M., "One-dimensional space allocation: an ordering algorithm," Operations Research 17, 812-826 (1969).
Sunday, November 22, 2009
A Computer Program for Scheduling 90 Activities among Four Facilities
Jsun Yui Wong
The computer programn listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 215 for a case of scheduling 90 activities among four facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 89 and activity 90 are 1, 4, 1, ..., and 5, respectively. These data were not selected randomly or scientifically.
0 DEFINT A-Z
4 DIM X(90),A(90)
7 DIM TM(90,90),HR(90,90)
21 FOR IW=1 TO 89
23 FOR JW=IW+1 TO 90
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0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ATA 9,4,1,6,3,6,1,1,2,5,9,4,3,3,6,9,9,6,3,4,0,1,0,6,6,2,5,2,7,9,2,7,3,2,2
211 DATA 6,4,6,2,3,5,2,1,2,5,5,6,3,3,6,3,2,7,3,4,6,1,0,6,6,3,7,2,7,9,2,7,7,3,7
212 DATA 5,4,5,7,3,5,1,4,5,2,5,4,2,3,2,3,2,2,2,2,0,3,2,6,5,3,5,2,8,9,2,7,7,3,5
213 DATA 0,5,1,7,3,5,5,1,2,5,6,4,3,5,6,3,2,2,3,4,0,1,6,5,6,3,5,2,7,9,2,7,6,3,5
214 DATA 3,4,1,4,2,0,1,1,2,2,0,4,3,3,6,3,2,2,2,4,0,1,0,6,6,2,2,2,7,9,2,7,6,3,0
215 DATA 3,3,1,7,0,5,1,1,2,5,5,0,3,3,5
1065 FOR JJJJ=-32000 TO 32000
1074 RANDOMIZE JJJJ
1076 M=-32000
1085 FOR I=1 TO 90
1088 A(I)=FIX(RND*4)
1089 NEXT I
1126 IMAR=10+FIX(RND*2000)
1128 FOR I=1 TO IMAR
1129 FOR KK=1 TO 90
1131 X(KK)=A(KK)
1132 NEXT KK
1223 IJL=1+FIX(RND*90)
1234 X(IJL)=FIX(RND*4)
1533 FOR IX=1 TO 89
1534 FOR JX=IX+1 TO 90
1542 IF X(IX)=X(JX) THEN TM(IX,JX)=HR(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 89
1614 FOR IR2=IR1+1 TO 90
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 90
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-2400 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),A(79),A(80)
1928 PRINT A(81),A(82),A(83),A(84),A(85)
1929 PRINT A(86),A(87),A(88),A(89),A(90)
1937 PRINT M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions through JJJJ=-31765 are presented below. Only the candidate solution at JJJJ=-31948 is presented in full; each of the other candidate solutions below is briefly presented with its line 1937.
0 1 0 2 3
3 1 0 1 0
2 3 3 2 0
2 0 2 3 3
2 0 2 0 2
3 3 2 0 1
0 1 3 2 1
0 2 0 1 3
3 2 0 1 0
0 3 3 2 0
2 0 0 3 2
2 0 2 0 2
3 2 2 0 1
1 1 3 2 1
1 1 1 1 3
1 1 0 1 3
1 3 3 3 0
1 3 0 3 2
-2357 -31948
-2357 -31898
-2357 -31887
-2357 -31883
-2357 -31840
-2357 -31797
-2357 -31786
-2357 -31765
Interpreted in accordance with line 1912 through line 1937, these candidate solutions were produced in 5.5 hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
Reference
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
The computer programn listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 215 for a case of scheduling 90 activities among four facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 89 and activity 90 are 1, 4, 1, ..., and 5, respectively. These data were not selected randomly or scientifically.
0 DEFINT A-Z
4 DIM X(90),A(90)
7 DIM TM(90,90),HR(90,90)
21 FOR IW=1 TO 89
23 FOR JW=IW+1 TO 90
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0,1,2,4,4,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,4,3,4
103 DATA 1,9,3,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,5,6,3,4,2,7,4,2,3,4,3,2
104 DATA 4,3,1,7,7,1,0,4,2,3,7,4,3,0,6,3,2,2,3,2,3,5,0,6,5,3,5,4,2,9,2,7,9,3,7
105 DATA 3,4,5,7,3,5,0,1,2,5,5,2,3,0,6,3,2,2,3,4,0,4,0,2,6,3,5,2,6,8,2,3,4,3,2
106 DATA 9,3,1,7,3,4,0,1,2,5,5,4,3,0,6,3,2,2,8,4,0,1,0,6,2,3,5,2,7,1,2,7,8,3,2
107 DATA 7,4,1,0,3,5,0,1,2,4,5,4,3,0,6,3,2,2,3,4,1,1,0,6,5,5,8,2,7,9,2,7,8,3,6
108 DATA 2,2,3,7,3,5,3,3,2,5,5,4,3,3,6,3,2,2,3,4,0,3,0,2,6,3,5,2,3,8,2,7,8,3,4
109 DATA 5,4,1,6,5,7,0,1,2,5,5,4,3,0,6,3,2,2,3,4,2,1,2,6,6,3,5,2,7,8,2,7,2,3,5
110 DATA 2,4,1,7,3,5,1,1,2,4,2,4,3,0,5,3,2,2,3,4,0,1,2,6,6,4,5,9,7,9,2,7,9,3,2
111 DATA 7,3,4,4,3,5,5,1,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(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 89
1614 FOR IR2=IR1+1 TO 90
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 90
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-2400 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),A(79),A(80)
1928 PRINT A(81),A(82),A(83),A(84),A(85)
1929 PRINT A(86),A(87),A(88),A(89),A(90)
1937 PRINT M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions through JJJJ=-31765 are presented below. Only the candidate solution at JJJJ=-31948 is presented in full; each of the other candidate solutions below is briefly presented with its line 1937.
0 1 0 2 3
3 1 0 1 0
2 3 3 2 0
2 0 2 3 3
2 0 2 0 2
3 3 2 0 1
0 1 3 2 1
0 2 0 1 3
3 2 0 1 0
0 3 3 2 0
2 0 0 3 2
2 0 2 0 2
3 2 2 0 1
1 1 3 2 1
1 1 1 1 3
1 1 0 1 3
1 3 3 3 0
1 3 0 3 2
-2357 -31948
-2357 -31898
-2357 -31887
-2357 -31883
-2357 -31840
-2357 -31797
-2357 -31786
-2357 -31765
Interpreted in accordance with line 1912 through line 1937, these candidate solutions were produced in 5.5 hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
Reference
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
Saturday, November 21, 2009
A Computer Program for Scheduling 78 Activities among Four Facilities
Jsun Yui Wong
The computer programn listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 186 for a case of scheduling 78 activities among four facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 77 and activity 78 are 1, 4, 1, ..., and 6, respectively. These data were not selected randomly or scientifically.
0 DEFSNG A-Z
3 DEFINT I,J,K
4 DIM X(90),A(90)
7 DIM TM(78,78),HR(78,78)
21 FOR IW=1 TO 77
23 FOR JW=IW+1 TO 78
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0,1,2,4,4,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,4,3,4
103 DATA 1,9,3,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,5,6,3,4,2,7,4,2,3,4,3,2
104 DATA 4,3,1,7,7,1,0,4,2,3,7,4,3,0,6,3,2,2,3,2,3,5,0,6,5,3,5,4,2,9,2,7,9,3,7
105 DATA 3,4,5,7,3,5,0,1,2,5,5,2,3,0,6,3,2,2,3,4,0,4,0,2,6,3,5,2,6,8,2,3,4,3,2
106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FOR JJJJ=-32000 TO 32000
1074 RANDOMIZE JJJJ
1076 M=-1D+17
1085 FOR I=1 TO 78
1088 A(I)=FIX(RND*4)
1089 NEXT I
1126 IMAR=10+FIX(RND*2000)
1128 FOR I=1 TO IMAR
1129 FOR KK=1 TO 78
1131 X(KK)=A(KK)
1132 NEXT KK
1223 IJL=1+FIX(RND*78)
1234 X(IJL)=FIX(RND*4)
1533 FOR IX=1 TO 77
1534 FOR JX=IX+1 TO 78
1542 IF X(IX)=X(JX) THEN TM(IX,JX)=HR(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 77
1614 FOR IR2=IR1+1 TO 78
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 78
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-1700 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions produced during the first twenty hours of running are presented below. Only the candidate solution at JJJJ=-31961 is presented in full; each of the other candidate solutions below is briefly presented with its line
1927.
2 3 3 0 0
3 2 2 1 0
0 3 3 2 2
3 3 2 1 0
2 2 3 1 1
1 3 2 2 0
1 2 3 1 2
2 3 3 3 0
0 1 2 3 0
0 3 3 2 2
3 0 3 1 0
3 2 2 1 1
0 1 1 2 0
1 0 1 1 0
2 1 3 3 0
0 1 2 -1677 -31961
2 0 3 -1677 -31682
3 1 0 -1677 -31567
0 3 1 -1677 -31505
0 1 2 -1677 -31482
0 1 3 -1677 -31395
0 1 2 -1677 -31153
1 3 0 -1677 -31068
1 0 3 -1677 -30981
0 3 2 -1677 -30946
1 2 0 -1677 -30908
Interpreted in accordance with line 1912 through line 1927, these candidate solutions were produced during the first twenty hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
Reference
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
The computer programn listed below is concerned with the scheduling problem of Carlson and Nemhauser (1966). As shown in line 101 through line 186 for a case of scheduling 78 activities among four facilities, the interaction cost between activity 1 and activity 2 (if scheduled on the same facility), the interaction cost between activity 1 and activity 3, the interaction cost between activity 1 and activity 4, ..., and the interaction cost between activity 77 and activity 78 are 1, 4, 1, ..., and 6, respectively. These data were not selected randomly or scientifically.
0 DEFSNG A-Z
3 DEFINT I,J,K
4 DIM X(90),A(90)
7 DIM TM(78,78),HR(78,78)
21 FOR IW=1 TO 77
23 FOR JW=IW+1 TO 78
26 READ HR(IW,JW)
28 NEXT JW
29 NEXT IW
101 DATA 1,4,1,7,3,5,0,1,2,5,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,9,3,1
102 DATA 2,3,1,6,6,3,0,1,2,4,4,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,4,3,4
103 DATA 1,9,3,7,3,5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 3,4,1,7,3,5,0,1,2,4,5,4,3,0,6,3,2,2,3,4,7,1,0,6,4,3,5,2,7,9,2,7,9,3,3
185 DATA 4,4,1,7,3,5,1,1,2,5,5,4,3,3,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,9,2,7,3,3,6
186 DATA 3,2,7,5,4,3,0,6,3,2,2,3,4,0,1,0,6,6,3,5,2,7,7,2,7,4,3,6
1065 FOR JJJJ=-32000 TO 32000
1074 RANDOMIZE JJJJ
1076 M=-1D+17
1085 FOR I=1 TO 78
1088 A(I)=FIX(RND*4)
1089 NEXT I
1126 IMAR=10+FIX(RND*2000)
1128 FOR I=1 TO IMAR
1129 FOR KK=1 TO 78
1131 X(KK)=A(KK)
1132 NEXT KK
1223 IJL=1+FIX(RND*78)
1234 X(IJL)=FIX(RND*4)
1533 FOR IX=1 TO 77
1534 FOR JX=IX+1 TO 78
1542 IF X(IX)=X(JX) THEN TM(IX,JX)=HR(IX,JX) ELSE TM(IX,JX)=0
1545 NEXT JX
1547 NEXT IX
1611 SUMTL=0
1612 FOR IR1=1 TO 77
1614 FOR IR2=IR1+1 TO 78
1616 SUMTL=SUMTL+TM(IR1,IR2)
1617 NEXT IR2
1619 NEXT IR1
1645 P=-SUMTL
1656 IF P<=M THEN 1670
1657 FOR KEW=1 TO 78
1658 A(KEW)=X(KEW)
1659 NEXT KEW
1661 M=P
1666 GOTO 1128
1670 NEXT I
1890 IF M>-1700 THEN 1912 ELSE 1999
1912 PRINT A(1),A(2),A(3),A(4),A(5)
1913 PRINT A(6),A(7),A(8),A(9),A(10)
1914 PRINT A(11),A(12),A(13),A(14),A(15)
1915 PRINT A(16),A(17),A(18),A(19),A(20)
1916 PRINT A(21),A(22),A(23),A(24),A(25)
1917 PRINT A(26),A(27),A(28),A(29),A(30)
1918 PRINT A(31),A(32),A(33),A(34),A(35)
1919 PRINT A(36),A(37),A(38),A(39),A(40)
1920 PRINT A(41),A(42),A(43),A(44),A(45)
1921 PRINT A(46),A(47),A(48),A(49),A(50)
1922 PRINT A(51),A(52),A(53),A(54),A(55)
1923 PRINT A(56),A(57),A(58),A(59),A(60)
1924 PRINT A(61),A(62),A(63),A(64),A(65)
1925 PRINT A(66),A(67),A(68),A(69),A(70)
1926 PRINT A(71),A(72),A(73),A(74),A(75)
1927 PRINT A(76),A(77),A(78),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter, and the best candidate solutions produced during the first twenty hours of running are presented below. Only the candidate solution at JJJJ=-31961 is presented in full; each of the other candidate solutions below is briefly presented with its line
1927.
2 3 3 0 0
3 2 2 1 0
0 3 3 2 2
3 3 2 1 0
2 2 3 1 1
1 3 2 2 0
1 2 3 1 2
2 3 3 3 0
0 1 2 3 0
0 3 3 2 2
3 0 3 1 0
3 2 2 1 1
0 1 1 2 0
1 0 1 1 0
2 1 3 3 0
0 1 2 -1677 -31961
2 0 3 -1677 -31682
3 1 0 -1677 -31567
0 3 1 -1677 -31505
0 1 2 -1677 -31482
0 1 3 -1677 -31395
0 1 2 -1677 -31153
1 3 0 -1677 -31068
1 0 3 -1677 -30981
0 3 2 -1677 -30946
1 2 0 -1677 -30908
Interpreted in accordance with line 1912 through line 1927, these candidate solutions were produced during the first twenty hours of running on a personal computer with an Intel 2.66 GHz. chip and the IBM basica/D interpreter, which is not a compiler.
Reference
Carlson, R. C., and G. L. Nemhauser, "Scheduling to Minimize Interaction Cost," Operations Research 14, 52-58 (1966).
Tuesday, November 17, 2009
ERRATA in "An Integer-Programming Computer Program Applied to a One-Dimensional Space Allocation Problem"
Jsun Yui Wong
Line 364 and line 366 of the September 7 post of the present blog should read
as follows:
364 IF ABS(X(K)-X(J)) less than TBM(K,J) THEN TZ(K,J)=99999! ELSE TZ(K,J)=0
366 NEXT J
The "less than" above should be replaced by <.
Moreover, the reported throughput time should be 1.5 hours instead of one hour.
Line 364 and line 366 of the September 7 post of the present blog should read
as follows:
364 IF ABS(X(K)-X(J)) less than TBM(K,J) THEN TZ(K,J)=99999! ELSE TZ(K,J)=0
366 NEXT J
The "less than" above should be replaced by <.
Moreover, the reported throughput time should be 1.5 hours instead of one hour.
Subscribe to:
Posts (Atom)