Wednesday, November 29, 2017

Searching for Multiple Solutions of a Signomial Integer/Discrete Programming Problem

Jsun Yui Wong

The computer program listed below aims to find multiple solutions of the following nonlinear programming problem from Lin and Tsai [17, pp. 438-439]:
   
Minimize     X(17) + X(18) + X(19) + X(20) + .1 * X(21) + .2 * X(22) + .3 * X(23) + .4 * X(24)

subject to

         X(17) * X(1) + X(18) * X(2) + X(19) * X(3) + X(20) * X(4)>=9,
         X(17) * X(5) + X(18) * X(6) + X(19) * X(7) + X(20) * X(8)>=7,
         X(17) * X(9) + X(18) * X(10) + X(19) * X(11) + X(20) * X(12)>=12,
         X(17) * X(13) + X(18) * X(14) + X(19) * X(15) + X(20) * X(16)>=11,


        -( -1700 * X(21) + 330 * X(1) + 360 * X(5) + 385 * X(9) + 415 * X(13))<=0,
        -( -1700 * X(22) + 330 * X(2) + 360 * X(6) + 385 * X(10) + 415 * X(14))<=0,
        -( -1700 * X(23) + 330 * X(3) + 360 * X(7) + 385 * X(11) + 415 * X(15))<=0,
         -(-1700 * X(24) + 330 * X(4) + 360 * X(8) + 385 * X(12) + 415 * X(16))<=0,

         -(1900 * X(21) - 330 * X(1) - 360 * X(5) - 385 * X(9) - 415 * X(13))<=0,
         -(1900 * X(22) - 330 * X(2) - 360 * X(6) - 385 * X(10) - 415 * X(14))<=0,
         -(1900 * X(23) - 330 * X(3) - 360 * X(7) - 385 * X(11) - 415 * X(15))<=0,
         -(1900 * X(24) - 330 * X(4) - 360 * X(8) - 385 * X(12) - 415 * X(16))<=0,


        -( -X(21) + X(1) + X(5) + X(9) + X(13))<=0,
        -( -X(22) + X(2) + X(6) + X(10) + X(14))<=0,
        -( -X(23) + X(3) + X(7) + X(11) + X(15))<=0,
        -( -X(24) + X(4) + X(8) + X(12) + X(16))<=0,

        -( 5 * X(21) - X(1) - X(5) - X(9) - X(13))<=0,
        -( 5 * X(22) - X(2) - X(6) - X(10) - X(14))<=0,
        -( 5 * X(23) - X(3) - X(7) - X(11) - X(15))<=0,
        -( 5 * X(24) - X(4) - X(8) - X(12) - X(16))<=0,


        X(21) - X(17)<=0,
        X(22) - X(18)<=0,
        X(23) - X(19)<=0,
        X(24) - X(20)<=0,


        - 15 * X(21) + X(17)<=0,
        - 12 * X(22) + X(18)<=0,
        - 9 * X(23) + X(19)<=0,

        -6 * X(24) + X(20)<=0,

        X(17) + X(18) + X(19) + X(20)>=8,


         X(21) - X(22)>=0,
         X(22) - X(23)>=0,
         X(23) - X(24)>=0,


         X(17) - X(18)>=0
         X(18) - X(19)>=0,
         X(19) - X(20)>=0,


        0<=  X(i) <=5, i=1, 2, 3,..., 16,

        0<= X(17) <= 15,

         0<=X(18) <= 12,
     
         0<= X(19) <= 9,

        0<= X(20) <= 6,

       
        X(21) through X(24) are 0-1 variables.
       

        0<=  X(i) <=5, i=1,2,3,..., 16,

        0<= X(17) <= 15,

         0<=X(18) <= 12,
     
         0<= X(19) <= 9,

        0<= X(20) <= 6,
       
        X(21) through X(24) are 0-1 variables,
       
where X(1) through X(20) are integer variables and X(21) through X(24) are 0-1 variables.
     
X(25) through X(59) below are slack variables.

One notes line 111 and line 191, which are 111 IF RND < .333 THEN SOFMS = 8 ELSE IF RND < .5 THEN SOFMS = 9 ELSE SOFMS = 10
and 191 X(20) = SOFMS - X(17) - X(18) - X(19).



0 DEFDBL A-Z

2 DEFINT K

3 DIM B(99), N(99), A(99), H(99), L(99), U(99), X(1111), D(111), P(111), PS(99)


