Monday, May 26, 2014

Testing the Nonlinear Integer Programming Solver with an Integer Version of Schittkowski's Test Problem 288

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve an integer version of Schittkowski's Problem 288 [11, p. 112]; only integer solutions are of interest in the present paper.  Thus, in the present paper the problem is to minimize the following:

  5
SIGMA   [  (X(i)+10*X(i+5) ) ^2  + 5*( X(i+10)- X(i+15)      )^2      +    ( X(i+5)-2
i=1

*X(i+10)   )^4     +    10*(X(i)-X(i+15)   )^4   ]

subject to -50<= X(j)<=50, X(j) integer, j=1, 2, 3,..., 20.  See Schittkowski [11, p. 112].

One notes line 112, line 213, and line 214, which are 112 A(J44)=-50+FIX(  RND*101),               213     IF X(J44)<-50 THEN X(J44)=A(J44), and 214     IF X(J44)>50 THEN X(J44)=A(J44), respectively.

0 REM  DEFDBL A-Z
1 DEFINT J,K,X,B
2 DIM A(10001),X(10001)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 20
112 A(J44)=-50+FIX(  RND*101)
113 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 20
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*21)
144    GOTO 167
150    R=(1-RND*2)*A(B)
155    IF RND<.5 THEN         160 ELSE 167
160    X(B)=(A(B)     +RND^3*R)
165 GOTO 168
167    IF RND<.5 THEN X(B)=CINT(A(B)-1) ELSE X(B)=CINT(A(B)     +1)
168 REM   IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
170 REM GOTO 220
212   FOR J44=1 TO 20
213     IF X(J44)<-50 THEN X(J44)=A(J44)
214     IF X(J44)>50 THEN X(J44)=A(J44)
215   NEXT J44
220 SUMM=0
222 FOR J44=1 TO 5
223 SUMM=SUMM+(X(J44)+10*X(J44+5) ) ^2  + 5*( X(J44+10)- X(J44+15)      )^2      +    ( X(J44+5)-2*X(J44+10)   )^4     +    10*(X(J44)-X(J44+15)   )^4
226 NEXT J44
229 REM   SUMX=    (SUMM    )  ^3
333 PD1=-SUMM
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 20
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1457 GOTO 1557
1544 IF M<-8 THEN 1557
1546 PRINT I,A(30),M,JJJJ
1557 GOTO 128
1670 NEXT I
1889 IF M<-5 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1905 PRINT A(6),A(7),A(8),A(9),A(10)
1906 PRINT A(11),A(12),A(13),A(14),A(15)
1907 PRINT A(16),A(17),A(18),A(19),A(20)
1927 PRINT M,JJJJ
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See [8].  The complete output through JJJJ=-31998 is copied by hand from the screen and shown below.  Immediately below there is no rounding by hand.

0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   -32000

0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   -31999

0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   -31998

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 obtaining the output through JJJJ=-31998 was 13 seconds.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] E. Balas, An Additive Algorithm for Solving Linear Programs with Zero-One Variables.    Operations Research, Vol. 13, No. 4 (1965), pp. 517-548.

[2] E. Balas, Discrete Programming by the Filter Method.  Operations Research, Vol. 15, No. 5 (Sep. - Oct., 1967), pp. 915-957.

[3] F. Cajori (1911) Historical Note on the Newton-Raphson Method of Approximation.  The American Mathematical Monthly, Volume 18 #2, pp. 29-32.

[4] Jack Lashover (November 12, 2012).  Monte Carlo Marching.  www.academia.edu/5481312/MONTE_ CARLO_MARCHING

[5] 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.

[6] E. L. Lawler, M. D. Bell, Errata: A Method for Solving Discrete Optimization Problems.  Operations Research, Vol. 15, No. 3 (May - June, 1967), p. 578.

