Testing the Present Algorithm with a Test Problem Involving 400 General Integer Variables of Lower Bounds of -1000’s and Upper Bounds of +1000’s

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun’s Problem 14.5, [5, p. 416], but with n=400 unknowns and -1000<=X(i)<=+1000, as shown in line 112, line 183, and line 184.

0 REM DEFDBL A-Z
1 DEFINT J,K,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 400
112 A(J44)=-1000+FIX( RND*2001)
113 NEXT J44
128 FOR I=1 TO 32000 STEP .5
129 FOR KKQQ=1 TO 400
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*401)
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
182 FOR J44=1 TO 400
183 IF X(J44)<-1000 THEN X(J44)=A(J44)
184 IF X(J44)>1000 THEN X(J44)=A(J44)
185 NEXT J44
209 SUM1=0
210 FOR J44=1 TO 400
212 SUM1=SUM1+X(J44)^4#
213 NEXT J44
215 SUM2=0
216 FOR J44=1 TO 400
217 SUM2=SUM2 + X(J44)
218 NEXT J44
219 SUMT=SUM1+(SUM2)^2#
333 PD1=-SUMT
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 400
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1669 GOTO 128
1670 NEXT I
1889 IF M<-5 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1927 PRINT A(398),A(399),A(400),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 [6]. The complete output through JJJJ=-31996 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    -31999

0 0 0 0 0
0 0 0    -4    -31996

Only eight of the 400 A’s are shown above. The printout is limited by the computer program–the printing shown above came from line 1904 and line 1927.

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=-31996 was two 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] 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.

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

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

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

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

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

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

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

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

Testing the Present Algorithm with a Test Problem Involving 250 General Integer Variables of Lower Bounds of -1000’s and Upper Bounds of +1000’s

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun’s Problem 14.5, [5, p. 416], but with n=250 unknowns and -1000<=X(i)<=+1000, as shown in line 112, line 183, and line 184.

0 REM DEFDBL A-Z
1 DEFINT J,K,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 250
112 A(J44)=-1000+FIX( RND*2001)
113 NEXT J44
128 FOR I=1 TO 32000 STEP .5
129 FOR KKQQ=1 TO 250
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*251)
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
182 FOR J44=1 TO 250
183 IF X(J44)<-1000 THEN X(J44)=A(J44)
184 IF X(J44)>1000 THEN X(J44)=A(J44)
185 NEXT J44
209 SUM1=0
210 FOR J44=1 TO 250
212 SUM1=SUM1+X(J44)^4#
213 NEXT J44
215 SUM2=0
216 FOR J44=1 TO 250
217 SUM2=SUM2 + X(J44)
218 NEXT J44
219 SUMT=SUM1+(SUM2)^2#
333 PD1=-SUMT
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 250
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1669 GOTO 128
1670 NEXT I
1889 IF M<-5 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1927 PRINT A(248),A(249),A(250),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 [6]. The complete output through JJJJ=-31992 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 -4 -31999

0 0 0 0 0
0 0 0 -4 -31998

0 0 0 0 0
0 0 0 -4 -31995

0 0 1 0 0
0 0 0 -4 -31994

0 0 0 0 0
0 0 0 0 -31993

0 0 0 0 0
0 0 0 -2 -31992

Only eight of the 250 A’s are shown above. The printout is limited by the computer program–the printing shown above came from line 1904 and line 1927.

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=-31992 was two 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] 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.

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

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

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

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

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

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

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

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

Testing the Nonlinear Integer Programming Solver Here with Generalized Euler Bricks, Second Edition

Jsun Yui Wong

Based on the computer program of the earlier edition [14], the following computer program seeks to solve the following system of three nonlinear Diophantine equations from Piezas [7]:

X(1)^2+X(2) ^2 = 2*X(4)^2
X(1)^2+X(3) ^2 = 2*X(5)^2
X(2)^2+X(3) ^2 = 2*X(6)^2