12 FOR JJJJ = -32000 TO 31997.00 STEP .01


    14 RANDOMIZE JJJJ
    16 M = -1D+37

    22 FOR J55 = 1 TO 16

        37 A(J55) = INT(RND * 5)


    38 NEXT J55
    71 A(17) = 2 + INT(RND * 3)
    72 A(18) = 2 + INT(RND * 3)

    73 A(19) = 2 + INT(RND * 3)
    74 A(20) = 2 + INT(RND * 3)


    91 IF RND < .5 THEN A(21) = 0 ELSE A(21) = 1

    97 IF RND < .5 THEN A(22) = 0 ELSE A(22) = 1
    98 IF RND < .5 THEN A(23) = 0 ELSE A(23) = 1
    99 IF RND < .5 THEN A(24) = 0 ELSE A(24) = 1
    111 IF RND < .333 THEN SOFMS = 8 ELSE IF RND < .5 THEN SOFMS = 9 ELSE SOFMS = 10



    128 FOR I = 1 TO 8000000



        129 FOR KKQQ = 1 TO 24

            130 X(KKQQ) = A(KKQQ)
        131 NEXT KKQQ
        133 FOR IPP = 1 TO (1 + FIX(RND * 16))

            151 J = 1 + FIX(RND * 16)

            152 X(J) = INT(RND * 5)


        153 NEXT IPP
        155 IF RND < .25 THEN GOTO 160 ELSE IF RND < .333 THEN GOTO 164 ELSE IF RND < .5 THEN GOTO 168 ELSE GOTO 173


        160 X(17) = INT(RND * 15)
        163 IF RND < .5 THEN 164 ELSE GOTO 168

        164 X(18) = INT(RND * 12)
        167 IF RND < .5 THEN 168 ELSE GOTO 173

        168 X(19) = INT(RND * 9)
        169 IF RND < .5 THEN 173 ELSE GOTO 175

        173 X(20) = INT(RND * 6)

        175 FOR IPQ = 1 TO (1 + FIX(RND * 4))

            177 J = 21 + FIX(RND * 4)

            179 X(J) = INT(RND * 1)


        181 NEXT IPQ



        183 REM r = (1 - RND * 2) * A(J)
        187 REM X(J) = A(J) + (RND ^ (RND * 10)) * r

        191 X(20) = SOFMS - X(17) - X(18) - X(19)

        192 IF X(17) > 0 THEN X(21) = 1
        193 IF X(18) > 0 THEN X(22) = 1
        194 IF X(19) > 0 THEN X(23) = 1

        195 IF X(20) > 0 THEN X(24) = 1

        201 IF X(1) < 0 THEN 1670
        202 IF X(1) > 5 THEN 1670
        203 IF X(2) < 0 THEN 1670
        204 IF X(2) > 5 THEN 1670

        205 IF X(3) < 0 THEN 1670
        206 IF X(3) > 5 THEN 1670


        207 IF X(4) < 0 THEN 1670
        208 IF X(4) > 5 THEN 1670
        209 IF X(5) < 0 THEN 1670
        210 IF X(5) > 5 THEN 1670

        211 IF X(6) < 0 THEN 1670
        212 IF X(6) > 5 THEN 1670

        213 IF X(7) < 0 THEN 1670
        214 IF X(7) > 5 THEN 1670
        215 IF X(8) < 0 THEN 1670
        216 IF X(8) > 5 THEN 1670

        217 IF X(9) < 0 THEN 1670
        218 IF X(9) > 5 THEN 1670

        219 IF X(10) < 0 THEN 1670
        220 IF X(10) > 5 THEN 1670
        221 IF X(11) < 0 THEN 1670
        222 IF X(11) > 5 THEN 1670

        223 IF X(12) < 0 THEN 1670
        224 IF X(12) > 5 THEN 1670


        225 IF X(13) < 0 THEN 1670
        226 IF X(13) > 5 THEN 1670

        227 IF X(14) < 0 THEN 1670
        228 IF X(14) > 5 THEN 1670
        229 IF X(15) < 0 THEN 1670
        230 IF X(15) > 5 THEN 1670

        231 IF X(16) < 0 THEN 1670
        232 IF X(16) > 5 THEN 1670

        233 IF X(17) < 0 THEN 1670
        234 IF X(17) > 15 THEN 1670
        235 IF X(18) < 0 THEN 1670
        236 IF X(18) > 12 THEN 1670

        237 IF X(19) < 0 THEN 1670
        238 IF X(19) > 9 THEN 1670


        239 IF X(20) < 0 THEN 1670
        240 IF X(20) > 6 THEN 1670
        241 IF X(21) < 0 THEN 1670
        242 IF X(21) > 1 THEN 1670

        243 IF X(22) < 0 THEN 1670
        244 IF X(22) > 1 THEN 1670



        245 IF X(23) < 0 THEN 1670
        246 IF X(23) > 1 THEN 1670



        247 IF X(24) < 0 THEN 1670
        248 IF X(24) > 1 THEN 1670



        301 X(25) = -9 + X(17) * X(1) + X(18) * X(2) + X(19) * X(3) + X(20) * X(4)
        302 X(26) = -7 + X(17) * X(5) + X(18) * X(6) + X(19) * X(7) + X(20) * X(8)
        303 X(27) = -12 + X(17) * X(9) + X(18) * X(10) + X(19) * X(11) + X(20) * X(12)
        304 X(28) = -11 + X(17) * X(13) + X(18) * X(14) + X(19) * X(15) + X(20) * X(16)




        305 X(29) = -1700 * X(21) + 330 * X(1) + 360 * X(5) + 385 * X(9) + 415 * X(13)
        306 X(30) = -1700 * X(22) + 330 * X(2) + 360 * X(6) + 385 * X(10) + 415 * X(14)
        307 X(31) = -1700 * X(23) + 330 * X(3) + 360 * X(7) + 385 * X(11) + 415 * X(15)
        308 X(32) = -1700 * X(24) + 330 * X(4) + 360 * X(8) + 385 * X(12) + 415 * X(16)

        309 X(33) = 1900 * X(21) - 330 * X(1) - 360 * X(5) - 385 * X(9) - 415 * X(13)
        310 X(34) = 1900 * X(22) - 330 * X(2) - 360 * X(6) - 385 * X(10) - 415 * X(14)
        311 X(35) = 1900 * X(23) - 330 * X(3) - 360 * X(7) - 385 * X(11) - 415 * X(15)
        312 X(36) = 1900 * X(24) - 330 * X(4) - 360 * X(8) - 385 * X(12) - 415 * X(16)



        313 X(37) = -X(21) + X(1) + X(5) + X(9) + X(13)
        314 X(38) = -X(22) + X(2) + X(6) + X(10) + X(14)
        315 X(39) = -X(23) + X(3) + X(7) + X(11) + X(15)
        316 X(40) = -X(24) + X(4) + X(8) + X(12) + X(16)

        317 X(41) = 5 * X(21) - X(1) - X(5) - X(9) - X(13)
        318 X(42) = 5 * X(22) - X(2) - X(6) - X(10) - X(14)
        319 X(43) = 5 * X(23) - X(3) - X(7) - X(11) - X(15)
        320 X(44) = 5 * X(24) - X(4) - X(8) - X(12) - X(16)





        321 X(45) = -X(21) + X(17)
        322 X(46) = -X(22) + X(18)
        323 X(47) = -X(23) + X(19)
        324 X(48) = -X(24) + X(20)


        325 X(49) = 15 * X(21) - X(17)
        326 X(50) = 12 * X(22) - X(18)
        327 X(51) = 9 * X(23) - X(19)

        328 X(52) = 6 * X(24) - X(20)

        329 X(53) = -8 + X(17) + X(18) + X(19) + X(20)



        330 X(54) = X(21) - X(22)
        331 X(55) = X(22) - X(23)
        332 X(56) = X(23) - X(24)


        333 X(57) = X(17) - X(18)
        334 X(58) = X(18) - X(19)
        335 X(59) = X(19) - X(20)




        425 FOR J99 = 25 TO 59



            426 IF X(J99) < 0 THEN X(J99) = X(J99) ELSE X(J99) = 0

        427 NEXT J99

        431 SUMP = 0
        434 FOR J66 = 25 TO 59
            437 SUMP = SUMP + X(J66)
        440 NEXT J66



        459 POBA = -X(17) - X(18) - X(19) - X(20) - .1 * X(21) - .2 * X(22) - .3 * X(23) - .4 * X(24) + 1000000 * SUMP



        466 P = POBA


        1111 IF P <= M THEN 1670



        1452 M = P
        1454 FOR klx = 1 TO 59



            1459 A(klx) = X(klx)
        1460 NEXT klx
        1557 REM GOTO 128

    1670 NEXT I

    1889 IF M < -8.9 THEN 1999



    1900 PRINT A(1), A(2), A(3), A(4), A(5)
    1903 PRINT A(6), A(7), A(8), A(9), A(10)

    1950 PRINT A(11), A(12), A(13), A(14), A(15)
    1953 PRINT A(16), A(17), A(18), A(19), A(20)
    1955 PRINT A(21), A(22), A(23), A(24)


    1957 PRINT M, JJJJ

