Saturday, August 30, 2014

A Unified Computer Program Solving Li and Sun's Problem 14.3; the Case of 200 Unknowns with Search Intervals of -10 to 10

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.3, [10, p. 414], but with 200 unknowns with search intervals of
-10 to 10 instead of 100 unknowns with search intervals of -5 to 5.  Specifically the computer program below tries to minimize the following:

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

subject to -10<=X(i)<=10, X(i) integer, i=1, 2, 3,..., 200.

One notes line 114, line 174, and line 175, which are as follows:
114 A(J44 )=-10+FIX(   RND*21)
174 IF X(J44)>10 THEN X(J44 )=A(J44  )
175 IF X(J44)<-10 THEN X(J44 )=A(J44  ).

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 200
114 A(J44 )=-10+FIX(   RND*21)
115 REM IF RND<.5 THEN A(J44 )=2 +FIX(RND*4 )  ELSE A(J44)=-5+FIX(RND*6)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 200
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*200)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 200
174 IF X(J44)>10 THEN X(J44 )=A(J44  )
175 IF X(J44)<-10 THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 199
411 SONE=SONE+   (200-J44) *  ( X(J44)^2  - X(J44+1))   ^2
421 NEXT J44
551 SUMX=(X(1)-1)^2 + (X(200) -1 )^2+200*SONE
689 REM PD1=-SONE
699 PD1=-SUMX
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 200
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-1000 THEN 1999
1936 PRINT A(1),A(2),A(198),A(199),A(200)
1939 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 the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-31962 is shown below:

0   0   0   0   0
-2   -32000

0   0   0   0   0
-2   -31997

-1   1   1   1   1
-4   -31996

1   1   1   1   1
0   -31994

-1   1   1   2   4
-413   -31992

-1   1   1   2   4
-413   -31988

0   0   0   0   0
-2   -31981

-1   1   1   2   4
-413   -31980

-1   1   1   1   1
-4   -31979

-1   1   1   1   1
-4   -31978

-1   1   1   1   1
-4   -31975

0   0   0   0   0
-2   -31972

0   0   0   0   0
-2   -31971

1   1   1   2   4
-409   -31970

-1   1   1   1   1
-4   -31968

0   0   0   0   0
-2   -31967

-1   1   1   2   4
-413   -31965

1   1   1   1   1
0   -31964

-1   1   1   2   4
-413   -31963

1   1   1   1   1
0   -31962

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 414].

Of the 200 A's, only the 5 A's of line 1936 are shown above.

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=-31962 was 63 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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

A Unified Computer Program Solving Li and Sun's Problem 14.3 but with 1000 Unknowns instead of 100 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.3 but with 1000 unknowns instead of 100 unknowns, [10, p. 414].  Specifically the computer program below tries to minimize the following:

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

subject to -5<=X(i)<=5, X(i) integer, i=1, 2, 3,..., 1000.

One notes line 114, line 174, and line 175, which are as follows:
114 A(J44 )=-5+FIX(   RND*11)
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<-5 THEN X(J44 )=A(J44  )

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 1000
114 A(J44 )=-5+FIX(   RND*11)
115 REM IF RND<.5 THEN A(J44 )=2 +FIX(RND*4 )  ELSE A(J44)=-5+FIX(RND*6)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 1000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*1000)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 1000
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<-5 THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 999
411 SONE=SONE+   (1000-J44) *  ( X(J44)^2  - X(J44+1))   ^2
421 NEXT J44
551 SUMX=(X(1)-1)^2 + (X(1000) -1 )^2+1000*SONE
689 REM PD1=-SONE
699 PD1=-SUMX
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 1000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 REM IF M<-100 THEN 1999
1936 PRINT A(1),A(2),A(998),A(999),A(1000)
1939 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 the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-31998 is shown below:

0   0   0   0   0
-2   -32000

0   0   1   2   4
-5010   -31999

1   1   1   1   1
0   -31998

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 414].

