Jsun Yui Wong
The problem considered here is essentially the 12-location problem in Hillier [1] and in Nugent, Vollmann, and Ruml [2] plus a change to more than 12 locations spread over three dimensions. The same interfacility flows [1, p. 33; 2, p. 168] are used here. So one knows the minimum objective function value to this newer problem is 289 [2, p. 159] or smaller.
Line 561 through line 626 of the computer program below are slightly different from the mathematical formulation on page 6 of Heragu and Kusiak [3] and on page 140 of Heragu [4]. Line 1321 through line 1328 below use the interdepartmental flows presented in Hillier [1, p. 33] and in Nugent, Vollmann, and Ruml [2, p. 168].
The following computer program benefits from the computer programs of the present blog and the computer program on pages 229-232 of Conley [5].
A computer program that is identical to the one listed below with the exception of line 128, 128 FOR I=1 TO 3 for the former, produced no computational results after six hours of running. Then the following computer program was inputted.
2 DEFINT I,J,K
5 DIM B(99),N(99),A(99),H(99),L(99),U(99),X(1111),D(111),P(222)
12 FOR JJJJ=-32000 TO 32000
14 RANDOMIZE JJJJ
16 M=-1D+17
43 FOR IOC=1 TO 36
45 B(IOC)=0
47 NEXT IOC
51 FOR IOCTT=1 TO 36
53 N(IOCTT)=2
57 NEXT IOCTT
61 FOR KLQ=1 TO 36
62 A(KLQ)=B(KLQ)+RND*(N(KLQ)-B(KLQ))
63 NEXT KLQ
71 FOR KLR=1 TO 36
72 H(KLR)=3
73 NEXT KLR
88 FOR JJJ=1 TO 1000 STEP 10
90 FOR INEW=1 TO 1
94 FOR J=INEW*2 TO 0 STEP -1
102 FOR JJ=0 TO 36
128 FOR I=1 TO 10
129 FOR KKQQ=1 TO 36
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
132 FOR K=1 TO 36
133 IF RND<=.5 THEN 298 ELSE 230
134 REM
137 REM
230 IF A(K)-(N(K)-B(K))/H(K)^J250 L(K)=B(K)
255 GOTO 265
260 L(K)=A(K)-(N(K)-B(K))/H(K)^J
265 IF A(K)+(N(K)-B(K))/H(K)^J>N(K) THEN 266 ELSE 268
266 U(K)=N(K)-L(K)
267 GOTO 272
268 U(K)=A(K)+(N(K)-B(K))/H(K)^J-L(K)
272 GOTO 300
298 X(K)=A(K)+2*RND*(2*RND-1)*(1/(1+RND*JJJ))*.05*A(K)
299 GOTO 302
300 X(K)=(L(K)+2*RND*RND*U(K))
302 NEXT K
304 X(JJ)=A(JJ)
306 KLPS=FIX(1+RND*108)
307 FOR KLA1=1 TO KLPS
308 KLA2=FIX(1+36*RND)
309 X(KLA2)=A(KLA2)
310 NEXT KLA1
343 IF RND>.1 GOTO 361
352 IF RND<.5 THEN 353 ELSE 355
353 X(JJ)=B(JJ)
354 GOTO 361
355 X(JJ)=N(JJ)
361 FOR I222=1 TO 36
364 X(I222)=FIX(X(I222))
368 NEXT I222
461 IF RND>.1 GOTO 531
465 IF RND<1/3 THEN 471 ELSE IF RND<1/2 THEN 491 ELSE 511
471 IOCT1=1+FIX(RND*12)
474 IOCT2=1+FIX(RND*12)
477 X(IOCT1)=A(IOCT2)
480 X(IOCT2)=A(IOCT1)
481 GOTO 531
491 IOCT6=13+FIX(RND*12)
494 IOCT7=13+FIX(RND*12)
497 X(IOCT6)=A(IOCT7)
500 X(IOCT7)=A(IOCT6)
502 GOTO 531
511 IOCT8=25+FIX(RND*12)
514 IOCT9=25+FIX(RND*12)
517 X(IOCT8)=A(IOCT9)
520 X(IOCT9)=A(IOCT8)
522 GOTO 531
531 FOR IOCX=1 TO 36
533 IF X(IOCX)>2 THEN X(IOCX)=1
535 NEXT IOCX
541 FOR IOCY=1 TO 36
543 IF X(IOCY)<0 THEN X(IOCY)=0
545 NEXT IOCY
561 P(11)=ABS(X(1)-X(2))+ABS(X(13)-X(14))+ABS(X(25)-X(26))
562 P(12)=ABS(X(1)-X(3))+ABS(X(13)-X(15))+ABS(X(25)-X(27))
563 P(13)=ABS(X(1)-X(4))+ABS(X(13)-X(16))+ABS(X(25)-X(28))
564 P(14)=ABS(X(1)-X(5))+ABS(X(13)-X(17))+ABS(X(25)-X(29))
565 P(15)=ABS(X(1)-X(6))+ABS(X(13)-X(18))+ABS(X(25)-X(30))
566 P(16)=ABS(X(1)-X(7))+ABS(X(13)-X(19))+ABS(X(25)-X(31))
567 P(17)=ABS(X(1)-X(8))+ABS(X(13)-X(20))+ABS(X(25)-X(32))
568 P(18)=ABS(X(1)-X(9))+ABS(X(13)-X(21))+ABS(X(25)-X(33))
569 P(19)=ABS(X(1)-X(10))+ABS(X(13)-X(22))+ABS(X(25)-X(34))
570 P(20)=ABS(X(1)-X(11))+ABS(X(13)-X(23))+ABS(X(25)-X(35))
571 P(21)=ABS(X(1)-X(12))+ABS(X(13)-X(24))+ABS(X(25)-X(36))
572 P(22)=ABS(X(2)-X(3))+ABS(X(14)-X(15))+ABS(X(26)-X(27))
573 P(23)=ABS(X(2)-X(4))+ABS(X(14)-X(16))+ABS(X(26)-X(28))
574 P(24)=ABS(X(2)-X(5))+ABS(X(14)-X(17))+ABS(X(26)-X(29))
575 P(25)=ABS(X(2)-X(6))+ABS(X(14)-X(18))+ABS(X(26)-X(30))
576 P(26)=ABS(X(2)-X(7))+ABS(X(14)-X(19))+ABS(X(26)-X(31))
577 P(27)=ABS(X(2)-X(8))+ABS(X(14)-X(20))+ABS(X(26)-X(32))
578 P(28)=ABS(X(2)-X(9))+ABS(X(14)-X(21))+ABS(X(26)-X(33))
579 P(29)=ABS(X(2)-X(10))+ABS(X(14)-X(22))+ABS(X(26)-X(34))
580 P(30)=ABS(X(2)-X(11))+ABS(X(14)-X(23))+ABS(X(26)-X(35))
581 P(31)=ABS(X(2)-X(12))+ABS(X(14)-X(24))+ABS(X(26)-X(36))
582 P(32)=ABS(X(3)-X(4))+ABS(X(15)-X(16))+ABS(X(27)-X(28))
583 P(33)=ABS(X(3)-X(5))+ABS(X(15)-X(17))+ABS(X(27)-X(29))
584 P(34)=ABS(X(3)-X(6))+ABS(X(15)-X(18))+ABS(X(27)-X(30))
585 P(35)=ABS(X(3)-X(7))+ABS(X(15)-X(19))+ABS(X(27)-X(31))
586 P(36)=ABS(X(3)-X(8))+ABS(X(15)-X(20))+ABS(X(27)-X(32))
587 P(37)=ABS(X(3)-X(9))+ABS(X(15)-X(21))+ABS(X(27)-X(33))
588 P(38)=ABS(X(3)-X(10))+ABS(X(15)-X(22))+ABS(X(27)-X(34))
589 P(39)=ABS(X(3)-X(11))+ABS(X(15)-X(23))+ABS(X(27)-X(35))
590 P(40)=ABS(X(3)-X(12))+ABS(X(15)-X(24))+ABS(X(27)-X(36))
591 P(41)=ABS(X(4)-X(5))+ABS(X(16)-X(17))+ABS(X(28)-X(29))
592 P(42)=ABS(X(4)-X(6))+ABS(X(16)-X(18))+ABS(X(28)-X(30))
593 P(43)=ABS(X(4)-X(7))+ABS(X(16)-X(19))+ABS(X(28)-X(31))
594 P(44)=ABS(X(4)-X(8))+ABS(X(16)-X(20))+ABS(X(28)-X(32))
595 P(45)=ABS(X(4)-X(9))+ABS(X(16)-X(21))+ABS(X(28)-X(33))
596 P(46)=ABS(X(4)-X(10))+ABS(X(16)-X(22))+ABS(X(28)-X(34))
597 P(47)=ABS(X(4)-X(11))+ABS(X(16)-X(23))+ABS(X(28)-X(35))
598 P(48)=ABS(X(4)-X(12))+ABS(X(16)-X(24))+ABS(X(28)-X(36))
599 P(49)=ABS(X(5)-X(6))+ABS(X(17)-X(18))+ABS(X(29)-X(30))
600 P(50)=ABS(X(5)-X(7))+ABS(X(17)-X(19))+ABS(X(29)-X(31))
601 P(51)=ABS(X(5)-X(8))+ABS(X(17)-X(20))+ABS(X(29)-X(32))
602 P(52)=ABS(X(5)-X(9))+ABS(X(17)-X(21))+ABS(X(29)-X(33))
603 P(53)=ABS(X(5)-X(10))+ABS(X(17)-X(22))+ABS(X(29)-X(34))
604 P(54)=ABS(X(5)-X(11))+ABS(X(17)-X(23))+ABS(X(29)-X(35))
605 P(55)=ABS(X(5)-X(12))+ABS(X(17)-X(24))+ABS(X(29)-X(36))
606 P(56)=ABS(X(6)-X(7))+ABS(X(18)-X(19))+ABS(X(30)-X(31))
607 P(57)=ABS(X(6)-X(8))+ABS(X(18)-X(20))+ABS(X(30)-X(32))
608 P(58)=ABS(X(6)-X(9))+ABS(X(18)-X(21))+ABS(X(30)-X(33))
609 P(59)=ABS(X(6)-X(10))+ABS(X(18)-X(22))+ABS(X(30)-X(34))
610 P(60)=ABS(X(6)-X(11))+ABS(X(18)-X(23))+ABS(X(30)-X(35))
611 P(61)=ABS(X(6)-X(12))+ABS(X(18)-X(24))+ABS(X(30)-X(36))
612 P(62)=ABS(X(7)-X(8))+ABS(X(19)-X(20))+ABS(X(31)-X(32))
613 P(63)=ABS(X(7)-X(9))+ABS(X(19)-X(21))+ABS(X(31)-X(33))
614 P(64)=ABS(X(7)-X(10))+ABS(X(19)-X(22))+ABS(X(31)-X(34))
615 P(65)=ABS(X(7)-X(11))+ABS(X(19)-X(23))+ABS(X(31)-X(35))
616 P(66)=ABS(X(7)-X(12))+ABS(X(19)-X(24))+ABS(X(31)-X(36))
617 P(67)=ABS(X(8)-X(9))+ABS(X(20)-X(21))+ABS(X(32)-X(33))
618 P(68)=ABS(X(8)-X(10))+ABS(X(20)-X(22))+ABS(X(32)-X(34))
619 P(69)=ABS(X(8)-X(11))+ABS(X(20)-X(23))+ABS(X(32)-X(35))
620 P(70)=ABS(X(8)-X(12))+ABS(X(20)-X(24))+ABS(X(32)-X(36))
621 P(71)=ABS(X(9)-X(10))+ABS(X(21)-X(22))+ABS(X(33)-X(34))
622 P(72)=ABS(X(9)-X(11))+ABS(X(21)-X(23))+ABS(X(33)-X(35))
623 P(73)=ABS(X(9)-X(12))+ABS(X(21)-X(24))+ABS(X(33)-X(36))
624 P(74)=ABS(X(10)-X(11))+ABS(X(22)-X(23))+ABS(X(34)-X(35))
625 P(75)=ABS(X(10)-X(12))+ABS(X(22)-X(24))+ABS(X(34)-X(36))
626 P(76)=ABS(X(11)-X(12))+ABS(X(23)-X(24))+ABS(X(35)-X(36))
788 FOR INSI=11 TO 76
791 IF P(INSI)<.5 THEN P(INSI)=9999 ELSE P(INSI)=P(INSI)
795 NEXT INSI
1321 P11B=5*P(11)+2*P(12)+4*P(13)+1*P(14)+.01*P(15)+.01*P(16)+6*P(17)+2*P(18)+1*P(19)+1*P(20)+1*P(21)
1322 P12B=3*P(22)+.01*P(23)+2*P(24)+2*P(25)+2*P(26)+.01*P(27)+4*P(28)+5*P(29)+.01*P(30)+.01*P(31)
1323 P13B=.01*P(32)+.01*P(33)+.01*P(34)+.01*P(35)+5*P(36)+5*P(37)+2*P(38)+2*P(39)+2*P(40)
1324 P14B=5*P(41)+2*P(42)+2*P(43)+10*P(44)+.01*P(45)+.01*P(46)+5*P(47)+5*P(48)
1325 P15B=10*P(49)+.01*P(50)+.01*P(51)+.01*P(52)+5*P(53)+1*P(54)+1*P(55)
1326 P16B=5*P(56)+1*P(57)+1*P(58)+5*P(59)+4*P(60)+.01*P(61)
1327 P17B=10*P(62)+5*P(63)+2*P(64)+3*P(65)+3*P(66)+.01*P(67)+.01*P(68)+5*P(69)+.01*P(70)
1328 P18B=.01*P(71)+10*P(72)+10*P(73)+5*P(74)+.01*P(75)+2*P(76)
1443 P1=P11B+P12B+P13B+P14B+P15B+P16B+P17B+P18B
1448 P6=P1+0+0+0+0
1449 PS1=0
1450 P=-P6+PS1
1451 IF P<=M THEN 1670
1452 M=P
1453 PP1=P6
1454 FOR KLX=1 TO 36
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1457 GOTO 128
1670 NEXT I
1702 NEXT JJ
1706 NEXT J
1777 NEXT INEW
1778 REM
1888 NEXT JJJ
1890 IF M>-265 THEN 1916 ELSE 1999
1916 PRINT JJJJ,M,PP1
1917 PRINT A(1),A(2),A(3),A(4),A(5)
1918 PRINT A(6),A(7),A(8),A(9),A(10)
1920 PRINT A(11),A(12)
1922 PRINT A(13),A(14),A(15),A(16),A(17)
1924 PRINT A(18),A(19),A(20),A(21),A(22)
1926 PRINT A(23),A(24)
1928 PRINT A(25),A(26),A(27),A(28),A(29)
1930 PRINT A(30),A(31),A(32),A(33),A(34)
1932 PRINT A(35),A(36),JJJJ,M,PP1
1999 NEXT JJJJ
(The .01s above are the 0s of the n=12 case, Nugent et al. [2, p. 168].)
This BASIC computer program was run with the IBM basica/D interpreter, and its output through JJJJ=-31868 (in compressed form and to be interpreted in accordance with line 1916 through line 1932; copied manually from the computer monitor) is presented below.
-31987 -262.58 262.58
2 0 1 2 0
0 1 2 1 0
1 2
0 0 0 1 1
1 0 0 1 0
1 1
1 1 1 0 1
0 0 0 1 0
0 1 -31987 -262.58 262.58
-31977 -262.58 262.58
2 0 1 2 0
0 1 2 1 0
1 2
0 0 0 1 0
1 1 1 0 1
1 0
0 0 0 1 1
1 0 0 1 0
1 1 -31977 -262.58 262.58
-31972 -264.56 264.56
1 1 1 1 1
0 0 1 0 0
0 0
1 0 2 1 0
0 2 2 1 0
1 2
1 1 1 0 0
0 0 0 1 1
0 1 -31972 -264.56 264.56
-31868 -262.58 262.58
2 0 1 2 0
0 1 2 1 0
1 2
1 1 1 0 1
0 0 0 1 0
0 1
1 1 1 0 0
0 1 1 0 1
0 0 -31868 -262.58 262.58
The best candidate solutions shown above are at JJJJ=-31987, JJJJ=-31977, and JJJJ=-31868 with an objective function value of 262.58. (The last two digits, 5 and 8, should be disregarded because these are due to the artificial flows, the .01s.)
The output above was produced in 6 hours on a personal computer with an Intel 2.66 GHz. chip and the IBM interpreter, which is slower than the corresponding compiler.
If one makes changes to the computer program above, such as a change of changing line 128 above to 128 FOR I=1 TO 11, one may or may not obtain 262, which may or may not be optimal. That leads to a general remedy that in general, in order to increase the probability of getting an optimal solution, one preferably should run several computers simultaneously, each with a different line 128, for example; instead of line 128, another line can be chosen. This multicomputer approach can mitigate the possible danger of missed optimality and can produce a usable solution faster than just running one computer.
References
[1] F.S. Hillier, Quantitative tools for plant layout analysis, J. Indust. Eng. 14 (1963) 33-40.
[2] C.E. Nugent, T.E. Vollmann, J. Ruml, An experimental comparison of techniques for the assignment of facilities to locations, Operations Research 16 (1968) 150-173.
[3] S.S. Heragu, A. Kusiak, Efficient models for the facility layout problem, European Journal of Operational Research 53 (1991) 1-13.
[4] S.S. Heragu, Recent models and techniques for solving the layout problem, European Journal of Operational Research 57 (1992) 136-144.
[5] W.C. Conley, Optimization: A Simplified Approach, Petrocelli, Princeton, New Jersey, 1981.