0 REM DEFDBL A-Z
1 DEFINT I,J,K,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 6
112 A(J44)=1+FIX( RND*1000)
113 NEXT J44
128 FOR I=1 TO 500
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
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
181 X(4)= ( .5#*( X(1)^2#+X(2) ^2# ) ) ^.5#
183 X(5)= ( .5#*( X(1)^2#+X(3) ^2# ) ) ^.5#
185 X(6)= ( .5#*( X(2)^2#+X(3) ^2# ) ) ^.5#
212 FOR J44=1 TO 6
213 IF X(J44)<1 THEN X(J44)=A(J44)
214 IF X(J44)>1000 THEN X(J44)=A(J44)
215 NEXT J44
217 N(7)= X(1)^2#+X(2) ^2# -2#*X(4)^2#
218 N(8)= X(1)^2#+X(3) ^2# -2#*X(5)^2#
219 N(9)= X(2)^2#+X(3) ^2# -2#*X(6)^2#
335 PD1=-ABS(N(7))-ABS(N(8))-ABS(N(9))
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 6
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1558 GOTO 128
1670 NEXT I
1889 IF M<-1 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1927 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. The complete output through JJJJ=-31845 is copied by hand from the screen and shown below. Immediately below there is no rounding by hand.

365 365 365 365 365
365 0 -31977

847 847 847 847 847
847 0 -31974

164 452 164 340 164
340 0 -31930

533 533 135 533 377
377 0 -31929

399 399 399 399 399
399 0 -31926

105 105 105 105 105
105 0 -31899

69 867 867 615 615
867 0 -31852

483 597 483 543 483
543 0 -31845

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=-31845 was twenty 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] 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.

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

[5] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006).

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

[7] Tito Piezas III, Euler Bricks and Quadruples. http://sites.google.com/site/tpiezas/0021

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

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

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

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

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

[13] Jsun Yui Wong (2014, February 1). Testing the Nonlinear Integer Programming Solver with Another System of Nonlinear Diophantine Equations. https://computerprogramsandresults.wordpress.com/2014/02/01/

[14] Jsun Yui Wong (2014, February 6). Testing the Nonlinear Integer Programming Solver Here with Generalized Euler Bricks. https://computerprogramsandresults.wordpress.com/2014/02/06/

Testing the Nonlinear Integer Programming Solver with Another System of Nonlinear Diophantine Equations, Second Edition

Jsun Yui Wong

Based on the computer program of the earlier edition [12], the following computer program seeks to solve the following system of four nonlinear Diophantine equations:

X(1)^2+X(2) ^2 +X(3)^2 = X(5)^2
X(1)^2+X(3) ^2 +X(4)^2 = X(6)^4
X(1)^2+X(2) ^2 +X(4)^2 = X(7)^4
X(2)^2+X(3) ^2 +X(4)^2 = X(8)^2,

which is a modified version of the following system:

X(1)^2+X(2) ^2 +X(3)^2 = 113^2
X(1)^2+X(3) ^2 +X(4)^2 = 11^4
X(1)^2+X(2) ^2 +X(4)^2 = 11^4
X(2)^2+X(3) ^2 +X(4)^2 = 132^2

taken from Piezas [6].

0 DEFDBL A-Z
1 DEFINT I,J,K,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 8
112 A(J44)=1+FIX( RND*200)
113 NEXT J44
128 FOR I=1 TO 3000
129 FOR KKQQ=1 TO 8
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*8)
144 REM 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
181 X(5)= ( X(1)^2#+X(2) ^2# +X(3)^2# ) ^.5#
183 X(6)= ( X(1)^2#+X(3) ^2# +X(4)^2# ) ^.25#
185 X(7)= ( X(1)^2#+X(2) ^2# +X(4)^2# ) ^.25#
187 X(8)= ( X(2)^2#+X(3) ^2# +X(4)^2# ) ^.5#
212 FOR J44=1 TO 8
213 IF X(J44)<1 THEN X(J44)=A(J44)
214 IF X(J44)>200 THEN X(J44)=A(J44)
215 NEXT J44
217 N(7)= X(1)^2#+X(2) ^2# +X(3)^2# -X(5)^2#
218 N(8)= X(1)^2#+X(3) ^2# +X(4)^2# -X(6)^4#
219 N(9)= X(1)^2#+X(2) ^2# +X(4)^2# -X(7)^4#
220 N(10)= X(2)^2#+X(3) ^2# +X(4)^2# -X(8)^2#
335 PD1=-ABS(N(7))-ABS(N(8))-ABS(N(9)) -ABS(N(10))
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 8
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1558 GOTO 128
1670 NEXT I
1889 IF M<-1 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1927 PRINT A(6),A(7),A(8),M,JJJJ
1999 NEXT JJJJ

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

49 72 72 84 113
11 11 132 0 -31663

84 72 72 49 132
11 11 113 0 -29996

49 72 72 84 113
11 11 132 0 -22936

49 72 72 84 113
11 11 132 0 -21399

4 4 4 7 7
3 3 9 -1 -18688

49 72 72 84 113
11 11 132 0 -16667

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=-16667 was five 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] 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.

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

[5] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006).

[6] Tito Piezas III, Euler Bricks and Quadruples. http://sites.google.com/site/tpiezas/0021

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

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

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

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

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

[12] Jsun Yui Wong (2014, February 1). Testing the Nonlinear Integer Programming Solver with Another System of Nonlinear Diophantine Equations. https://computerprogramsandresults.wordpress.com/2014/02/01/

Testing the Present Algorithm with a Test Problem Involving the Schittkowski/Walukiewicz Function and with 500 General Integer Variables of Lower Bounds of -1000’s and Upper Bounds of +1000’s

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun’s Problem 14.3, [5, p. 414], but with n=500 and -1000<=X(i)<=+1000, as shown in line 112, line 213, and line 214. This problem uses the Schittkowski/Walukiewicz function [8, p. 106].

Line 2223, line 2224, and line 2225 of the following computer program limit the printing.

0 REM DEFDBL A-Z
1 DEFINT J,K,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 500
112 A(J44)=-1000+FIX( RND*2001)
113 NEXT J44
128 FOR I=1 TO 32000 STEP .5
129 FOR KKQQ=1 TO 500
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*501)
144 REM 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)=(A(B)-1) ELSE X(B)=(A(B) +1)
168 REM IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
212 FOR J44=1 TO 500
213 IF X(J44)<-1000 THEN X(J44)=A(J44)
214 IF X(J44)>1000 THEN X(J44)=A(J44)
215 NEXT J44
220 SUMM=0
222 FOR J44=1 TO 499
223 SUMM=SUMM+ (500#-J44)* ( X( J44 )^2#- X( J44+1) ) ^2#
226 NEXT J44
229 SUMX=(X(1) -1#)^2#+(X(500)-1# )^2#+500#*SUMM
333 PD1=-SUMX
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 500
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1558 GOTO 128
1670 NEXT I
1889 IF M<-1 THEN 2999
2223 FOR J44=498 TO 500
2224 PRINT A(J44) ” =A(J44) where J44 is ” J44
2225 NEXT J44
2227 PRINT “M=” M ” JJJJ=” JJJJ
2999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft’s GW-BASIC 3.11 interpreter for DOS. The complete output through JJJJ=-31995 is shown below–line 2223, line 2224, and line 2225 of the computer program limit the printing. Immediately below there is no rounding by hand.

1 =A(J44) where J44 is 498
1 =A(J44) where J44 is 499
1 =A(J44) where J44 is 500
M= 0      JJJJ=-31998

1 =A(J44) where J44 is 498
1 =A(J44) where J44 is 499
1 =A(J44) where J44 is 500
M= 0      JJJJ=-31996

1 =A(J44) where J44 is 498
1 =A(J44) where J44 is 499
1 =A(J44) where J44 is 500
M= 0      JJJJ=-31995

In the computer program above the word PRINT to print on the screen can be replaced by the word LPRINT to print on the printer.

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=-31995 was eight hours and 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] 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.

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

[5] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006).

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

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

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

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

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

