* Cute AMPL model (translation to GAMS) * * *************************** * SET UP THE INITIAL DATA * *************************** * Problem * ******** * The problem arises in the field of computer networks and parallel * computation. It deals with the static load balancing in a tree * computer network with two-way traffic. A set of heterogeneous host * computers are interconnected, in which each node processes jobs (the * jobs arriving at each node according to a time invariant Poisson process) * locally or sends it to a remote node,. In the latter case, there is a * communication delay of forwarding the job and getting a response back. * The problem is then to minimize the mean response time of a job. * The example considered here features 11 computers arranged as follows * 1 6 9 * \ | / * \ | / * 2---4---5---8---10 * / | \ * / | \ * 3 7 11 * Source * J. Li and H. Kameda, * "Optimal load balancing in tree network with two-way traffic", * Computer networks and ISDN systems, vol. 25, pp. 1335-1348, 1993. * SIF input Masha Sosonkina, Virginia Tech., 1995. * classification OLR2-MN-31-31 * Parameter eter assignment. * Problem dimentions * FI = SUM(arrival rate for a node) * Objective function * Constrains * Comm. constrains * XIJ --Link flow rate. $offdigit ; Parameter p1 / 3 /; Parameter n / 11 /; Parameter nlink / 20 /; Parameter nlinkm3 / 17 /; Parameter nlinkm4 / 16 /; Parameter fi / 514.0 /; Parameter cije / 9999.99 /; Parameter ip3 ; ip3 = 3 + (3); Parameter ip6 ; ip6 = 6 + (3); Parameter ip8 ; ip8 = 8 + (3); Parameter ip9 ; ip9 = 9 + (3); Parameter i2 ; i2 = 2 * (7); Parameter i2p1; i2p1 = 1 + (2 * (7)); Parameter i2p2; i2p2 = 2 + (2 * (7)); Positive Variable x4_1 , x1_4 , x4_2 , x2_4 , x4_3 , x3_4 , x4_5 , x5_4 , x5_6 , x6_5 , x5_7 , x7_5 , x5_8 , x8_5 , x8_9 , x9_8 , x8_10, x10_8, x8_11, x11_8, b1 , b2 , b3 , b4 , b5 , b6 , b7 , b8 , b9 , b10 , b11 ; Variable obj ; Equation cnst1 , cnst2 , cnst3 , cnst4 , cnst5 , cnst6 , cnst7 , cnst8 , cnst9 , cnst10 , cnst11 , cnst12 , cnst13 , cnst14 , cnst15 , cnst16 , cnst17 , cnst18 , cnst19 , cnst20 , n1 , n2 , n3 , n4 , n5 , n6 , n7 , n8 , n9 , n10 , n11 , Def_obj ; cnst1.. 0 =g= 20.0* x4_1 + 80.0* x1_4 - 999.99 ; cnst2.. 0 =g= 80.0* x4_1 + 20.0* x1_4 - 999.99 ; cnst3.. 0 =g= 20.0* x4_2 + 80.0* x2_4 - 999.99 ; cnst4.. 0 =g= 80.0* x4_2 + 20.0* x2_4 - 999.99 ; cnst5.. 0 =g= 20.0* x4_3 + 80.0* x3_4 - 999.99 ; cnst6.. 0 =g= 80.0* x4_3 + 20.0* x3_4 - 999.99 ; cnst7.. 0 =g= 20.0* x5_6 + 80.0* x6_5 - 999.99 ; cnst8.. 0 =g= 80.0* x5_6 + 20.0* x6_5 - 999.99 ; cnst9.. 0 =g= 20.0* x5_7 + 80.0* x7_5 - 999.99 ; cnst10.. 0 =g= 80.0* x5_7 + 20.0* x7_5 - 999.99 ; cnst11.. 0 =g= 20.0* x8_9 + 80.0* x9_8 - 999.99 ; cnst12.. 0 =g= 80.0* x8_9 + 20.0* x9_8 - 999.99 ; cnst13.. 0 =g= 20.0*x8_10 + 80.0*x10_8 - 999.99 ; cnst14.. 0 =g= 80.0*x8_10 + 20.0*x10_8 - 999.99 ; cnst15.. 0 =g= 20.0*x8_11 + 80.0*x11_8 - 999.99 ; cnst16.. 0 =g= 80.0*x8_11 + 20.0*x11_8 - 999.99 ; cnst17.. 0 =g= 20.0* x4_5 + 80.0* x5_4 - 9999.99 ; cnst18.. 0 =g= 80.0* x4_5 + 20.0* x5_4 - 9999.99 ; cnst19.. 0 =g= 20.0* x5_8 + 80.0* x8_5 - 9999.99 ; cnst20.. 0 =g= 80.0* x5_8 + 20.0* x8_5 - 9999.99 ; n1.. x4_1 - x1_4 - b1 + 95.0 =e= 0; n2.. x4_2 - x2_4 - b2 + 95.0 =e= 0; n3.. x4_3 - x3_4 - b3 + 19.0 =e= 0; n4.. -x4_1 + x1_4 - x4_2 + x2_4 - x4_3 + x3_4 - x4_5 + x5_4 - b4 + 70.0 =e= 0; n5.. x4_5 - x5_4 - x5_6 + x6_5 - x5_7 + x7_5 - x5_8 + x8_5 - b5 + 70.0 =e= 0; n6.. x5_6 - x6_5 - b6 + 19.0 =e= 0; n7.. x5_7 - x7_5 - b7 + 19.0 =e= 0; n8.. x5_8 - x8_5 - x8_9 + x9_8 - x8_10 + x10_8 - x8_11 + x11_8 - b8 + 70.0 =e= 0; n9.. x8_9 - x9_8 - b9 + 19.0 =e= 0; n10.. x8_10 - x10_8 - b10 + 19.0 =e= 0; n11.. x8_11 - x11_8 - b11 + 19.0 =e= 0; Def_obj.. obj =e= ((b1 / ((100.0) - b1 ) )/102.80000000000001) + ((b2 / ((100.0) - b2 ) )/102.80000000000001) + ((b3 / (( 20.0) - b3 ) )/102.80000000000001) + ((b4 / ((100.0) - b4 ) )/102.80000000000001) + ((b5 / ((100.0) - b5 ) )/102.80000000000001) + ((b6 / (( 20.0) - b6 ) )/102.80000000000001) + ((b7 / (( 20.0) - b7 ) )/102.80000000000001) + ((b8 / ((100.0) - b8 ) )/102.80000000000001) + ((b9 / (( 20.0) - b9 ) )/102.80000000000001) + ((b10 / (( 20.0) - b10 ) )/102.80000000000001) + ((b11 / (( 20.0) - b11 ) )/102.80000000000001) + (( x4_1 /(( 1000.0) - ((80.0) * x4_1 + (20.0) * x1_4 )))/ 6.425000000000001) + (( x4_1 /(( 1000.0) - ((20.0) * x4_1 + (80.0) * x1_4 )))/25.700000000000003) + (( x4_2 /(( 1000.0) - ((80.0) * x4_2 + (20.0) * x2_4 )))/ 6.425000000000001) + (( x4_2 /(( 1000.0) - ((20.0) * x4_2 + (80.0) * x2_4 )))/25.700000000000003) + (( x4_3 /(( 1000.0) - ((80.0) * x4_3 + (20.0) * x3_4 )))/ 6.425000000000001) + (( x4_3 /(( 1000.0) - ((20.0) * x4_3 + (80.0) * x3_4 )))/25.700000000000003) + (( x1_4 /(( 1000.0) - ((80.0) * x1_4 + (20.0) * x4_1 )))/ 6.425000000000001) + (( x1_4 /(( 1000.0) - ((20.0) * x1_4 + (80.0) * x4_1 )))/25.700000000000003) + (( x2_4 /(( 1000.0) - ((80.0) * x2_4 + (20.0) * x4_2 )))/ 6.425000000000001) + (( x2_4 /(( 1000.0) - ((20.0) * x2_4 + (80.0) * x4_2 )))/25.700000000000003) + (( x3_4 /(( 1000.0) - ((80.0) * x3_4 + (20.0) * x4_3 )))/ 6.425000000000001) + (( x3_4 /(( 1000.0) - ((20.0) * x3_4 + (80.0) * x4_3 )))/25.700000000000003) + (( x8_9 /(( 1000.0) - ((80.0) * x8_9 + (20.0) * x9_8 )))/ 6.425000000000001) + (( x8_9 /(( 1000.0) - ((20.0) * x8_9 + (80.0) * x9_8 )))/25.700000000000003) + ((x8_10 /(( 1000.0) - ((80.0) *x8_10 + (20.0) *x10_8 )))/ 6.425000000000001) + ((x8_10 /(( 1000.0) - ((20.0) *x8_10 + (80.0) *x10_8 )))/25.700000000000003) + ((x8_11 /(( 1000.0) - ((80.0) *x8_11 + (20.0) *x11_8 )))/ 6.425000000000001) + ((x8_11 /(( 1000.0) - ((20.0) *x8_11 + (80.0) *x11_8 )))/25.700000000000003) + (( x9_8 /(( 1000.0) - ((80.0) * x9_8 + (20.0) * x8_9 )))/ 6.425000000000001) + (( x9_8 /(( 1000.0) - ((20.0) * x9_8 + (80.0) * x8_9 )))/25.700000000000003) + ((x10_8 /(( 1000.0) - ((80.0) *x10_8 + (20.0) *x8_10 )))/ 6.425000000000001) + ((x10_8 /(( 1000.0) - ((20.0) *x10_8 + (80.0) *x8_10 )))/25.700000000000003) + ((x11_8 /(( 1000.0) - ((80.0) *x11_8 + (20.0) *x8_11 )))/ 6.425000000000001) + ((x11_8 /(( 1000.0) - ((20.0) *x11_8 + (80.0) *x8_11 )))/25.700000000000003) + (( x5_6 /(( 1000.0) - ((80.0) * x5_6 + (20.0) * x6_5 )))/ 6.425000000000001) + (( x5_6 /(( 1000.0) - ((20.0) * x5_6 + (80.0) * x6_5 )))/25.700000000000003) + (( x6_5 /(( 1000.0) - ((80.0) * x6_5 + (20.0) * x5_6 )))/ 6.425000000000001) + (( x6_5 /(( 1000.0) - ((20.0) * x6_5 + (80.0) * x5_6 )))/25.700000000000003) + (( x5_7 /(( 1000.0) - ((80.0) * x5_7 + (20.0) * x7_5 )))/ 6.425000000000001) + (( x5_7 /(( 1000.0) - ((20.0) * x5_7 + (80.0) * x7_5 )))/25.700000000000003) + (( x7_5 /(( 1000.0) - ((80.0) * x7_5 + (20.0) * x5_7 )))/ 6.425000000000001) + (( x7_5 /(( 1000.0) - ((20.0) * x7_5 + (80.0) * x5_7 )))/25.700000000000003) + (( x5_4 /((10000.0) - ((80.0) * x5_4 + (20.0) * x4_5 )))/ 6.425000000000001) + (( x5_4 /((10000.0) - ((20.0) * x5_4 + (80.0) * x4_5 )))/25.700000000000003) + (( x4_5 /((10000.0) - ((80.0) * x4_5 + (20.0) * x5_4 )))/ 6.425000000000001) + (( x4_5 /((10000.0) - ((20.0) * x4_5 + (80.0) * x5_4 )))/25.700000000000003) + (( x5_8 /((10000.0) - ((80.0) * x5_8 + (20.0) * x8_5 )))/ 6.425000000000001) + (( x5_8 /((10000.0) - ((20.0) * x5_8 + (80.0) * x8_5 )))/25.700000000000003) + (( x8_5 /((10000.0) - ((80.0) * x8_5 + (20.0) * x5_8 )))/ 6.425000000000001) + (( x8_5 /((10000.0) - ((20.0) * x8_5 + (80.0) * x5_8 )))/25.700000000000003) ; b1.l = 95.0 ; b2.l = 95.0 ; b3.l = 19.0 ; b4.l = 70.0 ; b5.l = 70.0 ; b6.l = 19.0 ; b7.l = 19.0 ; b8.l = 70.0 ; b9.l = 19.0 ; b10.l = 19.0 ; b11.l = 19.0 ; b1.up = 99.99 ; b2.up = 99.99 ; b3.up = 19.99 ; b4.up = 99.99 ; b5.up = 99.99 ; b6.up = 19.99 ; b7.up = 19.99 ; b8.up = 99.99 ; b9.up = 19.99 ; b10.up = 19.99 ; b11.up = 19.99 ; Model loadbal /all/; Solve loadbal using nlp minimize obj; display x4_1.l; display x1_4.l; display x4_2.l; display x2_4.l; display x4_3.l; display x3_4.l; display x4_5.l; display x5_4.l; display x5_6.l; display x6_5.l; display x5_7.l; display x7_5.l; display x5_8.l; display x8_5.l; display x8_9.l; display x9_8.l; display x8_10.l; display x10_8.l; display x8_11.l; display x11_8.l; display b1.l; display b2.l; display b3.l; display b4.l; display b5.l; display b6.l; display b7.l; display b8.l; display b9.l; display b10.l; display b11.l; display obj.l;