Of the 1000 A's, only the 5 A's of line 1936 are shown above.

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 7 hours and a half.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Thursday, August 28, 2014

A Unified Computer Program Solving Li and Sun's Problem 14.4, Which is Based on the Rosenbrock Function; the Case of 10000 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.4, [10, p. 415], but with 10,000 unknowns instead of 100 unknowns.  Specifically the computer program below tries to minimize the following:

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

subject to -5<=X(i)<=5, X(i) integer, i=1, 2, 3,..., 10000.

One notes line 114, line 174, and line 175.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 10000
114 A(J44 )=-5+FIX(   RND*11)
115 REM IF RND<.5 THEN A(J44 )=2 +FIX(RND*4 )  ELSE A(J44)=-5+FIX(RND*6)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 10000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*10000)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 10000
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<-5 THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 9999
411 SONE=SONE+  100*  ( X(J44+1) - X(J44)^2  )^2  +  (  1-X(J44)   )^2
421 NEXT J44
689 PD1=-SONE
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-100 THEN 1999
1936 PRINT A(1),A(2),A(9998),A(9999),A(10000)
1939 PRINT M,JJJJ,LB,UB
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-32000 is shown below:

1   1   1   1   1
0   -32000   0   0

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 415].

Of the 10,000 A's, only the 5 A's of line 1936 are shown above.

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=-32000 was 8 hours.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Tuesday, August 26, 2014

A Unified Computer Program Solving Li and Sun's Problem 14.4, Which is Based on the Rosenbrock Function

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.4, [10, p. 415], but with 300 unknowns instead of 100 unknowns.  Specifically the computer program below tries to minimize the following:

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

subject to -5<=X(i)<=5, X(i) integer, i=1, 2, 3,..., 300.

One notes line 85, line 86, line 174, and line 175.

For the purpose of testing the algorithm, none of the 300 elements of the starting solution vector of each JJJJ is made one, the optimal; see line 111 through line 117, which are as follows:
111 FOR J44=1 TO 300
114 IF RND<.5 THEN A(J44 )=2 +FIX(RND*4 )  ELSE A(J44)=-5+FIX(RND*6)
117 NEXT J44.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
85 LB=-FIX(RND*6)
86 UB=FIX(RND*6)
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 300
114 IF RND<.5 THEN A(J44 )=2 +FIX(RND*4 )  ELSE A(J44)=-5+FIX(RND*6)
117 NEXT J44
128 FOR I=1 TO 3200
129 FOR KKQQ=1 TO 300
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*300)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 300
174 IF X(J44)>UB THEN X(J44 )=A(J44  )
175 IF X(J44)<LB THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 299
411 SONE=SONE+  100*  ( X(J44+1) - X(J44)^2  )^2  +  (  1-X(J44)   )^2
421 NEXT J44
689 PD1=-SONE
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 300
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-100 THEN 1999
1936 PRINT A(96),A(97),A(298),A(299),A(300)
1939 PRINT M,JJJJ,LB,UB
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-31928 is shown below:

1   1   1   1   1
-4   -31989   -4   4

1   1   1   1   1
-4   -31966   -5   5

1   1   1   1   1
0   -31963   -5   4

1   1   1   1   1
0   -31962   -5   4

1   1   1   1   1
-4   -31936   -4   5

1   1   1   1   1
-4   -31935   -4   4

1   1   1   1   1
-4   -31934   -4   4

1   1   1   1   1
0   -31928   -4   4

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 415].

Of the 300 A's, only the 5 A's of line 1936 are shown above.

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=-31928 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, Volume 18 #2, pp. 29-32.

[4] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

A Unified Computer Program Solving Li and Sun's Problem 14.5 but with 10000 Unknowns instead of 100 Unknowns, Second Edition

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.5, [10, p. 416], but with 10000 unknowns instead of 100 unknowns.  Specifically the computer program below tries to minimize the following:

10000                                10000
SIGMA   (X(i))^4    +    [  SIGMA   X(i)  ]^2
i=1                                      i=1

subject to -5<=X(i)<=5, X(i) integer, i=1, 2, 3,..., 10000.

One notes line 85 and line 175, which are 85 LB=-FIX(RND*6) and
175 IF X(J44)<LB THEN X(J44 )=A(J44  ).

For the purpose of testing, none of the 1000 elements of the starting solution vectors is made zero, the optimal; see line 111 through line 117, which are as follows:
111 FOR J44=1 TO 10000
114 A(J44)=1+FIX(RND*5)
117 NEXT J44.

The present edition has more computational results than the earlier edition.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
85 LB=-FIX(RND*6)
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 10000
114 A(J44)=1+FIX(RND*5)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 10000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*10000)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 10000
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<LB THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 10000
411 SONE=SONE+        (X(J44))^4
421 NEXT J44
501 STWO=0
502 FOR J44=1 TO 10000
511 STWO=STWO+        (X(J44))
521 NEXT J44
688 PD1=-SONE-STWO^2
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 REM IF M<-2 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1936 PRINT A(9996),A(9997),A(9998),A(9999),A(10000)
1939 PRINT M,JJJJ,LB
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-31998 is shown below:

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

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

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

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 416].

Of the 10000 A's, only the 10 A's of line 1923 and line 1936 are shown above.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Monday, August 25, 2014

A Unified Computer Program Solving Li and Sun's Problem 14.5 but with 10000 Unknowns instead of 100 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.5, [10, p. 416], but with 10,000 unknowns instead of 100 unknowns.  Specifically the computer program below tries to minimize the following:

10000                                 10000
SIGMA    (X(i))^4    +    [  SIGMA    X(i)  ]^2
i=1                                      i=1

subject to -5<=X(i)=5, X(i) integer, i=1, 2, 3,..., 10000.

One notes line 85 and line 175, which are 85 LB=-FIX(RND*6) and
175 IF X(J44)<LB THEN X(J44 )=A(J44  ).

For the purpose of testing, none of the 10000 elements of each starting solution vector is made zero, the optimal; see line 111 through line 117, which are as follows:
111 FOR J44=1 TO 10000
114 A(J44)=1+FIX(RND*5)
117 NEXT J44.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
85 LB=-FIX(RND*6)
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 10000
114 A(J44)=1+FIX(RND*5)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 10000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*10000)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 10000
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<LB THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 10000
411 SONE=SONE+        (X(J44))^4
421 NEXT J44
501 STWO=0
502 FOR J44=1 TO 10000
511 STWO=STWO+        (X(J44))
521 NEXT J44
688 PD1=-SONE-STWO^2
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 REM IF M<-2 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1936 PRINT A(9996),A(9997),A(9998),A(9999),A(10000)
1939 PRINT M,JJJJ,LB
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-32000 is shown below:

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

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 416].

Of the 10000 A's, only the 10 A's of line 1923 and line 1936 are shown above.

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=-32000 was 6 hours.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Sunday, August 24, 2014

A Unified Computer Program Solving Li and Sun's Problem 14.5 but with 10000 Unknowns instead of 100 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.5, [10, p. 416], but with 10000 unknowns instead of 100 unknowns.  Specifically the computer program below tries to minimize the following:

10000                               10000
SIGMA   (X(i))^4    +    [  SIGMA   X(i)  ]^2
i=1                                     i=1

subject to -5<=X(i)=5, X(i) integer, i=1, 2, 3,..., 10000.  See line 111 through line 117 and line 171 through line 177.