Testing the Present Algorithm with a Test Problem Involving the Schittkowski/Walukiewicz Function and with 100 General Integer Variables of Lower Bounds of -1000’s and Upper Bounds of +1000’s

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun’s Problem 14.3 with n=100, [5, p. 414], but with -1000<=X(i)<=+1000, as shown in line 112, line 183, and line 184. This problem uses the Schittkowski/Walukiewicz function [8, p. 106].

0 REM DEFDBL A-Z
1 DEFINT J,K,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 100
112 A(J44)=-1000+FIX( RND*2001)
113 NEXT J44
128 FOR I=1 TO 32000 STEP .5
129 FOR KKQQ=1 TO 100
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*101)
144 REM 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)=(A(B)-1) ELSE X(B)=(A(B) +1)
168 REM IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
212 FOR J44=1 TO 100
213 IF X(J44)<-1000 THEN X(J44)=A(J44)
214 IF X(J44)>1000 THEN X(J44)=A(J44)
215 NEXT J44
220 SUMM=0
222 FOR J44=1 TO 99
223 SUMM=SUMM+ (100#-J44)* ( X( J44 )^2#- X( J44+1) ) ^2#
226 NEXT J44
229 SUMX=(X(1) -1#)^2#+(X(100)-1# )^2#+100#*SUMM
333 PD1=-SUMX
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 100
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1558 GOTO 128
1670 NEXT I
1889 IF M<-1 THEN 2999
2223 FOR J44=1 TO 100
2224 PRINT A(J44) ” =A(J44) where J44 is ” J44
2225 NEXT J44
2227 PRINT “M=” M ” JJJJ=” JJJJ
2999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft’s GW-BASIC 3.11 interpreter for DOS. Through JJJJ=-31991 three M=0’s were obtained. Only a small part of the printout through JJJJ=-31991 is copied by hand from the screen and shown below. Immediately below there is no rounding by hand.

.
.
.
1 =A(J44) where J44 is 79
1 =A(J44) where J44 is 80
1 =A(J44) where J44 is 81
1 =A(J44) where J44 is 82
1 =A(J44) where J44 is 83
1 =A(J44) where J44 is 84
1 =A(J44) where J44 is 85
1 =A(J44) where J44 is 86
1 =A(J44) where J44 is 87
1 =A(J44) where J44 is 88
1 =A(J44) where J44 is 89
1 =A(J44) where J44 is 90
1 =A(J44) where J44 is 91
1 =A(J44) where J44 is 92
1 =A(J44) where J44 is 93
1 =A(J44) where J44 is 94
1 =A(J44) where J44 is 95
1 =A(J44) where J44 is 96
1 =A(J44) where J44 is 97
1 =A(J44) where J44 is 98
1 =A(J44) where J44 is 99
1 =A(J44) where J44 is 100
M= 0      JJJJ=-31999

.
.
.
1 =A(J44) where J44 is 79
1 =A(J44) where J44 is 80
1 =A(J44) where J44 is 81
1 =A(J44) where J44 is 82
1 =A(J44) where J44 is 83
1 =A(J44) where J44 is 84
1 =A(J44) where J44 is 85
1 =A(J44) where J44 is 86
1 =A(J44) where J44 is 87
1 =A(J44) where J44 is 88
1 =A(J44) where J44 is 89
1 =A(J44) where J44 is 90
1 =A(J44) where J44 is 91
1 =A(J44) where J44 is 92
1 =A(J44) where J44 is 93
1 =A(J44) where J44 is 94
1 =A(J44) where J44 is 95
1 =A(J44) where J44 is 96
1 =A(J44) where J44 is 97
1 =A(J44) where J44 is 98
1 =A(J44) where J44 is 99
1 =A(J44) where J44 is 100
M= 0      JJJJ=-31992

.
.
.
1 =A(J44) where J44 is 79
1 =A(J44) where J44 is 80
1 =A(J44) where J44 is 81
1 =A(J44) where J44 is 82
1 =A(J44) where J44 is 83
1 =A(J44) where J44 is 84
1 =A(J44) where J44 is 85
1 =A(J44) where J44 is 86
1 =A(J44) where J44 is 87
1 =A(J44) where J44 is 88
1 =A(J44) where J44 is 89
1 =A(J44) where J44 is 90
1 =A(J44) where J44 is 91
1 =A(J44) where J44 is 92
1 =A(J44) where J44 is 93
1 =A(J44) where J44 is 94
1 =A(J44) where J44 is 95
1 =A(J44) where J44 is 96
1 =A(J44) where J44 is 97
1 =A(J44) where J44 is 98
1 =A(J44) where J44 is 99
1 =A(J44) where J44 is 100
M= 0      JJJJ=-31991

Only 22 of the 100 A’s are shown above.

In the computer program above the word PRINT to print on the screen can be replaced by the word LPRINT to print on the printer.

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=-31991 was sixteen 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] 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.

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

[5] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006).

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

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

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

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

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

