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/