GLOBAL World [ GLOBAL World Home | GLOBALLib | Contact ]

ex5_2_5.gms:

References:

Point:


* NLP written by GAMS Convert at 07/19/01 13:39:38 * * Equation counts * Total E G L N X * 20 4 0 16 0 0 * * Variable counts * x b i s1s s2s sc si * Total cont binary integer sos1 sos2 scont sint * 33 33 0 0 0 0 0 0 * FX 0 0 0 0 0 0 0 0 * * Nonzero counts * Total const NL DLL * 239 44 195 0 * * Solve m using NLP minimizing objvar; Variables x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19 ,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,objvar; Positive Variables x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17 ,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32; Equations e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19 ,e20; e1.. - ((18 + (-6*x1) - 16*x4 - 15*x7 - 12*x10)*x18 + (18 + (-6*x2) - 16*x5 - 15*x8 - 12*x11)*x23 + (18 + (-6*x3) - 16*x6 - 15*x9 - 12*x12)*x28 + (15 + (-6*x1) - 16*x4 - 15*x7 - 12*x10)*x19 + (15 + (-6*x2) - 16*x5 - 15*x8 - 12 *x11)*x24 + (15 + (-6*x3) - 16*x6 - 15*x9 - 12*x12)*x29 + (19 + (-6*x1) - 16*x4 - 15*x7 - 12*x10)*x20 + (19 + (-6*x2) - 16*x5 - 15*x8 - 12*x11)*x25 + (19 + (-6*x3) - 16*x6 - 15*x9 - 12*x12)*x30 + (16 + (-6*x1) - 16*x4 - 15*x7 - 12*x10)*x21 + (16 + (-6*x2) - 16*x5 - 15*x8 - 12*x11)*x26 + (16 + (-6*x3) - 16*x6 - 15*x9 - 12*x12)*x31 + (14 + (-6*x1) - 16*x4 - 15*x7 - 12 *x10)*x22 + (14 + (-6*x2) - 16*x5 - 15*x8 - 12*x11)*x27 + (14 + (-6*x3) - 16*x6 - 15*x9 - 12*x12)*x32) - 8*x13 - 5*x14 - 9*x15 - 6*x16 - 4*x17 - objvar =E= 0; e2.. x7*x18 + x7*x19 + x7*x20 + x7*x21 + x7*x22 + x8*x23 + x8*x24 + x8*x25 + x8 *x26 + x8*x27 + x9*x28 + x9*x29 + x9*x30 + x9*x31 + x9*x32 =L= 50; e3.. x13 + x18 + x23 + x28 =L= 100; e4.. x14 + x19 + x24 + x29 =L= 200; e5.. x15 + x20 + x25 + x30 =L= 100; e6.. x16 + x21 + x26 + x31 =L= 100; e7.. x17 + x22 + x27 + x32 =L= 100; e8.. (3*x1 + x4 + x7 + 1.5*x10 - 2.5)*x18 + (3*x2 + x5 + x8 + 1.5*x11 - 2.5)* x23 + (3*x3 + x6 + x9 + 1.5*x12 - 2.5)*x28 - 0.5*x13 =L= 0; e9.. (x1 + 3*x4 + 2.5*x7 + 2.5*x10 - 2)*x18 + (x2 + 3*x5 + 2.5*x8 + 2.5*x11 - 2 )*x23 + (x3 + 3*x6 + 2.5*x9 + 2.5*x12 - 2)*x28 + 0.5*x13 =L= 0; e10.. (3*x1 + x4 + x7 + 1.5*x10 - 1.5)*x19 + (3*x2 + x5 + x8 + 1.5*x11 - 1.5)* x24 + (3*x3 + x6 + x9 + 1.5*x12 - 1.5)*x29 + 0.5*x14 =L= 0; e11.. (x1 + 3*x4 + 2.5*x7 + 2.5*x10 - 2.5)*x19 + (x2 + 3*x5 + 2.5*x8 + 2.5*x11 - 2.5)*x24 + (x3 + 3*x6 + 2.5*x9 + 2.5*x12 - 2.5)*x29 =L= 0; e12.. (3*x1 + x4 + x7 + 1.5*x10 - 2)*x20 + (3*x2 + x5 + x8 + 1.5*x11 - 2)*x25 + (3*x3 + x6 + x9 + 1.5*x12 - 2)*x30 =L= 0; e13.. (x1 + 3*x4 + 2.5*x7 + 2.5*x10 - 2.6)*x20 + (x2 + 3*x5 + 2.5*x8 + 2.5*x11 - 2.6)*x25 + (x3 + 3*x6 + 2.5*x9 + 2.5*x12 - 2.6)*x30 - 0.1*x15 =L= 0; e14.. (3*x1 + x4 + x7 + 1.5*x10 - 2)*x21 + (3*x2 + x5 + x8 + 1.5*x11 - 2)*x26 + (3*x3 + x6 + x9 + 1.5*x12 - 2)*x31 =L= 0; e15.. (x1 + 3*x4 + 2.5*x7 + 2.5*x10 - 2)*x21 + (x2 + 3*x5 + 2.5*x8 + 2.5*x11 - 2)*x26 + (x3 + 3*x6 + 2.5*x9 + 2.5*x12 - 2)*x31 + 0.5*x16 =L= 0; e16.. (3*x1 + x4 + x7 + 1.5*x10 - 2)*x22 + (3*x2 + x5 + x8 + 1.5*x11 - 2)*x27 + (3*x3 + x6 + x9 + 1.5*x12 - 2)*x32 =L= 0; e17.. (x1 + 3*x4 + 2.5*x7 + 2.5*x10 - 2)*x22 + (x2 + 3*x5 + 2.5*x8 + 2.5*x11 - 2)*x27 + (x3 + 3*x6 + 2.5*x9 + 2.5*x12 - 2)*x32 + 0.5*x17 =L= 0; e18.. x1 + x4 + x7 + x10 =E= 1; e19.. x2 + x5 + x8 + x11 =E= 1; e20.. x3 + x6 + x9 + x12 =E= 1; * set non default bounds x1.up = 1; x2.up = 1; x3.up = 1; x4.up = 1; x5.up = 1; x6.up = 1; x7.up = 1; x8.up = 1; x9.up = 1; x10.up = 1; x11.up = 1; x12.up = 1; x13.up = 100; x14.up = 200; x15.up = 100; x16.up = 100; x17.up = 100; x18.up = 100; x19.up = 200; x20.up = 100; x21.up = 100; x22.up = 100; x23.up = 100; x24.up = 200; x25.up = 100; x26.up = 100; x27.up = 100; x28.up = 100; x29.up = 200; x30.up = 100; x31.up = 100; x32.up = 100; * set non default levels * set non default marginals Model m / all /; m.limrow=0; m.limcol=0; $if NOT '%gams.u1%' == '' $include '%gams.u1%' Solve m using NLP minimizing objvar;