Testing the Present Algorithm with a Test Problem Involving 100 General Integer Variables of Lower Bounds of -1000’s and Upper Bounds of +1000’s

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun’s Problem 14.5 with n=100, [5, p. 416], but with -1000<=X(i)<=+1000, as shown in line 112, line 183, and line 184.

0 REM DEFDBL A-Z
1 DEFINT J,K,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 100
112 A(J44)=-1000+FIX( RND*2001)
113 NEXT J44
128 FOR I=1 TO 32000 STEP .5
129 FOR KKQQ=1 TO 100
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*101)
144 REM 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)=(A(B)-1) ELSE X(B)=(A(B) +1)
168 REM IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
182 FOR J44=1 TO 100
183 IF X(J44)<-1000 THEN X(J44)=A(J44)
184 IF X(J44)>1000 THEN X(J44)=A(J44)
185 NEXT J44
209 SUM1=0
210 FOR J44=1 TO 100
212 SUM1=SUM1+X(J44)^4#
213 NEXT J44
215 SUM2=0
216 FOR J44=1 TO 100
217 SUM2=SUM2 + X(J44)
218 NEXT J44
219 SUMT=SUM1+(SUM2)^2#
333 PD1=-SUMT
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 100
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1669 GOTO 128
1670 NEXT I
1889 IF M<-1 THEN 2999
2223 FOR J44=1 TO 100
2224 PRINT A(J44) ” =A(J44) where J44 is ” J44
2225 NEXT J44
2227 PRINT “M=” M ” JJJJ=” JJJJ
2999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft’s GW-BASIC 3.11 interpreter for DOS.  Through JJJJ=-31997 three M=0’s were obtained.  Only a small part of the printout through JJJJ=-31997 is copied by hand from the screen and shown below. Immediately below there is no rounding by hand.