One notes line 85 and line 175, which are 85 LB=-FIX(RND*6) and 175 IF X(J44)<LB THEN X(J44 )=A(J44  ).

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
85 LB=-FIX(RND*6)
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 10000
114 A(J44)=LB+FIX(RND*6)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 10000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*10000)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 10000
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<LB THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 10000
411 SONE=SONE+        (X(J44))^4
421 NEXT J44
501 STWO=0
502 FOR J44=1 TO 10000
511 STWO=STWO+        (X(J44))
521 NEXT J44
688 PD1=-SONE-STWO^2
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 REM   IF M<-2 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1934 PRINT A(96),A(97),A(98),A(99),A(100)
1935 PRINT A(996),A(997),A(998),A(999),A(1000)
1936 PRINT A(9996),A(9997),A(9998),A(9999),A(10000)
1939 PRINT M,JJJJ,LB
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-31999 is shown below:

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

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

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 416].

Of the 10000 A's, only the 20 A's of line 1923 through line 1936 are shown above.

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=-31999 was seven hours and a half.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Saturday, August 23, 2014

A Unified Computer Program Solving Li and Sun's Problem 14.5 but with 6000 Unknowns instead of 100 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.5, [10, p. 416], but with 6000 unknowns instead of 100 unknowns.  Specifically the computer program below tries to minimize the following:

6000                                  6000
SIGMA   (X(i))^4    +    [  SIGMA   X(i)  ]^2
i=1                                     i=1

subject to -5<=X(i)=5, X(i) integer, i=1, 2, 3,..., 6000.  See line 111 through line 117 and line 171 through line 177.

One notes line 85 and line 175, which are 85 LB=-FIX(RND*6) and 175 IF X(J44)<LB THEN X(J44 )=A(J44  ).

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
85 LB=-FIX(RND*6)
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 6000
114 A(J44)=LB+FIX(RND*6)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 6000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*6000)
143 GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 6000
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<LB THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 6000
411 SONE=SONE+        (X(J44))^4
421 NEXT J44
501 STWO=0
502 FOR J44=1 TO 6000
511 STWO=STWO+        (X(J44))
521 NEXT J44
688 PD1=-SONE-STWO^2
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 6000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 REM   IF M<-2 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1934 PRINT A(96),A(97),A(98),A(99),A(100)
1935 PRINT A(996),A(997),A(998),A(999),A(1000)
1936 PRINT A(5996),A(5997),A(5998),A(5999),A(6000)
1939 PRINT M,JJJJ,LB
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-32000 is shown below:

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

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 416].

Of the 6000 A's, only the 20 A's of line 1923 through line 1936 are shown above.

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=-32000 was one hour and fifty 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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

A Unified Computer Program Solving Li and Sun's Problem 14.5 but with 3000 Unknowns instead of 100 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Li and Sun's Problem 14.5, [10, p. 416], but with 3000 unknowns instead of 100 unknowns.  Specifically the computer program below tries to minimize the following:

3000                                  3000
SIGMA   (X(i))^4    +    [  SIGMA   X(i)  ]^2
i=1                                     i=1

subject to -5<=X(i)=5, X(i) integer, i=1, 2, 3,..., 3000.  See line 111 through line 117 and line 171 through line 177.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
81 FOR JJJJ=-32000 TO 32000
85 LB=-FIX(RND*6)
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 3000
114 A(J44)=LB+FIX(RND*6)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 3000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*3000)
143    GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 3000
174 IF X(J44)>5 THEN X(J44 )=A(J44  )
175 IF X(J44)<LB THEN X(J44 )=A(J44  )
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 3000
411 SONE=SONE+        (X(J44))^4
421 NEXT J44
501 STWO=0
502 FOR J44=1 TO 3000
511 STWO=STWO+        (X(J44))
521 NEXT J44
688 PD1=-SONE-STWO^2
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 3000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 REM   IF M<-2 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1934 PRINT A(96),A(97),A(98),A(99),A(100)
1935 PRINT A(996),A(997),A(998),A(999),A(1000)
1936 PRINT A(2996),A(2997),A(2998),A(2999),A(3000)
1939 PRINT M,JJJJ,LB
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft's GW-BASIC 3.11 interpreter for DOS.  See the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-31999 is shown below:

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