[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming.  Publisher: Springer Science+Business Media,LLC (2006).  http://www.books.google.ca/books?isbn=0387329951

[8] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C,Boca Raton, Floridda 33432, 1981.

[9] Harvey M. Salkin, Integer Programming.  Menlo Park, California: Addison-Wesley Publishing Company (1975).

[10] Harvey M. Salkin, Kamlesh Mathur, Foundations of Integer Programming.  Publisher: Elsevier Science Ltd (1989).

[11] K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1987.

[12] Jsun Yui Wong (2012, April 23).  The Domino Method of General Integer Nonlinear Programming Applied to Problem 2 of Lawler and Bell.   http://computationalresultsfromcomputerprograms.wordpress.com/2012/04/23/

[13] Jsun Yui Wong (2013, September 4).  A Nonlinear Integer/Discrete/Continuous Programming Solver Applied to a Literature Problem with Twenty Binary Variables and Three Constraints, Third Edition.  http://myblogsubstance.typepad.com/substance/2013/09/

Sunday, May 25, 2014

Testing the Nonlinear Integer Programming Solver with an Integer Version of Schittkowski's Test Problem 283

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve an integer version of Schittkowski's Problem 283 [11, p. 107]; only integer solutions are of interest in the present paper.  Thus, in the present paper the problem is to minimize the following:

   10
[SIGMA   i^3*(X(i)-1) ^2   ]^3
  i=1

subject to -20<= X(i)<=20, X(i) integer, i=1, 2, 3,..., 10.  See Schittkowski [11, p. 107].

One notes line 112, line 203, and line 204, which are 112 A(J44)=-20+FIX(  RND*41), 203     IF X(J44)<-20 THEN X(J44)=A(J44), and 204     IF X(J44)>20 THEN X(J44)=A(J44), respectively.

0 REM  DEFDBL A-Z
1 DEFINT J,K,X,B
2 DIM A(10001),X(10001)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 10
112 A(J44)=-20+FIX(  RND*41)
113 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 10
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*11)
144    GOTO 167
150    R=(1-RND*2)*A(B)
155    IF RND<.5 THEN         160 ELSE 167
160    X(B)=(A(B)     +RND^3*R)
165 GOTO 168
167    IF RND<.5 THEN X(B)=CINT(A(B)-1) ELSE X(B)=CINT(A(B)     +1)
168 REM   IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
170 REM GOTO 220
212   FOR J44=1 TO 10
213     IF X(J44)<-20 THEN X(J44)=A(J44)
214     IF X(J44)>20 THEN X(J44)=A(J44)
215   NEXT J44
220 SUMM=0
222 FOR J44=1 TO 10
223 SUMM=SUMM+J44^3*(X(J44)-1) ^2
226 NEXT J44
229       SUMX=    (SUMM    )  ^3
333 PD1=-SUMX
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1457 GOTO 1557
1544 IF M<-8 THEN 1557
1546 PRINT I,A(30),M,JJJJ
1557 GOTO 128
1670 NEXT I
1889 IF M<-5 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1905 PRINT A(6),A(7),A(8),A(9),A(10)
1927 PRINT M,JJJJ
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See [8].  The complete output through JJJJ=-31998 is copied by hand from the screen and shown below.  Immediately below there is no rounding by hand.

1   1   1   1   1
1   1   1   1   1
0   -32000

1   1   1   1   1
1   1   1   1   1
0   -31999

1   1   1   1   1
1   1   1   1   1
0   -31998

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 obtaining the output through JJJJ=-31998 was 8 seconds.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] E. Balas, An Additive Algorithm for Solving Linear Programs with Zero-One Variables.    Operations Research, Vol. 13, No. 4 (1965), pp. 517-548.

[2] E. Balas, Discrete Programming by the Filter Method.  Operations Research, Vol. 15, No. 5 (Sep. - Oct., 1967), pp. 915-957.

[3] F. Cajori (1911) Historical Note on the Newton-Raphson Method of Approximation.  The American Mathematical Monthly, Volume 18 #2, pp. 29-32.

