Jsun Yui Wong
Line 819 and line 834 of the preceding post (posted on March 15, 2011) are wrong. Hence the following computer program and its output are presented.
In their article Mixed-Integer Linear Programming Reformulations for Batch Process Design with Discrete Equipment Sizes in the journal Industrial and Engineering Chemistry Research and referring to a Grossmann and Sargent [2] model for optimal sizing, Voudouris and Grossmann wrote, "A major assumption in this formulation is that the vessel sizes Vj are assumed to be continuous within specified lower and upper bounds Vjlo and Vjup. In real life, howerver, only vessels of discrete sizes are available," [1, p. 1316]. The present paper replaces continuous equipment sizes with discrete equipment sizes; it replaces 300<= Vj <=3000, for j=1 to 6 of Salcedo's Example 9 [3, pp. 269-272] with Vj must be 700, 1000, 1400, 2000, or 2800, for j=1 to 6. These discrete equipment sizes are from Voudouris and Grosmann [1, p. 1323]. Salcedo's Example 9 is Example 4 of Kocis and Grossmann [4, p. 1417]. Salcedo's description of his Example 9 is given on pages 268-269 of Salcedo [3, pp. 268-269]. His input data are given on pages 269 and 270 [3]; these data come from Kocis and Grossmann [4, p. 1417].
Benefitting from the computer program on pages 229-232 of Conley [5] and from the computer program in Wong [7], the following computer program replaces the continuous equipment sizes of Salcedo's Example 9 with the five discrete equipment sizes mentioned above. These discrete equipment sizes are shown below in line 533 through line 538.
One notes that line 88 below is 88 FOR JJJ=1 TO 1200 STEP 10.
1 DEFDBL A-Z
2 DEFINT I,J,K
5 DIM B(99),N(99),A(99),H(99),L(99),U(99),X(1111),D(111),P(111)
12 FOR JJJJ=-32000 TO -16000
14 RANDOMIZE JJJJ
16 M=-1D+17
25 B(1)=700:B(2)=700:B(3)=700:B(4)=700
26 B(5)=700:B(6)=700
27 B(7)=2.075:B(8)=1.7:B(9)=2.975:B(10)=.875:B(11)=1.05
28 B(12)=86.458333333333#:B(13)=42.5:B(14)=89.25
29 B(15)=23.333333333333#:B(16)=21
30 FOR KLN=23 TO 52
31 B(KLN)=0
32 NEXT KLN
33 B(17)=1:B(18)=1:B(19)=1:B(20)=1
34 B(21)=1:B(22)=1
37 N(1)=2800:N(2)=2800:N(3)=2800:N(4)=2800
38 N(5)=2800:N(6)=2800
39 N(7)=8.3:N(8)=6.8:N(9)=11.9:N(10)=3.5:N(11)=4.2
41 N(12)=379.7468354#:N(13)=882.3529412#:N(14)=833.333333333#
42 N(15)=638.2978723#:N(16)=666.666666666#
43 N(17)=4:N(18)=4:N(19)=4:N(20)=4
44 N(21)=4:N(22)=4
46 FOR KLP=23 TO 52
47 N(KLP)=1
48 NEXT KLP
61 FOR KLQ=1 TO 22
62 A(KLQ)=B(KLQ)+RND*(N(KLQ)-B(KLQ))
63 NEXT KLQ
64 FOR KLQQ=23 TO 52
65 A(KLQQ)=0
66 NEXT KLQQ
67 A(27)=1:A(32)=1:A(37)=1:A(42)=1:A(47)=1:A(52)=1
71 FOR KLR=1 TO 52
72 H(KLR)=3
73 NEXT KLR
88 FOR JJJ=1 TO 1200 STEP 10
90 FOR INEW=1 TO 5
94 FOR J=INEW*2 TO 0 STEP -2
102 FOR JJ=0 TO 22
111 KKLL=FIX(1+16*RND)
128 FOR I=1 TO 15
129 FOR KKQQ=1 TO 52
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
132 FOR K=7 TO 22
133 IF RND<=.5 THEN 298 ELSE 230
230 IF A(K)-(N(K)-B(K))/H(K)^J<B(K) THEN 250 ELSE 260
250 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)
305 KLPS=FIX(1+KKLL*RND)
307 FOR KLA1=1 TO KLPS
308 KLA2=FIX(7+16*RND)
309 X(KLA2)=A(KLA2)
310 NEXT KLA1
343 REM IF RND>.1 GOTO 461
352 REM IF RND<=.9 THEN 353 ELSE 355
353 REM X(JJ)=B(JJ)
354 REM GOTO 461
355 REM X(JJ)=N(JJ)
461 FOR J99=1 TO 52
463 IF X(J99)<B(J99) THEN 1670
464 IF X(J99)>N(J99) THEN 1670
466 NEXT J99
504 X(17)=FIX(X(17)):X(18)=FIX(X(18)):X(19)=FIX(X(19)):X(20)=FIX(X(20)):X(21)=FIX(X(21)):X(22)=FIX(X(22))
505 IF RND<1/6 THEN 511 ELSE IF RND<2/6 THEN 514 ELSE IF RND<3/6 THEN 517 ELSE IF RND<4/6 THEN 520 ELSE IF RND<5/6 THEN 523 ELSE 526
511 AHOR1=FIX(23+RND*5):BHOR1=FIX(23+RND*5)
512 X(AHOR1)=A(BHOR1):X(BHOR1)=A(AHOR1)
513 GOTO 533
514 AHOR2=FIX(28+RND*5):BHOR2=FIX(28+RND*5)
515 X(AHOR2)=A(BHOR2):X(BHOR2)=A(AHOR2)
516 GOTO 533
517 AHOR3=FIX(33+RND*5):BHOR3=FIX(33+RND*5)
518 X(AHOR3)=A(BHOR3):X(BHOR3)=A(AHOR3)
519 GOTO 533
520 AHOR4=FIX(38+RND*5):BHOR4=FIX(38+RND*5)
521 X(AHOR4)=A(BHOR4):X(BHOR4)=A(AHOR4)
522 GOTO 533
523 AHOR5=FIX(43+RND*5):BHOR5=FIX(43+RND*5)
524 X(AHOR5)=A(BHOR5):X(BHOR5)=A(AHOR5)
525 GOTO 533
526 AHOR6=FIX(48+RND*5):BHOR6=FIX(48+RND*5)
527 X(AHOR6)=A(BHOR6):X(BHOR6)=A(AHOR6)
533 X(1)=700*X(23)+1000*X(24)+1400*X(25)+2000*X(26)+2800*X(27)
534 X(2)=700*X(28)+1000*X(29)+1400*X(30)+2000*X(31)+2800*X(32)
535 X(3)=700*X(33)+1000*X(34)+1400*X(35)+2000*X(36)+2800*X(37)
536 X(4)=700*X(38)+1000*X(39)+1400*X(40)+2000*X(41)+2800*X(42)
537 X(5)=700*X(43)+1000*X(44)+1400*X(45)+2000*X(46)+2800*X(47)
538 X(6)=700*X(48)+1000*X(49)+1400*X(50)+2000*X(51)+2800*X(52)
541 REM FOR KKKQQQ=1 TO 10
542 REM KMID=1+FIX(RND*6)
543 REM X(KMID)=A(KMID)
545 REM NEXT KKKQQQ
559 PE=(250000!*X(7)/X(12)+150000!*X(8)/X(13)+180000!*X(9)/X(14)+160000!*X(10)/X(15)+120000!*X(11)/X(16))-6000
560 IF PE>0 THEN PE=PE ELSE PE=0
561 P(11)=X(1)-7.9*X(12)
562 P(12)=X(2)-2!*X(12)
563 P(13)=X(3)-5.2*X(12)
564 P(14)=X(4)-4.9*X(12)
565 P(15)=X(5)-6.1*X(12)
566 P(16)=X(6)-4.2*X(12)
567 P(17)=X(1)-.7*X(13)
568 P(18)=X(2)-.8*X(13)
569 P(19)=X(3)-.9*X(13)
570 P(20)=X(4)-3.4*X(13)
571 P(21)=X(5)-2.1*X(13)
572 P(22)=X(6)-2.5*X(13)
573 P(23)=X(1)-.7*X(14)
574 P(24)=X(2)-2.6*X(14)
575 P(25)=X(3)-1.6*X(14)
576 P(26)=X(4)-3.6*X(14)
577 P(27)=X(5)-3.2*X(14)
578 P(28)=X(6)-2.9*X(14)
579 P(29)=X(1)-4.7*X(15)
580 P(30)=X(2)-2.3*X(15)
581 P(31)=X(3)-1.6*X(15)
582 P(32)=X(4)-2.7*X(15)
583 P(33)=X(5)-1.2*X(15)
584 P(34)=X(6)-2.5*X(15)
585 P(35)=X(1)-1.2*X(16)
586 P(36)=X(2)-3.6*X(16)
587 P(37)=X(3)-2.4*X(16)
588 P(38)=X(4)-4.5*X(16)
589 P(39)=X(5)-1.6*X(16)
590 P(40)=X(6)-2.1*X(16)
598 REM
599 REM
601 P(51)=X(17)*X(7)-6.4
602 P(52)=X(18)*X(7)-4.7
603 P(53)=X(19)*X(7)-8.3
604 P(54)=X(20)*X(7)-3.9
605 P(55)=X(21)*X(7)-2.1
606 P(56)=X(22)*X(7)-1.2
607 P(57)=X(17)*X(8)-6.8
608 P(58)=X(18)*X(8)-6.4
609 P(59)=X(19)*X(8)-6.5
610 P(60)=X(20)*X(8)-4.4
611 P(61)=X(21)*X(8)-2.3
612 P(62)=X(22)*X(8)-3.2
613 P(63)=X(17)*X(9)-1!
614 P(64)=X(18)*X(9)-6.3
615 P(65)=X(19)*X(9)-5.4
616 P(66)=X(20)*X(9)-11.9
617 P(67)=X(21)*X(9)-5.7
618 P(68)=X(22)*X(9)-6.2
619 P(69)=X(17)*X(10)-3.2
620 P(70)=X(18)*X(10)-3!
621 P(71)=X(19)*X(10)-3.5
622 P(72)=X(20)*X(10)-3.3
623 P(73)=X(21)*X(10)-2.8
624 P(74)=X(22)*X(10)-3.4
625 P(75)=X(17)*X(11)-2.1
626 P(76)=X(18)*X(11)-2.5
627 P(77)=X(19)*X(11)-4.2
628 P(78)=X(20)*X(11)-3.6
629 P(79)=X(21)*X(11)-3.7
630 P(80)=X(22)*X(11)-2.2
698 FOR J99=11 TO 80
701 IF P(J99)<0 THEN P(J99)=P(J99) ELSE P(J99)=0
707 NEXT J99
860 REM IF P80<0 THEN P80=P80 ELSE P80=0
1201 PS1=555555!*P(11)+555555!*P(12)+555555!*P(13)+555555!*P(14)+555555!*P(15)+555555!*P(16)+555555!*P(17)+555555!*P(18)+555555!*P(19)+555555!*P(20)
1202 PS2=555555!*P(21)+555555!*P(22)+555555!*P(23)+555555!*P(24)+555555!*P(25)+555555!*P(26)+555555!*P(27)+555555!*P(28)+555555!*P(29)+555555!*P(30)
1203 PS3=555555!*P(31)+555555!*P(32)+555555!*P(33)+555555!*P(34)+555555!*P(35)+555555!*P(36)+555555!*P(37)+555555!*P(38)+555555!*P(39)+555555!*P(40)
1204 PS4=555555!*P(51)+555555!*P(52)+555555!*P(53)+555555!*P(54)+555555!*P(55)+555555!*P(56)+555555!*P(57)+555555!*P(58)+555555!*P(59)+555555!*P(60)
1205 PS5=555555!*P(61)+555555!*P(62)+555555!*P(63)+555555!*P(64)+555555!*P(65)+555555!*P(66)+555555!*P(67)+555555!*P(68)+555555!*P(69)+555555!*P(70)
1206 PS6=555555!*P(71)+555555!*P(72)+555555!*P(73)+555555!*P(74)+555555!*P(75)+555555!*P(76)+555555!*P(77)+555555!*P(78)+555555!*P(79)+555555!*P(80)
1331 IF X(1)<0 GOTO 1670
1332 IF X(2)<0 GOTO 1670
1333 IF X(3)<0 GOTO 1670
1334 IF X(4)<0 GOTO 1670
1335 IF X(5)<0 GOTO 1670
1336 IF X(6)<0 GOTO 1670
1447 P1=+250*X(17)*X(1)^.6+250*X(18)*X(2)^.6+250*X(19)*X(3)^.6+250*X(20)*X(4)^.6+250*X(21)*X(5)^.6+250*X(22)*X(6)^.6
1449 P=-P1-555555!*PE+PS1+PS2+PS3+PS4+PS5+PS6
1451 IF P<=M THEN 1670
1452 M=P
1453 PP1=P1
1454 FOR KLX=1 TO 52
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>-311111! THEN 1916 ELSE 1999
1916 PRINT JJJJ,A(1),A(2),A(3),A(4),A(5),A(6),A(7)
1917 PRINT A(8),A(9),A(10),A(11),A(12),A(13),A(14),A(15),A(16)
1918 PRINT A(17),A(18),A(19),A(20),A(21),A(22),M,PP1
1999 NEXT JJJJ
This BASIC computer program was run with the IBM basica/D interpreter, and the complete output through JJJJ=-31965 is shown below. What immediately follows is a hand copy from the computer monitor.
-31974 2800 2800 2000 2800
2800 2800 3.204196159815296
3.427538000227163 6.20660765280434 3.402775964803471
3.733087539647358 354.3944191583585 789.2668679826915
775.3079151609051 592.0924763738249 620.8664119971186
2 2 3 2 1
1 -305785.2087396884 305785.2087396884
-31965 2800 2800 2000 2800
2800 2800 3.211391861706783
3.411088322266029 6.217191439226166 3.461137432561529
3.745997704621568 354.4149842066293 823.1717387259257
776.5597498797503 591.4332323055568 612.4300365397437
2 2 3 2 1
1 -305785.2087396884 305785.2087396884
On a personal computer with an Intel 2.66 chip and the IBM basica/D interpreter, the running time from JJJJ=-32000 through JJJJ=-31965 was ten hours.
Line 1447 above can be modified to handle objective functions more complicated than the objective function shown in line 1447.
In general, with the present algorithm a usable solution may come early, late, or worse. To alleviate this shortcoming, one can simultaneously run independent computers with different line 88s. Here is one example: 88 FOR JJJ=1 TO 500 STEP 10, 88 FOR JJJ=1 TO 800 STEP 10, 88 FOR JJJ=1 TO 1000 STEP 10, 88 FOR JJJ=1 TO 1200 STEP 10, and 88 FOR JJJ=1 TO 2000 STEP 10.
References
[1] V. T. Voudouris, and I. E. Grossmann, "Mixed-integer linear programming reformulations for batch proxcess design with discrete equipment sizes," Ind. Eng. Chem. Res., Vol. 31, No. 5, 1992, pp. 1315-1325.
[2] I. E. Grossmann and R. W. H. Sargent, "Optimal design of multipurpose chemical plants," Ind. Eng. Chem. Process Des. Dev., Vol. 18, No. 2, 1979, pp. 343-348.
[3] R. L. Salcedo, "Solving nonconvex nonlinear programming and mixed-integer nonlinear programming problems with adaptive random search," Ind. Eng. Chem. Res., Vol. 31, No. 1, 1992, pp. 262-273.
[4] G. R. Kocis and I. E. Grossmann, "Global optimization of nonconvex mixed-integer nonlinear programming (MINLP) problem in process synthesis," Ind. Eng. Chem. Res., Vol. 27, No. 8, 1988, pp. 1407-1421.
[5] W. C. Conley, Optimization: A Simplified Approach. Petrocelli, Princeton, New Jersey, 1981, pp. 229-232.
[6] 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.
[7] Wong, J. Y. (2008, August 13). A Computer Program for Mixed-Integer Nonlinear Programming Formulations. Retrieved from http://www.wongsllblog.blogspot.com/2008/08/computer-program-for-mixed-integer.html