Jsun Yui Wong
The following computer program seeks to solve Problem P15 in Amaral [1, p. 517] and in Amaral [2, p. 1031].
0 REM DEFDBL A-Z
1 DEFINT I,J,K,X,A
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J44(2002),J(99),AA(99),HR(22),HHR(22)
3 DIM HS(49,49)
4 DIM PE(49,49)
5 DIM SD(49,49)
29 HR(1)=40:HR(2)=6:HR(3)=18:HR(4)=6:HR(5)=14:HR(6)=6:HR(7)=14:HR(8)=10: HR(9)=18:HR(10)=12
30 HR(11)=10:HR(12)=6:HR(13)=18:HR(14)=6:HR(15)=14
31 FOR IL=1 TO 14
32 FOR JL=IL+1 TO 15
33 READ HS(IL,JL)
34 NEXT JL
35 NEXT IL
42 DATA 10,0,5,1,0,1,2,2,2,2,0,4,0,0
43 DATA 1,3,2,2,2,3,2,0,2,0,10,5,0
44 DATA 10,2,0,2,5,4,5,2,2,5,5,5
45 DATA 1,1,5,0,0,2,1,0,2,5,0
46 DATA 3,5,5,5,1,0,3,0,5,5
47 DATA 2,2,1,5,0,0,2,5,10
48 DATA 6,0,1,5,5,5,1,0
49 DATA 5,2,10,0,5,0,0
50 DATA 0,10,5,10,0,2
51 DATA 0,4,0,0,5
52 DATA 5,0,5,0
53 DATA 3,3,0
54 DATA 10,2
55 DATA 4
78 FOR JJJJ=-32000 TO 32000
79 RANDOMIZE JJJJ
80 M=-1D+37
81 FOR J44=1 TO 15
83 A(J44)=J44
84 NEXT J44
126 REM IMAR=10+FIX(RND*1000)
128 FOR I=1 TO 55
129 FOR KKQQ=1 TO 15
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
133 III=1+FIX(RND*15)
134 JJJ=1+FIX(RND*15)
221 X(III)=A(JJJ)
223 X(JJJ)=A(III)
225 FOR II=1 TO 14
227 FOR JJ=II+1 TO 15
231 SD(II,JJ)=0
235 SD(II,JJ)=.5*HR(II)+.5*HR(JJ)
239 FOR KK = 1 TO 15
241 IF X(II)<X(JJ) THEN 245 ELSE 249
245 IF X(KK)>X(II) AND X(KK) <X(JJ) THEN HHR(KK)=HR(KK) ELSE HHR(KK)=0
247 GOTO 255
249 IF X(KK)>X(JJ) AND X(KK) <X(II) THEN HHR(KK)=HR(KK) ELSE HHR(KK)=0
255 SD(II,JJ)=SD(II,JJ)+HHR(KK)
261 NEXT KK
267 NEXT JJ
271 NEXT II
305 PDU=0
309 FOR IW=1 TO 14
312 FOR J88=IW+1 TO 15
318 PDU=PDU-HS(IW,J88)*SD(IW,J88)
320 NEXT J88
321 NEXT IW
359 POB1=PDU
444 P1NEWMAY=POB1
466 P=P1NEWMAY
1111 IF P<=M THEN 1670
1452 M=P
1454 FOR KLX=1 TO 15
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-12620 THEN 1999
1911 PRINT A(1),A(2),A(3),A(4),A(5)
1912 PRINT A(6),A(7),A(8),A(9)
1913 PRINT A(10),A(11),A(12),A(13),A(14)
1917 PRINT A(15),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter. The complete output through JJJJ=-31947 is shown below. What follows is a hand copy from the computer-monitor screen; immediately below there is no rounding by hand.
1 2 11 10 12
13 7 6 4
15 5 8 3 9
14 -12610 -31993
15 12 5 6 4
3 8 10 14
1 11 9 13 7
2 -12614 -31951
15 11 5 6 4
3 9 12 14
1 13 8 10 7
2 -12610 -31949
15 14 5 6 4
3 9 10 12
1 11 8 13 7
2 -12610 -31947
On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM, and the IBM basica/D interpreter, version GW BASIC 3.11, the wall-clock time for the output through JJJJ= -31947 was two minutes.
References
[1] Andre R. S. Amaral (2006), On the Exact Solution of a Facility Layout Problem. European Journal of Operational Research 173 (2006), pp. 508-518.
[2] Andre R. S. Amaral (2008), An Exact Approach to the One-Dimensional Facility Layout Problem. Operations Research, Vol. 56, No. 4 (July-August, 2008), pp. 1026-1033.
[3] David L. Applegate, Robert E. Bixby, Vasek Chvatal, William J. Cook, The Traveling Salesman Problem: A Computational Study. Princeton and Oxford: Princeton University Press, 2006.
[4] L. L. Barachet (1957), Graphic Solution of the Travelling Salesman Problem. Operations Research, Vol. 5, pp. 841-845.
[5] T. Y. Chen, H. C. Chen (2009), Mixed-Discrete Structural Optimization Using a Rank-Niche Evolution Strategy, Engineering Optimization, 41:1, 39-58.
[6] Leon Cooper, U. N. Bhat, L. J. LeBlanc, Introduction to Operations Researach Models. W. B. Saunders Company, 1977.
[7] George B. Dantzig, Discrete-Variable Extremum Problems. Operations Research, Vol. 5, No. 2 (Apr., 1957), pp. 266-277.
[8] G. Dantzig, R. Fulkerson, S. Johnson, Solution of a Large-Scale Traveling-Salesman Problem.
Operations Research, Vol. 2, No. 4 (Nov., 1954), pp. 393-410.
[9] W. J. Fabrycky, P. M. Ghare, P. E. Torgersen, Applied Operations Research and Management Science. Englewood Cliffs, N. J. 07362: Prentice-Hall, Inc., 1984.
[10] Billy E. Gillett, Introduction to Operations Research: A Computer-Oriented Algorithmic Approach. McGraw-Hill, Inc., 1976.
[11] Martin Grotschel, Olaf Holland (1991), Solution of Large-Scale Symmetric Travelling Salesman Problems, Mathematical Programming 51, pp. 141-202.
[12] S. S. Heragu, A. Kusiak (1991), Efficient Models for the Facility Layout Problem. European Journal of Operational Research, Vol. 53 (1991), pp. 1-13.
[13] Michael Junger, Thomas M. Liebling, Dennis Naddef, George L. Nemhauser, William R. Pulleybank, Gerhart Reinelt, Giovanni Rinaldi, Lawrence A. Wolsey--Editors, 50 Years of Integer Programming 1958-2008. Berlin: Springer, 2010.
[14] R. L. Karg, G. L. Thompson (1964), A Heuristic Approach to Solving Travelling Salesman Problems. Management Science, Vol. 10, Number 2, pp. 225-248.
[15] A. H. Land, A. G. Doig, An Automatic Method of Solving Discrete Programming Problems. Econometrica, Vol. 28, No. 3 (Jul., 1960), pp. 497-520.
[16] E. L. Lawler, M. D. Bell, A Method for Solving Discrete Optimization Problems. Operations Research, Vol. 14, No. 6 (Nov.-Dec., 1966), pp. 1098-1112.
[17] Robert F. Love, Jsun Y. Wong (1976), On Solving a One-Dimensional Space Allocation Problem with Integer Programming. INFOR, Vol. 14, No. 2, June 1976, pp. 139-143.
[18] Harry M. Markowitz, Alan S. Manne, On the Solution of Discrete Programming Problems. Econometrica, Vol. 25, No. 1 (Jan., 1957), pp. 84-110.
[19] Ken McAloon, Carol Tretkoff, Optimization and Computational Logic. John Wiley and Sons, Inc., 1996.
[20] 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.
[21] Katta G. Murty, Opereations Research: Deterministic Optimization Models. Prentice Hall, Upper Saddle River, New Jersey 07458, 1994.
[22] C. E. Nugent, T. E. Vollmann, J. Ruml (1968), An Experimental Comparison of Techniques for the Assignment of Facilities to Locations," Operations Research 16 (1968), pp. 150-173.
[23] Christopher J. Picone, Wilbert E. Wilhelm (1986), "A Perturbation Scheme To Improve Hillier's Solution to the Facilities Layout Problem": a Clarification. Management Science Vol. 32, No. 2, February 1986, pp. 253-254.
[24] Cliff T. Ragsdale, Spreadsheet Modeling and Decision Analysis, Fifth Edition. South-Westen, Cengage Learning, 2008.
[25] H. H. Rosenbrock (1960), An Automatic Method for Finding the Greatest or Least Value of a Function, Computer Journal Vol. 3, pp. 175-184.
[26] Donald M. Simmons (1969), One-Dimensional Space Allocation: An Ordering Algorithm. Operations Research, Vol. 17, No. 5 (Sep. - Oct., 1969), pp. 812-826.
[27] Wayne L. Winston, Munirpallam Venkataramanan, Introduction to Mathematical Programming: Operations Research, Volume One, Fourth Edition. Pacific Grove, CA 93950: Brooks/Cole--Thomson Learning, 2003.
[28] Wayne L. Winston, S. Christian Albright, Practical Management Science, Third Edition. Thomson/South-Western, 2007.
[29] Jsun Yui Wong (2009, July 18). An Integer Programming Computer Program Applied to One-Dimensional Space Allocation. Retrieved from http://wongsllllblog.blogspot.com/2009/07/
[30] Jsun Yui Wong (2009, December 18). A Heuristic Nonlinear Integer Solver Applied to a Problem of Assignment of Facilities to Locations. Retrieved from http://wongsnewnewblog.blogspot.ca/2009/12/
[31] Jsun Yui Wong (2011, October 27). A Nonlinear Integer/Discrete/Continuous Programming Solver Applied to a New Formulation of a Twelve-City Traveling Salesman Problem, Sixth Edition. Retrieved from http://computationalresultsfromcomputerprograms.wordpress.com/2011/10/27/
[32] Ji-Hui Zhang, Xin-He Xu (1999), An Efficient Evolutionary Programming Algorithm. Computers and Operations Research 26, 645-663.