[4] Jack Lashover (November 12, 2012).  Monte Carlo Marching.  www.academia.edu/5481312/MONTE_ CARLO_MARCHING

[5] 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.

[6] E. L. Lawler, M. D. Bell, Errata: A Method for Solving Discrete Optimization Problems.  Operations Research, Vol. 15, No. 3 (May - June, 1967), p. 578.

[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming.  Publisher: Springer Science+Business Media,LLC (2006).  http://www.books.google.ca/books?isbn=0387329951

[8] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C,Boca Raton, Floridda 33432, 1981.

[9] Harvey M. Salkin, Integer Programming.  Menlo Park, California: Addison-Wesley Publishing Company (1975).

[10] Harvey M. Salkin, Kamlesh Mathur, Foundations of Integer Programming.  Publisher: Elsevier Science Ltd (1989).

[11] K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1987.

[12] Jsun Yui Wong (2012, April 23).  The Domino Method of General Integer Nonlinear Programming Applied to Problem 2 of Lawler and Bell.   http://computationalresultsfromcomputerprograms.wordpress.com/2012/04/23/

[13] Jsun Yui Wong (2013, September 4).  A Nonlinear Integer/Discrete/Continuous Programming Solver Applied to a Literature Problem with Twenty Binary Variables and Three Constraints, Third Edition.  http://myblogsubstance.typepad.com/substance/2013/09/

Saturday, May 24, 2014

Testing the Nonlinear Integer Programming Solver with an Integer Version of Schittkowski's Test Problem 272

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve an integer version of Schittkowski's Problem 272 [11, p. 96]; only integer solutions are of interest in the present paper.  Hence in the present paper the problem is to minimize the following:

  13
SIGMA  ( X(4)*EXP(-X(1)*T(i) )-X(5)*EXP(-X(2)*T(i)  ) +X(6)*EXP(-X(3)*T(i) ) -Y(i) )^2
 i=1

where Y(i)=EXP( -T(i)    )-5*EXP(-10*T(i)     )      +3*EXP(-4*T(i)    ),

T(i)=i/10

subject to -20<= X(j)<=20, X(j) integer, j=1, 2, 3,..., 6.  See Schittkowski [11, p. 96].

One notes line 203 and line 204, which are 203     IF X(J44)<-20 THEN X(J44)=A(J44) and
204     IF X(J44)>20 THEN X(J44)=A(J44), respectively.

0 REM  DEFDBL A-Z
1 DEFINT J,K,X,B
2 DIM A(1001),X(1001),T(111),Y(111)
72 FOR J44=1 TO 13
73 T(J44)=J44/10
74 NEXT J44
75   FOR J44=1 TO 13
76 Y(J44)=EXP( -T(J44)    )-5*EXP(-10*T(J44)     )      +3*EXP(-4*T(J44)    )
78   NEXT J44
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 6
112 A(J44)=-20+FIX(  RND*41)
113 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 6
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*6)
144    GOTO 167
150    R=(1-RND*2)*A(B)
155    IF RND<.5 THEN         160 ELSE 167
160    X(B)=(A(B)     +RND^3*R)
165 GOTO 168
167    IF RND<.5 THEN X(B)=CINT(A(B)-1) ELSE X(B)=CINT(A(B)     +1)
168 REM   IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
170 REM GOTO 220
202   FOR J44=1 TO 6
203     IF X(J44)<-20 THEN X(J44)=A(J44)
204     IF X(J44)>20 THEN X(J44)=A(J44)
205   NEXT J44
220 SUMM=0
222 FOR J44=1 TO 13
223 SUMM=SUMM+( X(4)*EXP(-X(1)*T(J44) )-X(5)*EXP(-X(2)*T(J44)  ) +X(6)*EXP(-X(3)*T(J44) ) -Y(J44)     )^2
226 NEXT J44
229 REM SUMX=SUMM^(1/3)
333 PD1=-SUMM
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 6
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1457 GOTO 1557
1544 IF M<-8 THEN 1557
1546 PRINT I,A(30),M,JJJJ
1557 GOTO 128
1670 NEXT I
1889 IF M<-.01 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1905 PRINT A(6),M,JJJJ
1927 REM PRINT M,JJJJ
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See [8].  The complete output through JJJJ=-31742 is copied by hand from the screen and shown below.  Immediately below there is no rounding by hand.