-1   -1   0   0   1
-1   1   1   0   0
1   -1   0   -1   -1
0   -1   -1   0   -1
-1746      -31999      -2

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 416].

Of the 3000 A's, only the 20 A's of line 1923 through line 1936 are shown above.

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=-31999 was one hour.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Friday, August 22, 2014

A Unified Computer Program Solving a Problem with 10000 General Integer Variables That Is Based on Li and Sun's Problem 14.5

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve a problem based on Li and Sun's Problem 14.5, [10, p. 416].  Specifically the computer program below tries to minimize the following:

10000                               10000
SIGMA   (X(i))^4    +    [  SIGMA   X(i)  ]^2
i=1                                     i=1

subject to X(i)=0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, i=1, 2, 3,..., 10000.  See line 111 through line 117 and line 171 through line 177.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 10000
114 A(J44)=+FIX(RND*11)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 10000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*10000)
143    GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 10000
174 IF X(J44)>10 THEN X(J44)=A(J44)
175 IF X(J44)<0 THEN X(J44)=A(J44)
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 10000
411 SONE=SONE+        (X(J44))^4
421 NEXT J44
501 STWO=0
502 FOR J44=1 TO 10000
511 STWO=STWO+        (X(J44))
521 NEXT J44
588 REM    SUMT=SONE+(STWO  )^2
688 PD1=-SONE-STWO^2
699 REM   PD1=-SONE^(1/3)
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-2 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1924 PRINT A(6),A(7),A(8),A(9),A(10)
1926 PRINT A(21),A(22),A(23),A(24),A(25)
1933 REM PRINT A(91),A(92),A(93),A(94),A(95)
1934 PRINT A(96),A(97),A(98),A(99),A(100)
1935    PRINT A(2996),A(2997),A(9998),A(9999),A(10000)
1939 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 the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-31999 is shown below:

0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
-2   -32000

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

Above there is no rounding by hand.

M=0 is optimal; see Li and Sun [10, p. 416].

Of the 10000 A's, only the 25 A's of line 1923 through line 1935 are shown above.

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=-31999 was eleven hours.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Thursday, August 21, 2014

A Unified Computer Program for a General-Integer Version of Schittkowski's Test Problem 281 but with 10000 Unknowns instead of 10 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve Schittkowski's Test Problem 281 but with 10000 unknowns instead of 10 unknowns.  The source of this Test Problem 281 is S. Walukiewicz; see Schittkowski [14, p. 105].  Specifically the computer program below tries to minimize the following:

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

subject to X(i)=0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, i=1, 2, 3,..., 10000.  See line 111, line 114, and line 117.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(10000),X(10000)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 10000
114 A(J44)=FIX(RND*11)
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 10000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+.3)
140 B=1+FIX(RND*10000)
143    GOTO 167
144 REM   GOTO 168
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 10000
174 IF X(J44)>10 THEN X(J44)=A(J44)
175 IF X(J44)<0 THEN X(J44)=A(J44)
177 NEXT J44
401 SONE=0
402 FOR J44=1 TO 10000
411 SONE=SONE+        J44   ^3 *(X(J44)-1)^2
421 NEXT J44
699 PD1=-SONE^(1/3)
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 REM IF M<0 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1924 PRINT A(6),A(7),A(8),A(9),A(10)
1933 PRINT A(591),A(592),A(593),A(594),A(595)
1935 PRINT A(1496),A(1497),A(1498),A(1499),A(1500)
1937 PRINT A(9991),A(9992),A(9993),A(9994),A(9995)
1938 PRINT A(9996),A(9997),A(9998),A(9999),A(10000)
1939 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 the BASIC manual [11].  Copied by hand from the screen, the computer program's complete output through JJJJ=-32000 is shown below:

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

Above there is no rounding by hand.

M=0 is optimal; see Schittkowski [14, p. 105].

