Jsun Yui Wong
The computer program listed below tries to solve the air transport problem on pages 95-97 of Markowitz and Manne [2]. Line 181 through line 1111 partly describe their air transport problem. Line 313 below comes from page 99 of Markowitz and Manne [2].
Here line 52 is 52 REM A(J44)=FIX(RND*3) while line 52 of the preceding paper is 52 A(J44)=FIX(RND*3); here line 186 is 186 PA=(RND^(RND*10))*R while line 186 of the preceding paper is 186 PA=(RND^(RND*9))*R.
0 REM DEFDBL A-Z
2 DEFINT I,J,K
3 DIM B(99),N(99),A(99),H(99),L(99),U(99),X(1111),D(111),P(111),PS(33)
12 FOR JJJJ=-32000 TO 32000
14 RANDOMIZE JJJJ
16 M=-1D+37
41 FOR J44=1 TO 48
42 A(J44)=FIX(RND*5)
43 NEXT J44
51 REM FOR J44=37 TO 48
52 REM A(J44)=FIX(RND*3)
53 REM NEXT J44
126 IMAR=10+FIX(RND*4000)
128 FOR I=1 TO IMAR
129 FOR KKQQ=1 TO 48
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
133 FOR IPP=1 TO (1+FIX(RND*47))
181 J=1+FIX(RND*48)
183 R=(1-RND*2)*A(J)
185 REM IF RND<.25 THEN PA=(RND)*R ELSE IF RND<.33 THEN PA=(RND^3)*R ELSE IF RND<.5 THEN PA=(RND^5)*R ELSE PA=(RND^7)*R
186 PA=(RND^(RND*10))*R
187 REM X(J)=A(J)+(RND^3)*R
189 X(J)=A(J)+PA
192 NEXT IPP
201 FOR J88=37 TO 48
203 X(J88)=CINT(X(J88) )
204 NEXT J88
301 X(1)=X(20)+X(29)-X(4)-X(7)+6
302 X(5)=X(11)+X(30)-X(8)+6 -X(2)
303 X(9)=X(12)+X(21)-X(6)+6 -X(3)
304 X(10)=X(22)+X(31)-X(13)-X(16)+5
305 X(14) =X(2)-X(11)-X(17)+20 +X(33)
306 X(18) =+X(24)+X(3)-X(12)-X(15)+31
307 X(19) =+X(34)+X(13)-X(22)-X(25)+2
308 X(23)=X(4)+X(35)-X(20)-X(26)+24
309 X(27)=X(6)+X(15)-X(21)-X(24)+11
310 X(28)=X(16)+X(25)-X(31)-X(34)+14
311 X(32) = +X(7)+X(26)-X(29)-X(35)+36
312 X(36) =+X(8)+X(17)-X(30)-X(33)+7
313 X(43)=5-X(44)-X(45)
366 X(46)=X(37)+X(38)+X(39)-X(40)-X(43)
367 X(47)=X(40)+X(41)+X(42)-X(37)-X(44)
368 X(48)=X(43)+X(44)+X(45)-X(38)-X(41)
371 FOR J44=1 TO 48
372 IF X(J44)<-.00001 THEN 1670
373 NEXT J44
431 PS(21)=-7.5*X(37) +X(1) +X(2)+X(3)
432 PS(22)=-7.2*X(38)+X(4) +X(5) +X(6)
433 PS(23)=-7.5*X(39)+X(7)+X(8) +X(9)
434 PS(24)=-7.5*X(40) +X(10) +X(11)+X(12)
435 PS(25)=-7.5*X(41)+X(13) +X(14) +X(15)
436 PS(26)=-7.5*X(42)+X(16)+X(17) +X(18)
437 PS(27)=-7.2*X(43) +X(19) +X(20)+X(21)
438 PS(28)=-7.5*X(44)+X(22) +X(23) +X(24)
439 PS(29)=-5.6*X(45)+X(25)+X(26) +X(27)
440 PS(30)=-7.5*X(46) +X(28) +X(29)+X(30)
441 PS(31)=-7.5*X(47)+X(31) +X(32) +X(33)
442 PS(32)=-5.6*X(48)+X(34)+X(35) +X(36)
454 FOR J44=21 TO 32
455 IF PS(J44)>.00001 THEN PS(J44)=PS(J44) ELSE PS(J44)=0
456 NEXT J44
459 POB1=-4.5*X(37)- 8.3*X(38)- 2.9*X(39)- 4.5*X(40)- 4.2*X(41)- 6.9*X(42)- 8.3*X(43)-4.2*X(44)-10.9*X(45)- 2.9*X(46)- 6.9*X(47)- 10.9*X(48)
461 POB3=-999999999#*(PS(21)^2+PS(22)^2+PS(23)^2+PS(24)^2+PS(25)^2+PS(26)^2+PS(27)^2+PS(28)^2 +PS(29)^2+PS(30)^2+PS(31)^2+PS(32)^2 )
463 P1NEWMAY=POB1+POB3
466 P=P1NEWMAY
1111 IF P<=M THEN 1670
1452 M=P
1454 FOR KLX=1 TO 48
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-153.6 THEN 1999
1900 GOTO 1945
1911 PRINT A(1),A(2),A(3),A(4),A(5)
1912 PRINT A(6),A(7),A(8),A(9),A(10)
1913 PRINT A(11),A(12),A(13),A(14),A(15)
1914 PRINT A(16),A(17),A(18),A(19),A(20)
1915 PRINT A(21),A(22),A(23),A(24),A(25)
1916 PRINT A(26),A(27),A(28),A(29),A(30)
1917 PRINT A(31),A(32),A(33),A(34),A(35)
1945 PRINT A(36),A(37),A(38),A(39),A(40)
1946 PRINT A(41),A(42),A(43),A(44),A(45)
1947 PRINT A(46),A(47),A(48),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter. The complete output through JJJJ=-24246 is shown below. What follows is a hand copy of the output on the computer-monitor screen; immediately below there is no rounding by hand.
5.166513 1 1 2 1
3 6 1 4 0
2 5 1 -153.4 -28956
5.343306 1 1 1 1
3 7 0 5 0
2 5 1 -153.3 -25733
5.205016 1 1 1 1
3 7 0 5 0
2 5 1 -153.3 -24580
5.521621 1 1 2 1
3 6 1 4 0
2 5 1 -153.4 -24246
On a personal computer with 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 throughput time from JJJJ=-32000 through JJJJ=-24246 was eight hours.
References
[1] George B. Dantzig, Discrete-Variable Extremum Problems. Operations Research, Vol. 5, No. 2 (Apr., 1957), pp. 266-277.
[2] Harry M. Markowitz, Alan S. Manne, On the Solution of Discrete Programming Problems. Econometrica, Vol. 25, No. 1 (Jan., 1957), pp. 84-110.
[3] 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.