.
.
.
0 =A(J44) where J44 is 79
0 =A(J44) where J44 is 80
0 =A(J44) where J44 is 81
0 =A(J44) where J44 is 82
0 =A(J44) where J44 is 83
0 =A(J44) where J44 is 84
0 =A(J44) where J44 is 85
0 =A(J44) where J44 is 86
0 =A(J44) where J44 is 87
0 =A(J44) where J44 is 88
0 =A(J44) where J44 is 89
0 =A(J44) where J44 is 90
0 =A(J44) where J44 is 91
0 =A(J44) where J44 is 92
0 =A(J44) where J44 is 93
0 =A(J44) where J44 is 94
0 =A(J44) where J44 is 95
0 =A(J44) where J44 is 96
0 =A(J44) where J44 is 97
0 =A(J44) where J44 is 98
0 =A(J44) where J44 is 99
0 =A(J44) where J44 is 100
M= 0    JJJJ=-31999

.
.
.
0 =A(J44) where J44 is 79
0 =A(J44) where J44 is 80
0 =A(J44) where J44 is 81
0 =A(J44) where J44 is 82
0 =A(J44) where J44 is 83
0 =A(J44) where J44 is 84
0 =A(J44) where J44 is 85
0 =A(J44) where J44 is 86
0 =A(J44) where J44 is 87
0 =A(J44) where J44 is 88
0 =A(J44) where J44 is 89
0 =A(J44) where J44 is 90
0 =A(J44) where J44 is 91
0 =A(J44) where J44 is 92
0 =A(J44) where J44 is 93
0 =A(J44) where J44 is 94
0 =A(J44) where J44 is 95
0 =A(J44) where J44 is 96
0 =A(J44) where J44 is 97
0 =A(J44) where J44 is 98
0 =A(J44) where J44 is 99
0 =A(J44) where J44 is 100
M= 0    JJJJ=-31998