10   1   4   -5   -1
3   0   -31999

1   10   4   1   5
3   0   -31924

1   10   4   1   5
3   0   -31891

10   1   4   -5   -1
3   0   -31849

4   10   1   3   5
1   -8.881784E-16   -31791

1   10   4   1   5
3   0   -31762

4   1   10   3   -1
-5   -5.684342E-14   -31742

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 obtaining the output through JJJJ=-31742 was 22 minutes.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] E. Balas, An Additive Algorithm for Solving Linear Programs with Zero-One Variables.    Operations Research, Vol. 13, No. 4 (1965), pp. 517-548.

[2] E. Balas, Discrete Programming by the Filter Method.  Operations Research, Vol. 15, No. 5 (Sep. - Oct., 1967), pp. 915-957.

[3] F. Cajori (1911) Historical Note on the Newton-Raphson Method of Approximation.  The American Mathematical Monthly, Volume 18 #2, pp. 29-32.

[4] Jack Lashover (November 12, 2012).  Monte Carlo Marching.  www.academia.edu/5481312/MONTE_ CARLO_MARCHING

[5] 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.

[6] E. L. Lawler, M. D. Bell, Errata: A Method for Solving Discrete Optimization Problems.  Operations Research, Vol. 15, No. 3 (May - June, 1967), p. 578.

[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming.  Publisher: Springer Science+Business Media,LLC (2006).  http://www.books.google.ca/books?isbn=0387329951

[8] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C,Boca Raton, Floridda 33432, 1981.

[9] Harvey M. Salkin, Integer Programming.  Menlo Park, California: Addison-Wesley Publishing Company (1975).

[10] Harvey M. Salkin, Kamlesh Mathur, Foundations of Integer Programming.  Publisher: Elsevier Science Ltd (1989).

[11] K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1987.

[12] Jsun Yui Wong (2012, April 23).  The Domino Method of General Integer Nonlinear Programming Applied to Problem 2 of Lawler and Bell.   http://computationalresultsfromcomputerprograms.wordpress.com/2012/04/23/

[13] Jsun Yui Wong (2013, September 4).  A Nonlinear Integer/Discrete/Continuous Programming Solver Applied to a Literature Problem with Twenty Binary Variables and Three Constraints, Third Edition.  http://myblogsubstance.typepad.com/substance/2013/09/

Friday, May 23, 2014

Testing the Nonlinear Integer Programming Solver with an Integer Version of Schittkowski's Problem 286

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve an integer version of Schittkowski's Problem 286 [11, p. 110]; only integer solutions are of interest in the present paper.  Hence in the present paper the problem is to minimize the following:

10
SIGMA ( 100*(  X(i)^2-X(i+10)  )^2  +  ( X(i )  -1  )  ^2  )
i=1

subject to -10<= X(i)<=10, X(i) integer, i=1, 2, 3,..., 20.  See Schittkowsi [11, p. 110].

0 REM  DEFDBL A-Z
1 DEFINT J,K,X,B
2 DIM A(10001),X(10001)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 20
112 A(J44)=-10+FIX(  RND*21)
113 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 20
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*21)
144    GOTO 167
150    R=(1-RND*2)*A(B)
155    IF RND<.5 THEN         160 ELSE 167
160    X(B)=(A(B)     +RND^3*R)
165 GOTO 168
167    IF RND<.5 THEN X(B)=CINT(A(B)-1) ELSE X(B)=CINT(A(B)     +1)
168 REM   IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
170 REM GOTO 220
212   FOR J44=1 TO 20
213     IF X(J44)<-10 THEN X(J44)=A(J44)
214     IF X(J44)>10 THEN X(J44)=A(J44)
215   NEXT J44
220 SUMM=0
222 FOR J44=1 TO 10
223 SUMM=SUMM+( 100*(  X(J44)^2-X(J44+10)  )^2  +  ( X( J44 )  -1  )  ^2  )
226 NEXT J44
333 PD1=-SUMM
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 20
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1457 GOTO 1557
1544 IF M<-8 THEN 1557
1546 PRINT I,A(20),M,JJJJ
1557 GOTO 128
1670 NEXT I
1889 IF M<-2 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1905 PRINT A(6),A(7),A(8),A(9),A(10)
1906 PRINT A(11),A(12),A(13),A(14),A(15)
1907 PRINT A(16),A(17),A(18),A(19),A(20)
1927 PRINT M,JJJJ
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See [8].  The complete output through JJJJ=-31636 is copied by hand from the screen and shown below.  Immediately below there is no rounding by hand.