Of the 10000 A's, only the 30 A's of line 1923 through line 1938 are shown above.

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=-32000 was eight hours.

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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Monday, August 18, 2014

A Unified Computer Program for an Integer Version of Schittkowski's Test Problem 289 but with 600 Unknowns instead 30 Unknowns

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve an integer version of Schittkowski's Test Problem 289 but with 600 unknowns instead of 30 unknowns.  The source of this Test Problem 289 is S. Walukiewicz; see Schittkowski [14, p. 113].  Thus, the computer program below tries to minimize the following:

                                600
1 - EXP(  -(1/60)*   SIGMA   X(i)   ^2   )
                                i=1

subject to -2<= X(i) <= 2, X(i) integer, i=1, 2, 3,..., 600.

One notes line 114 through line 117, which are  
111 FOR J44=1 TO 600
114 A(J44)=-2+RND*4
117 NEXT J44

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(1000),X(1000),T(1000),Y(1000)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 600
114 A(J44)=-2+RND*4
117 NEXT J44
128 FOR I=1 TO 32000 STEP .1
129 FOR KKQQ=1 TO 600
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*600)
144 GOTO 167
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 600
174 IF X(J44)>2 THEN X(J44)=A(J44)
175 IF X(J44)<-2 THEN X(J44)=A(J44)
177 NEXT J44
401 SUMM=0
402 FOR J44=1 TO 600
411 SUMM=SUMM+        X(J44)   ^2
421 NEXT J44
699 PD1=-1+EXP(-(1/60)*SUMM   )
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 600
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<0 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1924 PRINT A(6),A(7),A(8),A(9),A(10)
1933 PRINT A(591),A(592),A(593),A(594),A(595)
1935 PRINT A(596),A(597),A(598),A(599),A(600)
1939 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 the BASIC manual [11].  Copied by hand from the screen, this computer program's complete output through JJJJ=-31998 is shown below:

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

Above there is no rounding by hand.
 
M=0 is optimal; see Schittkowski [14, p. 113].

Of the 600 A's, only the 20 A's of line 1923 through line 1935 are shown above.

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 33 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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Sunday, August 17, 2014

A Unified Computer Program for an Integer Version of Schittkowski's Test Problem 272

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve an integer version of Schittkowski's Test Problem 272.  The source of this Test Problem 272 is S. Walukiewicz; see Schittkowski [14, p. 96].  Thus, the computer program below tries 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

T(i)=i/10

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

0<= X(i) <= 200, X(i) integer, i=1, 2, 3, 4, 5, 6.

One notes line 111 through line 117, which are
111 FOR J44=1 TO 6
114 A(J44)=RND*200
117 NEXT J44

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(90),X(90),T(90),Y(90)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
91 GOTO 111
92 A(2)=2+RND*4000
93 A(3)=3+RND*4000
94 A(4)=4+RND*4000
95 A(5)=-4000+RND*8000
111 FOR J44=1 TO 6
114 A(J44)=RND*200
117 NEXT J44
128 FOR I=1 TO 20000
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 REM     GOTO 167
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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 601
171 FOR J44=1 TO 6
174 IF X(J44)<0 THEN X(J44)=A(J44)
175 IF X(J44)>200 THEN X(J44)=A(J44)
177 NEXT J44
555 REM Y(6)=     34    -X(1)^2-X(2)^2-X(3)^2-X(4)^2-X(5)^2
565 REM IF Y(6)>0 THEN Y(6)=0
591 GOTO 601
592 X(2)=10
593 X(3)=4
594 X(4)=1
595 X(5)=5
596 X(6)=3
601 SUMM=0
602 FOR J44=1 TO 13
604 T(J44)=J44/10
607 Y(J44)=EXP(-T(J44)   ) -5*EXP(-10*T(J44)  )+3*EXP(-4*T(J44)  )
611 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
621 NEXT J44
622 GOTO 699
681 PDA=- X(1)*X(2) *X(3) *X(4)+3* X(1)*X(2)*X(4)  + 4*X(1)* X(2)*X(3)              -  12* X(1)*X(2) +X(2) *X( 3)*X(4)-3*X(2)*X(4) -4*X(2)*X(3)+12*X(2)+2*X(1)*X(3)*X(4)-6*X(1)*X(4)-8*X(1)*X(3)+24*X(1)
684 PDB=- 2 *X(3) *X(4)+6* X(4)  + 8*X(3)  -24         -  1.5* X(5)^4 +5.75 *X( 5)^3-5.25*X(5)^2  +500000!*Y(6)
695 PD1=PDA+PDB
699 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
1557 GOTO 128
1670 NEXT I
1889    IF M<-.01 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1939 PRINT A(6),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 the BASIC manual [11].  Copied by hand from the screen, this computer program's complete output through JJJJ=-30685 is shown below:

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

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

