Jsun Yui Wong
The computer program listed below seeks to solve Example 3 on pp. 47-48 of Tsai and Lin [7].
The X(5) and X(6) of the following computer program are slack variables. Line 233 and line 403 below refer to the first given constraint and the given objective function;
these are 233 X(5) = 4 - X(1) * X(4) ^ 1.5 + X(2) + X(2) ^ .5 * X(3) ^ .4 and 403 POBA2 = -(X(1) * X(4) ^ 3 - X(3) - .5 * X(1) ^ 2 * X(2) ^ 4), respectively.
One notes that here line 128 is 128 FOR I = 1 TO 8000. .
0 REM DEFDBL A-Z
2 DEFINT I, J, K
3 DIM B(99), N(99), A(99), H(99), L(99), U(99), X(1111), D(111), P(111), PS(33)
12 FOR JJJJ = -32000 TO 32111
14 RANDOMIZE JJJJ
16 M = -1D+37
64 FOR J44 = 1 TO 4
65 A(J44) = RND * 30
66 NEXT J44
126 REM IMAR=10+FIX(RND*32000)
128 FOR I = 1 TO 8000
129 FOR KKQQ = 1 TO 4
130 X(KKQQ) = A(KKQQ)
131 NEXT KKQQ
133 FOR IPP = 1 TO (1 + FIX(RND * 3))
181 J = 1 + FIX(RND * 4)
183 R = (1 - RND * 2) * A(J)
187 X(J) = A(J) + (RND ^ (RND * 10)) * R
222 NEXT IPP
224 GOTO 233
225 FOR J23 = 1 TO 4
227 X(J23) = INT(X(J23))
229 NEXT J23
233 X(5) = 4 - X(1) * X(4) ^ 1.5 + X(2) + X(2) ^ .5 * X(3) ^ .4
244 X(6) = -2 + X(1) + 2 * X(2) - X(3)
283 IF X(1) < 0 THEN 1670
284 IF X(1) > 6 THEN 1670
286 IF X(2) < 1 THEN 1670
287 IF X(2) > 10 THEN 1670
288 IF X(3) < 1 THEN 1670
289 IF X(3) > 6 THEN 1670
291 IF X(4) < 20 THEN 1670
292 IF X(4) > 30 THEN 1670
331 FOR J44 = 5 TO 6
335 IF X(J44) < 0 THEN PS(J44) = ABS(X(J44)) ELSE PS(J44) = 0
339 NEXT J44
403 POBA2 = -(X(1) * X(4) ^ 3 - X(3) - .5 * X(1) ^ 2 * X(2) ^ 4)
411 POBA = POBA2 - 1000000 * PS(5) - 1000000 * PS(6)
422 REM POBA = POBA2 + (PS(4))
459 POB1 = POBA
463 P1NEWMAY = POB1
466 P = P1NEWMAY
1111 IF P <= M THEN 1670
1452 M = P
1453 PPOBA2 = POBA2
1454 FOR KLX = 1 TO 6
1455 A(KLX) = X(KLX)
1456 NEXT KLX
1557 REM GOTO 128
1670 NEXT I
1889 IF M < 4 THEN 1999
1900 PRINT A(1), A(2), A(3), A(4)
1904 PRINT A(5), A(6), M, JJJJ, PPOBA2
1999 NEXT JJJJ
This BASIC computer program was run with qb64v1000-win [8]. The complete output through JJJJ=-31949 is shown below:
1.930865E-11 8.195931 5.999997 21.7256
18.05812 8.391867 5.999997 -31992 5.999997
2.702062E-11 5.886934 6 20.61941
14.8552 3.773869 6 -31961 6
1.730769E-11 6.638494 6 20.45676
15.91438 5.276988 6 -31960 6
1.519407E-11 4.327571 6 22.89165
12.58731 .6551418 6 -31949 6
Above there is no rounding by hand; it is just straight copying by hand from the monitor screen.
On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and qb64v1000-win [8], the wall-clock time for obtaining the output through JJJJ=-31949 was 10 seconds.
Acknowledgment
I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.
References
[1] Yuichiro Anzai (1974). On Integer Fractional Programming. Journal Operations Research Society of Japan, Volume 17, No. 1, March 1974, pp. 49-66.
www..orsj.or.jp/~archiv/pdf/e_mag/Vol.17_01_049.pdf.
[2] Han-Lin Li, Jung-Fa Tsai (2008). A distributed computational algorithm for solving portfolio problems with integer variables. European Journal of Operational Research 186 (2008) pp.882-891.
[3] Harry Markowitz (1952). Portfolio Selection. The Journal of Finance 7 (2008) pp. 77-91.
[4] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.
[5] H. S. Ryoo, N. V. Sahinidis (1995). Global optimization of nonconvex NLP and MINLP with applications in process design. Computers and Chemical Engineering Vol. 19 (5) (1995) pp. 551-566.
[6] Jung-Fa Tsai, Ming-Hua Lin, Yi-Chung Hu (2007). On generalized geometric programming problems with non-positive variables. European Journal of Operational Research 178 (2007) pp. 10-19.
[7] Jung-Fa Tsai, Ming-Hua Lin (2008). Global optimization of signomial mixed-integer nonlinear programming with free variables. Journal of Global Optimization (2008) 42 pp. 39-49.
[8] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64
[9] Jsun Yui Wong (2012, April 12). The Domino Method of General Integer Nonlinear Programming Applied to a Nonlinear Fractional Programming Problem from the Literature. http://myblogsubstance.typepad.com/substance/2012/04/12/