1   1   1   1   2
1   1   1   2   1
1   1   1   1   4
1   1   1   4   1
-2   -31986

1   1   1   1   1
1   2   1   1   1
1   1   1   1   1
1   4   1   1   1
-1   -31834

1   1   1   2   1
2   1   1   1   1
1   1   1   4   1
4   1   1   1   1
-2   -31833

1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
0   -31636
 
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 obtaining the output through JJJJ=-31636 was 23 minutes.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] E. Balas, An Additive Algorithm for Solving Linear Programs with Zero-One Variables.    Operations Research, Vol. 13, No. 4 (1965), pp. 517-548.

[2] E. Balas, Discrete Programming by the Filter Method.  Operations Research, Vol. 15, No. 5 (Sep. - Oct., 1967), pp. 915-957.

[3] F. Cajori (1911) Historical Note on the Newton-Raphson Method of Approximation.  The American   Mathematical Monthly American , Volume 18 #2, pp. 29-32.

[4] Jack Lashover (November 12, 2012).  Monte Carlo Marching.  www.academia.edu/5481312/MONTE_ CARLO_MARCHING

[5] 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.

[6] E. L. Lawler, M. D. Bell, Errata: A Method for Solving Discrete Optimization Problems.  Operations Research, Vol. 15, No. 3 (May - June, 1967), p. 578.