1   10   4   1   5
3   0   -30685

Above there is no rounding by hand.

M=0 is optimal; see Schittkowski [14, p. 96].

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=-30685 was five hours and twenty 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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

Saturday, August 16, 2014

A Unified Computer Program for an Integer Version of Schittkowski's Test Problem 286

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve an integer version of Schittkowski's Test Problem 286.  The source of this Test Problem 286 is S. Walukiewicz; see Schittkowski [14, p. 110].  Thus, the computer program below tries to minimize the following:

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

-10<= X(i) <= 10, X(i) integer, i=1, 2, 3,..., 30.

One notes line 114, which is 114 A(J44)=-10+RND*20.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(90),X(90),T(90),Y(90)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
111 FOR J44=1 TO 20
114 A(J44)=-10+RND*20
117 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*20)
144 GOTO 167
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 20
174 IF X(J44)>10 THEN X(J44)=A(J44)
175 IF X(J44)<-10 THEN X(J44)=A(J44)
177 NEXT J44
401 SUMM=0
402 FOR J44=1 TO 10
411 SUMM=   SUMM+ 100*( X(J44)^2 -X(J44+10)   )^2+ (  X(J44)-1  )^2
421 NEXT J44
699 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
1557 GOTO 128
1670 NEXT I
1889 IF M<-3 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1924 PRINT A(6),A(7),A(8),A(9),A(10)
1925 PRINT A(11),A(12),A(13),A(14),A(15)
1926 PRINT A(16),A(17),A(18),A(19),A(20)
1939 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 the BASIC manual [11].  Copied by hand from the screen, this computer program's complete output through JJJJ=-31333 is shown below:

1   1   1   1   2
1   1   1   1   1
1   1   1   1   4
1   1   1   1   1
-1 -31952

1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
0   -31715

1   2   1   1   1
1   1   2   2   1
1   4   1   1   1
1   1   4   4   1
-3   -31684

1   2   1   1   1
1   2   1   1   1
1   4   1   1   1
1   4   1   1   1
-2   -31641

1   1   1   1   1
1   1   1   2   1
1   1   1   1   1
1   1   1   4   1
-1   -31617

1   1   2   1   1
1   1   1   1   1
1   1   4   1   1
1   1   1   1   1
-1   -31582

1   1   1   1   2
1   1   1   1   1
1   1   1   1   4
1   1   1   1   1
-1   -31437

1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
1   1   1   1   1
0   -31333

Above there is no rounding by hand.

M=0 is optimal; see Schittkowski [14, p. 110].

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=-31333 was forty 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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html

A Unified Computer Program for an Integer Version of Schittkowski's Test Problem 289

Jsun Yui Wong
 
Similar to the computer programs of the preceding papers, the computer program below seeks to solve an integer version of Schittkowski's Test Problem 289.  The source of this Test Problem 289 is S. Walukievicz; see Schittkowski [14, p. 113].  Thus, the computer program below tries to minimize the following:

                                 30
1 - EXP(  -(1/60)*   SIGMA   X(i)   ^2   )
                                 i=1

