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/