[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming.  Publisher: Springer Science+Business Media,LLC (2006).  http://www.books.google.ca/books?isbn=0387329951

[8] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C,Boca Raton, Floridda 33432, 1981.

[9] Harvey M. Salkin, Integer Programming.  Menlo Park, California: Addison-Wesley Publishing Company (1975).

[10] Harvey M. Salkin, Kamlesh Mathur, Foundations of Integer Programming.  Publisher: Elsevier Science Ltd (1989).

[11] K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1987.

[12] Jsun Yui Wong (2012, April 23).  The Domino Method of General Integer Nonlinear Programming Applied to Problem 2 of Lawler and Bell.   http://computationalresultsfromcomputerprograms.wordpress.com/2012/04/23/

[13] Jsun Yui Wong (2013, September 4).  A Nonlinear Integer/Discrete/Continuous Programming Solver Applied to a Literature Problem with Twenty Binary Variables and Three Constraints, Third Edition.  http://myblogsubstance.typepad.com/substance/2013/09/

Tuesday, May 20, 2014

Erratum: A Nonlinear Integer/Continuous/Discrete Programming Solver Applied to a Modified Rosenbrock Function of 9500 Binary Variables and to Newton's Original Equation X(1)^3-2*X(1)-5=0

Jsun Yui Wong

The second last paragraph preceding the second computer program should read as follows:

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 obtaining the output shown above was six hours.

A Nonlinear Integer/Continuous/Discrete Programming Solver Applied to a Modified Rosenbrock Function of 9500 Binary Variables and to Newton's Original Equation X(1)^3-2*X(1)-5=0

Jsun Yui Wong

The following computer program seeks to solve Li and Sun's Problem 14.4, [7, p. 415], but with n=9500 integer unknowns and 0<=X(i)<=+1, as shown in in line 110, line 112, and line 168.  One notes line 110, line 112, and line 113, which are 110 FOR J44=1 TO 9500, 112 A(J44)=FIX(  RND*2), and 113 NEXT J44.

In other words, the problem is to minimize the following:

n-1
SIGMA   [   100*(  X( i+1 ) -X(i)^2  )^2+(1-X( i))^2     ]
i=1

subject to lower bound<=X(i)<=upper bound, X(i) integer, i=1, 2, 3,..., n.  See Li and Sun [7, p. 415].

0 REM  DEFDBL A-Z
1 DEFINT J,K,X
2 DIM A(10001),X(10001)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 9500
112 A(J44)=FIX(  RND*2)
113 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 9500
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*9501)
144    GOTO 168
150    R=(1-RND*2)*A(B)
155    IF RND<.5 THEN         160 ELSE 167
160    X(B)=(A(B)     +RND^3*R)
165 GOTO 168
167    IF RND<.5 THEN X(B)=A(B)-1 ELSE X(B)=A(B)     +1
168   IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
170 GOTO 220
182   FOR J44=1 TO 5000
183     IF X(J44)<-5 THEN X(J44)=A(J44)
184     IF X(J44)>5 THEN X(J44)=A(J44)
185   NEXT J44
220 SUMM=0
222 FOR J44=1 TO 9499
223 SUMM=SUMM+     100*(  X( J44 +1 ) -X(J44)^2  )^2+(1-X( J44))^2
226 NEXT J44
333 PD1=-SUMM
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 9500
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1544 IF M<-8 THEN 1557
1546 PRINT I,A(9500),M,JJJJ
1557 GOTO 128
1670 NEXT I
1889   IF M<-999 THEN 2999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1911 PRINT A(102),A(104),A(106),A(107),A(109)
1913 PRINT A(193),A(197),A(198),A(199),A(200)
1916 PRINT A(202),A(207),A(208),A(209),A(233)
1917 PRINT A(294),A(297),A(298),A(299),A(300)
1918 PRINT A(700),A(702),A(703),A(704),A(705)
1919 PRINT A(902),A(904),A(906),A(907),A(909)
1921 PRINT A(1096),A(1097),A(1098),A(1099),A(1100)
1926 PRINT A(9496),A(9497),A(9498),A(9499),A(9500)
1927 PRINT M,JJJJ
2999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See [8].  The output below is copied by hand from the screen.  Immediately below there is no rounding by hand.

650   1   0   -32000
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
0   -32000
14892   1   0   -31999
 
Specified by line 1904 through line 1926, only 45 A's of the 9500 A's are shown above.      

The word PRINT in the computer program above can be replaced by the word LPRINT for printing on paper.

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 obtaining the output shown above was eight hours.

Similar to the computer program above, the following computer program seeks to solve Newton's original equation X(1)^3-2*X(1)-5=0; see Cajori [3, pp. 29-30] and Lashover [4, pp. 39-40]. One notes line 114, which is 114    A(J44)=-50+(  RND*100).