-10<= X(i) <= 10, X(i) integer, i=1, 2, 3,..., 30.

One notes line 114, which is 114 A(J44)=-10+RND*20.

0 REM DEFDBL A-Z
1 DEFINT J,K,B,X
2 DIM A(90),X(90),T(90),Y(90)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-1.5D+38
91 GOTO 111
92 A(2)=2+RND*4000
93 A(3)=3+RND*4000
94 A(4)=4+RND*4000
95 A(5)=-4000+RND*8000
111 FOR J44=1 TO 30
114 A(J44)=-10+RND*20
117 NEXT J44
128 FOR I=1 TO 32000
129 FOR KKQQ=1 TO 30
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*30)
144 GOTO 167
145 IF RND<.5 THEN 150 ELSE 167
150 R=(1-RND*2)*A(B)
160 X(B)=(A(B)     +RND^3*R)
162 GOTO 168
163 IF RND<.5 THEN X(B)=(A(B)-.001)   ELSE X(B)=(A(B)     +.001   )
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
171 FOR J44=1 TO 30
174 IF X(J44)>10 THEN X(J44)=A(J44)
175 IF X(J44)<-10 THEN X(J44)=A(J44)
177 NEXT J44
401 SUMM=0
402 FOR J44=1 TO 30
411 SUMM=SUMM+        X(J44)   ^2
421 NEXT J44
699 PD1=-1+EXP(-(1/60)*SUMM   )
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 30
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-3 THEN 1999
1923 PRINT A(1),A(2),A(3),A(4),A(5)
1924 PRINT A(6),A(7),A(8),A(9),A(10)
1925 PRINT A(11),A(12),A(13),A(14),A(15)
1926 PRINT A(16),A(17),A(18),A(19),A(20)
1928 PRINT A(21),A(22),A(23),A(24),A(25)
1929 PRINT A(26),A(27),A(28),A(29),A(30)
1939 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 the BASIC manual [11].  Copied by hand from the screen, this computer program's complete output through JJJJ=-31994 is shown below:

2   -5   5   -7   8
0   7   1   5   -9
-6   7   -10   8   -9
-4   8   -9   6   7
-8   3   -6   -6   3
0   -7   3   -3   6
-1   32000

-5   8   -8   -9   -6
-1   1   -7   9   -2
0   -9   -6   -9   0
-7   0   -3   -7   8
0   -9   -2   0   -5
-5   -6   -9   -3   -6
-1   31999

7   8   -5   9   8
5   8   3   10   -6
-6   7   -9   5   -4
2   -5   0   7   1
8   -3   -2   7   -7
-8   8   9   3   2
-1   -31998

0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   -31997

0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   -31996

0   9   -4   8   9
-3   -7   -1   -5   5
-7   -9   10   2   6
7   4   -7   -9   -4
0   -4   -6   0   1
3   -7   6   9   5
-1   -31995

0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   0   0   0   0
0   -31994
 
M=0 is optimal; see Schittkowski [14, p. 113].

Above there is no rounding by hand.

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=-31994 was 32 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] M. A. Duran, I. E. Grossmann, An Outer-Approximation Algorithm for a Class of Mixed-Integer Nonlinear Programs.  Mathematical Programming, 36:307-339, 1986.

[5] D. M. Himmelblau, Applied Nonlinear Programming.  New York: McGraw-Hill Book Company, 1972.

[6] W. Hock, K. Schittkowski, Test Examples for Nonlinear Programming Codes.  Springer-Verlag, 1981.

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

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

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

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

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

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

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

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

[15] S. Surjanovic, Zakharov Function.  www.sfu.ca/~ssurjano/zakharov.html

[16] 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/

[17] 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/

[18] Jsun Yui Wong (2014, June 27).  A Unified Computer Program for Schittkowski's Test Problem 377, Second Edition.  http://nonlinearintegerprogrammingsolver.blogspot.ca/2014_06_01_archive.html