1999 NEXT JJJJ



This BASIC computer program was run with qb64v1000-win [34]. The complete output through JJJJ = -31998.09000000031 is shown below:   

1      1      2      0      0
2      1      0      3      0
0      0      1      2      2
0      4      3      1      0
1      1      1      0
-8.6      -31999.21000000013     

1      2      0      0      1
0      3      0      2      1
1      0      1      2      1
0      4      3      1      0
1      1      1      0
-8.6      -31998.72000000021

1      2      0      0      0
0      4      0      3      1
0      0      1      2      1
0      3      3      2      0
1      1      1      0
-8.6      -31998.52000000024

1      1      2      0      0
2      1      0      3      0
0      0      1      2      2
0      4      3      1      0
1      1      1      0
-8.6      -31998.45000000025

1      2      0      0      0
1      4      0      3      0
0      0      1      2      1
0      4      3      1      0
1      1      1      0
-8.6      -31998.09000000031

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 [34], the wall-clock time for obtaining the output through JJJJ= -31998.09000000031 was 2 hours and 40 minutes.  One can compare the computational results here with those in Table 4 of Lin and Tsai  [17, p. 440]. 

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.

References

[1] Yuichiro Anzai (1974). On Integer Fractional Programming. Journal of the Operations Research Society of Japan, Volume 17, No. 1, March 1974, pp. 49-66.  http://www..orsj.or.jp/~archiv/pdf/e_mag/Vol.17_01_049.pdf.
[2] Sjirk Boon. Solving systems of nonlinear equations. Sci. Math. Num-Analysis,1992, Newsgroup Article 3529.
[3]  S. S. Chadha (2002).   Fractional programming with absolute-value functions.   European Journal of Operational Research 141 (2002) pp. 233-238.
[4]  Ching-Ter Chang (2002).   On the posynomial fractional programming problems.  European Journal of Operational Research 143 (2002) pp. 42-52. 
[5]  Ching-Ter Chang (2006).   Formulating the mixed integer fractional posynomial programming,  European Journal of Operational Research 173 (2006) pp. 370-386.       
[6] Piya Chootinan, Anthony Chen (2006). Constraint Handling in genetic algorithms using a gradient-based repair method. Computers and Operations Research 33 (2006) 2263-2281.
[7] Amir Hossein Gandomi, Xin-She Yang, Amir Hossein Alavi (2011). Mixed variable structural optimization using Firefly Algorithm, Computers and Structures 89 (2011) 2325-2336.
[8] Amir Hossein Gandomi, Xin-She Yang, Siamak Taratahari, Amir Hossein Alavi (2013). Firefly Algorithm with Chaos, Communications in Nonlinear Science and Numerical Sinulation 18 (2013) 89-98.
[9] Amir Hossein Gandomi, Xin-She Yang, Amir Hossein Alavi (2013). Cuckoo search algorithm: a metaheuristicapproach to solve structural optimization problem. Engineering with Computers (2013) 29:17-35.
[10] Amir Hossein Gandomi, Xin-She Yang, Amir Hossein Alavi (2013). Erratum to: Cuckoo search algorithm: a metaheuristicapproach to solve structural optimization problem. Engineering with Computers (2013) 29:245.
[11]  Chrysanthos E. Gounaris, Christodoulos A. Floudas.  Tight convex underestimators for Csquare-continuous problems: II. multivariate functions.  Journal of Global Optimization (2008) 42, pp. 69-89.