0   DEFDBL A-Z
1 DEFINT I,J,K
2 DIM A(1000),X(1000)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 1
112 REM    A(J44)=FIX(  RND*2)
113 REM   NEXT J44
114    A(J44)=-50+(  RND*100)
116 NEXT J44
128 FOR I=1 TO 500
129 FOR KKQQ=1 TO 1
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*.3)
140 REM B=1+FIX(RND*8001)
141 B=1
144 REM      GOTO 168
150    R=(1-RND*2)*A(B)
155 REM   IF RND<.5 THEN         160 ELSE 167
160    X(B)=(A(B)     +RND^3*R)
165 GOTO 251
167    IF RND<.5 THEN X(B)=A(B)-1 ELSE X(B)=A(B)     +1
168   IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
170 GOTO 220
182   FOR J44=1 TO 5000
183     IF X(J44)<-5 THEN X(J44)=A(J44)
184     IF X(J44)>5 THEN X(J44)=A(J44)
185   NEXT J44
220 SUMM=0
222 FOR J44=1 TO 7999
223 SUMM=SUMM+     100*(  X( J44 +1 ) -X(J44)^2  )^2+(1-X( J44))^2
226 NEXT J44
251 N=X(1)^3-2*X(1)-5
333 REM     PD1=-SUMM
444 PD1=-ABS(N)
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 1
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1544 REM  IF M<-8 THEN 1557
1546 REM   PRINT I,A(8000),M,JJJJ
1557 GOTO 128
1670 NEXT I
1889   IF M<-.0000001 THEN 2999
1904 PRINT A(1),M,JJJJ
1911    GOTO 2999
1913 PRINT A(193),A(197),A(198),A(199),A(200)
1916 PRINT A(202),A(207),A(208),A(209),A(233)
1917 PRINT A(294),A(297),A(298),A(299),A(300)
1918 PRINT A(700),A(702),A(703),A(704),A(705)
1919 PRINT A(902),A(904),A(906),A(907),A(909)
1921 PRINT A(1096),A(1097),A(1098),A(1099),A(1100)
1926 PRINT A(7996),A(7997),A(7998),A(7999),A(8000)
1927 PRINT M,JJJJ
2999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See [8].  The complete output through JJJJ=-31990 is copied by hand from the screen and shown below.  Immediately below there is no rounding by hand.

2.094551478163554   -3.771196066537641D-08   -31999

2.09455148846776    -7.729779427645411D-08   -31997

2.094551489702948   -9.368674946941269D-09   -31990

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 obtaining the output through JJJJ=-31990 was one second.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] E. Balas, An Additive Algorithm for Solving Linear Programs with Zero-One Variables.    Operations Research, Vol. 13, No. 4 (1965), pp. 517-548.

[2] E. Balas, Discrete Programming by the Filter Method.  Operations Research, Vol. 15, No. 5 (Sep. - Oct., 1967), pp. 915-957.

[3] F. Cajori (1911) Historical Note on the Newton-Raphson Method of Approximation.  The American Mathematical Monthly, Volume 18 #2, pp. 29-32.

[4] Jack Lashover (November 12, 2012).  Monte Carlo Marching.  www.academia.edu/5481312/MONTE_ CARLO_MARCHING

[5] 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.

[6] E. L. Lawler, M. D. Bell, Errata: A Method for Solving Discrete Optimization Problems.  Operations Research, Vol. 15, No. 3 (May - June, 1967), p. 578.

[7] Duan Li, Xiaoling Sun, Nonlinear Integer Programming.  Publisher: Springer Science+Business Media,LLC (2006).  http://www.books.google.ca/books?isbn=0387329951

[8] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C,Boca Raton, Floridda 33432, 1981.

[9] Harvey M. Salkin, Integer Programming.  Menlo Park, California: Addison-Wesley Publishing Company (1975).

[10] Harvey M. Salkin, Kamlesh Mathur, Foundations of Integer Programming.  Publisher: Elsevier Science Ltd (1989).

[11] K. Schittkowski, More Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1987.

[12] Jsun Yui Wong (2012, April 23).  The Domino Method of General Integer Nonlinear Programming Applied to Problem 2 of Lawler and Bell.   http://computationalresultsfromcomputerprograms.wordpress.com/2012/04/23/

[13] Jsun Yui Wong (2013, September 4).  A Nonlinear Integer/Discrete/Continuous Programming Solver Applied to a Literature Problem with Twenty Binary Variables and Three Constraints, Third Edition.  http://myblogsubstance.typepad.com/substance/2013/09/

Another Test

This is just a test.

Test

This is just test.