.
.
.
0 =A(J44) where J44 is 79
0 =A(J44) where J44 is 80
0 =A(J44) where J44 is 81
0 =A(J44) where J44 is 82
0 =A(J44) where J44 is 83
0 =A(J44) where J44 is 84
0 =A(J44) where J44 is 85
0 =A(J44) where J44 is 86
0 =A(J44) where J44 is 87
0 =A(J44) where J44 is 88
0 =A(J44) where J44 is 89
0 =A(J44) where J44 is 90
0 =A(J44) where J44 is 91
0 =A(J44) where J44 is 92
0 =A(J44) where J44 is 93
0 =A(J44) where J44 is 94
0 =A(J44) where J44 is 95
0 =A(J44) where J44 is 96
0 =A(J44) where J44 is 97
0 =A(J44) where J44 is 98
0 =A(J44) where J44 is 99
0 =A(J44) where J44 is 100
M= 0    JJJJ=-31997

Only 22 of the 100 A’s are shown above.

In the computer program above the word PRINT to print on the screen can be replaced by the word LPRINT to print on the printer.

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=-31997 was six 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] 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.

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

[5] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006).

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

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

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

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

Testing the Present Algorithm with a Test Problem Based on the Rosenbrock Function and with 10,000 General Integer Variables

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun’s Problem 14.4, [5, p. 415], but with 10,000 unknowns.

While line 128 of the preceding paper is 128 FOR I=1 TO 3000, line 128 here is
is 128 FOR I=1 TO 32000 STEP .5; while line 144 there is 144 REM GOTO 167, line 144 here is 144 GOTO 167.

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 10000
112 A(J44)=-5+FIX( RND*11)
113 NEXT J44
128 FOR I=1 TO 32000 STEP .5
129 FOR KKQQ=1 TO 10000
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*10001)
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)=A(B)-1 ELSE X(B)=A(B) +1
168 REM IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
182 FOR J44=1 TO 10000
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 9999
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 10000
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-99999! THEN 2999
2223 FOR J44=1 TO 10000
2224 PRINT A(J44) ” =A(J44) where J44 is ” J44
2225 NEXT J44
2227 PRINT “M=” M ” JJJJ=” JJJJ
2999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft’s GW-BASIC 3.11 interpreter for DOS. Only a small part of the printout through JJJJ=-32000 is copied by hand from the screen and shown below. Immediately below there is no rounding by hand.

.
.
.
1 =A(J44) where J44 is 9979
1 =A(J44) where J44 is 9980
1 =A(J44) where J44 is 9981
1 =A(J44) where J44 is 9982
1 =A(J44) where J44 is 9983
1 =A(J44) where J44 is 9984
1 =A(J44) where J44 is 9985
1 =A(J44) where J44 is 9986
1 =A(J44) where J44 is 9987
1 =A(J44) where J44 is 9988
1 =A(J44) where J44 is 9989
1 =A(J44) where J44 is 9990
1 =A(J44) where J44 is 9991
1 =A(J44) where J44 is 9992
1 =A(J44) where J44 is 9993
1 =A(J44) where J44 is 9994
1 =A(J44) where J44 is 9995
1 =A(J44) where J44 is 9996
1 =A(J44) where J44 is 9997
1 =A(J44) where J44 is 9998
1 =A(J44) where J44 is 9999
1 =A(J44) where J44 is 10000
M= 0      JJJJ=-32000

Only 22 of the 10,000 A’s are shown above.

In the computer program above the word PRINT to print on the screen can be replaced by the word LPRINT to print on the printer.

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 thirteen 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] 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.

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

[5] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006).

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

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

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

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

Testing the Present Algorithm with a Test Problem Based on the Rosenbrock Function and with 100 General Integer Variables of Lower Bounds of -1000’s and Upper Bounds of 1000’s

Jsun Yui Wong

Similar to the computer program of the preceding paper, the following computer program seeks to solve Li and Sun’s Problem 14.4, [5, p. 415], but with lower bounds of -1000’s and upper bounds of 1000’s, as shown in line 112, line 183, and line 184.