[12]  Ali Husseinzadeh Kashan  (2011).  An effective algorithm for constrained global optimization and application to mechanical engineering design:  League championship algorithm (LCA).  Computer-Aided Design 43 (2011) 1769-1792. 

[13]  Ali Husseinzadeh Kashan  (2015).  An effective algorithm for constrained optimization based on optics inspired optimization (OIO).  Computer-Aided Design 63 (2015) 52-71. 

[14]  Han-Lin Li, Jung-Fa Tsai, Christodoulos A. Floudas (2008).  Convex underestimating for posynomial functions of postive variables.  Optimization Letters 2, 333-340 (2008).
[15] 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.
[16] Han-Lin Li, Shu-Cherng Fang, Yao-Huei Huang, Tiantian Nie (2016).  An enhanced logarithmic method for signomial programming with discrete variables.  European Journal of Operational Research 255 (2016) pp. 922-934.
[17] Ming-Hua Lin, Jung-Fa Tsai (2011).  Finding multiple optimal solutions of signomial discrete programming problems with free variables, Optimization and Engineering (2011) 12:425-443.
[18] Ming-Hua Lin, Jung-Fa Tsai (2014). A deterministic global approach for mixed-discrete structural optimization, Engineering Optimization (2014) 46:7, pp. 863-879.
[19]  Hao-Chun Lu, Han-Lin Li, Chrysanthos E. Gounaris, Christodoulos A. Floudas (2010).  Convex relaxation for solving posynomial problems.  Journal of Global Optimization (2010) 46, pp. 147-154.
[20]  Hao-Chun Lu (2012).  An efficient convexification method for solving generalized geometric problems.  Journal of Industrial and Management Optimization, Volume 8, Number 2, May 2012, pp. 429-455.
[21]  Hao-Chun Lu (2017).  Improved logarithnic linearizing method for optimization problems with free-sign pure discrete signomial terms.  Journal of Global Optimization (2017) 68, pp. 95-123.
[22] Mathworks. Solving a mixed integer engineering design problem using the genetic algorithm – MATLAB & Simulink Example.
https://www.mathworks.com/help/gads/examples/solving-a-mixed-integer-engineering-design-problem-using-the-genetic-algorithm.html/
[23] 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.
[24] Sinan Melih Nigdeli, Gebrail Bekdas, Xin-She Yang (2016). Application of the Flower Pollination Algoritm in Structural Engineering. Springer International Publishing Switzerland 2016. http://www.springer.com/cda/content/document/cda…/
[25] Gideon Oron (1979) An algorithm for optimizing nonlinear contrained zero-one problems to improve wastewater treatment, Engineering Optimization, 4:2, 109-114.
[26] 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.
[27] c. R. Seshan, V. G. Tikekar (1980) Algorithms for Fractional Programming. Journal of the Indian Institute of Science 62 (B), Feb. 1980, Pp. 9-16.
[28]  Pei-Ping Shen, Yun-Peng Duan, Yong-Gang Pei.  A simplicial branch and duality boundalgorithm for the sum of convex-convex ratios problem.  Journal of Computational and Applied Mathematics 223 (2009) 145-158.
[29] P. B. Thanedar, G. N. Vanderplaats (1995). Survey of discrete variable optimization for structural design, Journal of Structural Engineering, 121 (2), 301-306 (1995).
[30] Jung-Fa Tsai (2005). Global optimization of nonlinear fractional programming problems in engineering design. Engineering Optimization (2005) 37:4, pp. 399-409.
[31] Jung-Fa Tsai, Ming-Hua Lin (2007). Finding all solutions of systems of nonlinear equations with free variables. Engineering Optimization (2007) 39:6, pp. 649-659
[32] 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.
[33] 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.
[34] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64.
[35] 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/
[36]  Helen Wu (2015).  Geometric Programming.  https://optimization.mccormick.northwstern.edu/index.php/Geometric_Programming.
[37] Xin-She Yang, Christian Huyck, Mehmet Karamanoglu, Nawaz Khan (2014). True global optimality of the pressure vessel design problem: A benchmark for bio-inspired optimisation algorithms.  https://arxiv.org/pdf/1403.7793.pdf.
[38] Xin-She Yang, Amir Hossein Gandomi (2012). Bat algorithm: a novel approach for global engineering optimization. Engineering Computations: International Journal for Computer-Aided Engineering and Software, Vol. 20,No. 5, 2012, pp. 461-483.
[39] B. D. Youn, K. K. Choi (2004). A new response surface methodology for reliability-based design optimization.  Computers and Structures 82 (2004) 241-256.

No comments:

Post a Comment