Jsun Yui Wong
The computer program below tries to solve the oil refinery problem on pages 198-199 of Conley [2]. Line 181 through line 1111 of the following computer program partly describe the problem.
The following computer program is modeled after the nuclear-chain-reaction picture on page 336 of the World Book Dictionary [1] and after the domino method of solving nonlinear systems of equations [10]. Line 206, which is 206 X(1)=( -.25* X(2)-.3*X(3)- .25*X(4)- .35*X(5) +400 )/.3 from one of the given constraints, through line 459 are illustrative. Here X(1), X(6), and X(7) of line 206, line 321, and line 322, respectively, are proxy domino one, proxy domino 2, and proxy domino three, respectively. When X(1) is optimized/pushed-down, X(6) is, in this case, optimized/pushed-down. Similarly, X(7) is, in thise case, optimized/pushed-down.
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 5
42 A(J44)=FIX(RND*1000)
43 NEXT J44
126 IMAR=10+FIX(RND*5000)
128 FOR I=1 TO IMAR
129 FOR KKQQ=1 TO 5
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
133 FOR IPP=1 TO (1+FIX(RND*4))
181 J=1+FIX(RND*5)
182 REM GOTO 191
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
187 X(J)=A(J)+ (RND^(RND*10))*R
189 REM X(J)=A(J)+PA
190 REM X(J)=A(J)+FIX(RND*2 )-FIX(RND*2)
191 REM X(J)=A(J)+FIX(RND*3)-FIX(RND*3)
192 NEXT IPP
206 X(1)=( -.25* X(2)-.3*X(3)- .25*X(4)- .35*X(5) +400 )/.3
221 IF X(1)>600 THEN 1670
222 IF X(2)>1500 THEN 1670
223 IF X(3)>600 THEN 1670
224 IF X(4)>200 THEN 1670
225 IF X(5)>400 THEN 1670
228 FOR J44=1 TO 5
230 IF X(J44)<0 THEN 1670
231 NEXT J44
321 X(6)=+.35*X(1)+.3* X(2)+.25*X(3)+.25*X(4)+ .25*X(5) -450
322 X(7)= +.3*X(1)+.4* X(2)+.4*X(3)+.4*X(4)+ .3*X(5) -550
331 IF ABS(X(6) )>.00001 THEN PS1=ABS(X(6) ) ELSE PS1=0
332 IF ABS(X(7) )>.00001 THEN PS2=ABS(X(7) ) ELSE PS2=0
402 POBA2=-3.58*X(1)^.88-5.92* X(2)^1.04-2.95*X(3)^.98-4.01*X(4)^1.02-5.02*X(5)^1.08
411 POBA= POBA2
459 POB1=POBA -999999999999#*( + PS1+PS2 )
463 P1NEWMAY=POB1
466 P=P1NEWMAY
1111 IF P<=M THEN 1670
1452 M=P
1454 FOR KLX=1 TO 7
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-7452.9 THEN 1999
1900 PRINT A(1),A(2),A(3),A(4),A(5),A(6),A(7)
1903 PRINT M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter. The complete output through JJJJ=-27498 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.
436.8398 705.2708 142.1107 199.9887 1.039841E-05
0 0
-7452.9 -28617
436.842 705.2644 142.1061 199.9979 7.631095E-06
0 0
-7452.879 -27498
On a personal computer with an Intel 2.66 chip and the IBM basica/D interpreter, version GW BASIC 3.11, the throughput time from JJJJ=-32000 through JJJJ=-27498 was 38 minutes.
References
[1] Clarence L. Barnhart, Robert K. Barnhart (Editors). The World Book Dictionary, 1993 World Book, Inc., a Scott Fetzer company, Chicago London Sydney Toronto.
[2] William Conley, Computer Optimization Techniques. New York/Princeton: Petrocelli Books, Inc., Copyright 1980.
[3] George B. Dantzig, Discrete-Variable Extremum Problems. Operations Research, Vol. 5, No. 2 (Apr., 1957), pp. 266-277.
[4] 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.
[5] A. H. Land, A. G. Doig, An Automatic Method of Solving Discrete Programming Problems. Econometrica, Vol. 28, No. 3 (Jul., 1960), pp. 497-520.
[6] 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.
[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Boston: Springer, 2006.
[8] Harry M. Markowitz, Alan S. Manne, On the Solution of Discrete Programming Problems. Econometrica, Vol. 25, No. 1 (Jan., 1957), pp. 84-110.
[9] 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.
[10] Jsun Yui Wong (2011, April 17). The Domino Method of Solving Nonlinear Systems of Equations. Retrieved from http://computationalresultsfromcomputerprograms.wordpress.com/2011/04/17/
Comments
You can follow this conversation by subscribing to the comment feed for this post.