0 REM DEFDBL A-Z
1 DEFINT J,K,X
2 DIM B(99),N(99),A(6001),H(99),L(99),U(99),X(6001),D(111),P(111),PS(33),J(99),AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(2222),PN(22),NN(22)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
110 FOR J44=1 TO 100
112 A(J44)=-1000+FIX( RND*2001)
113 NEXT J44
128 FOR I=1 TO 3000
129 FOR KKQQ=1 TO 100
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*101)
144 REM 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)=A(B)-1 ELSE X(B)=A(B) +1
168 REM IF A(B)=0 THEN X(B)=1 ELSE X(B)=0
169 NEXT IPP
182 FOR J44=1 TO 100
183 IF X(J44)<-1000 THEN X(J44)=A(J44)
184 IF X(J44)>1000 THEN X(J44)=A(J44)
185 NEXT J44
220 SUMM=0
222 FOR J44=1 TO 99
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 100
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-1 THEN 2999
2223 FOR J44=1 TO 100
2224 PRINT A(J44) ” =A(J44) where J44 is ” J44
2225 NEXT J44
2227 PRINT “M=” M ” JJJJ=” JJJJ
2999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft’s GW-BASIC 3.11 interpreter for DOS. Through JJJJ=-31994, three M’s were produced–those at JJJJ=-31999 with M=0, at
JJJJ=-31996 with M=0, and at JJJJ=-31994 with M=0. Only a small part of the printout through JJJJ=-31994 is copied by hand and shown below. Immediately below there is no rounding by hand.

.
.
.
1 =A(J44) where J44 is 79
1 =A(J44) where J44 is 80
1 =A(J44) where J44 is 81
1 =A(J44) where J44 is 82
1 =A(J44) where J44 is 83
1 =A(J44) where J44 is 84
1 =A(J44) where J44 is 85
1 =A(J44) where J44 is 86
1 =A(J44) where J44 is 87
1 =A(J44) where J44 is 88
1 =A(J44) where J44 is 89
1 =A(J44) where J44 is 90
1 =A(J44) where J44 is 91
1 =A(J44) where J44 is 92
1 =A(J44) where J44 is 93
1 =A(J44) where J44 is 94
1 =A(J44) where J44 is 95
1 =A(J44) where J44 is 96
1 =A(J44) where J44 is 97
1 =A(J44) where J44 is 98
1 =A(J44) where J44 is 99
1 =A(J44) where J44 is 100
M= 0      JJJJ=-31999

.
.
.
1 =A(J44) where J44 is 79
1 =A(J44) where J44 is 80
1 =A(J44) where J44 is 81
1 =A(J44) where J44 is 82
1 =A(J44) where J44 is 83
1 =A(J44) where J44 is 84
1 =A(J44) where J44 is 85
1 =A(J44) where J44 is 86
1 =A(J44) where J44 is 87
1 =A(J44) where J44 is 88
1 =A(J44) where J44 is 89
1 =A(J44) where J44 is 90
1 =A(J44) where J44 is 91
1 =A(J44) where J44 is 92
1 =A(J44) where J44 is 93
1 =A(J44) where J44 is 94
1 =A(J44) where J44 is 95
1 =A(J44) where J44 is 96
1 =A(J44) where J44 is 97
1 =A(J44) where J44 is 98
1 =A(J44) where J44 is 99
1 =A(J44) where J44 is 100
M= 0      JJJJ=-31996

.
.
.
1 =A(J44) where J44 is 79
1 =A(J44) where J44 is 80
1 =A(J44) where J44 is 81
1 =A(J44) where J44 is 82
1 =A(J44) where J44 is 83
1 =A(J44) where J44 is 84
1 =A(J44) where J44 is 85
1 =A(J44) where J44 is 86
1 =A(J44) where J44 is 87
1 =A(J44) where J44 is 88
1 =A(J44) where J44 is 89
1 =A(J44) where J44 is 90
1 =A(J44) where J44 is 91
1 =A(J44) where J44 is 92
1 =A(J44) where J44 is 93
1 =A(J44) where J44 is 94
1 =A(J44) where J44 is 95
1 =A(J44) where J44 is 96
1 =A(J44) where J44 is 97
1 =A(J44) where J44 is 98
1 =A(J44) where J44 is 99
1 =A(J44) where J44 is 100
M= 0      JJJJ=-31994

One notes that only 22 of the 100 A’s are shown above.

In the computer program above the word PRINT to print on the screen can be replaced by the word LPRINT to print on the printer.

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 one minute and fifty 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] 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.

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

[5] Duan Li, Xiaoling Sun, Nonlinear Integer Programming. Publisher: Springer Science+Business Media,LLC (2006).

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

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

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

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