Solve this Program

Hi,
Any one can just copy and pastes this code in GAMS and send me the answer file. It’s really help full to me. I am very much sure that there is no error
in this code but I have demo version of GAMS, so I can’t solve this.


SETS I / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18/;
SETS M / 1,2,3,4/;
PARAMETER CD(I) / 1 0.0, 2 0.0, 3 0.1, 4 0.1, 5 0.1 , 6 0.1, 7 0.2, 8 0.2, 9 0.2, 10 0.2, 11 0.2, 12 0.2, 13 0.2, 14 0.2, 15 0.2, 16 0.2, 17 0.2, 18 0.2/;
PARAMETER CH(I) / 1 3, 2 3, 3 3,4 3 ,5 3, 6 3,7 3.5, 8 3.5, 9 3.5, 10 3.5, 11 3.5, 12 3.5, 13 3.5, 14 3.5, 15 3.5, 16 3.5, 17 3.5, 18 3.5/;
PARAMETER XL(M) / 1 0.3, 2 0.3, 3 0.35, 4 0.35/;
PARAMETER XM(M) / 1 0.85, 2 0.85, 3 0.85,4 0.85/;

VARIABLES C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,X1,X2,
X3,X4,LAMBDA, obj;
EQUATION EQ1,EQ2,EQ3,EQ4,EQ5,EQ6,EQ7,EQ8,EQ9,EQ10,EQ11,EQ12,EQ13,EQ14,EQ15
EQ16,EQ17,EQ18,EQ19(I),EQ20(I),EQ21(I),EQ22(I),EQ23(I),EQ24(I),EQ25(I),EQ26(I),EQ27(I),EQ28(I),EQ29(I),EQ30(I),EQ31(I),EQ32(I)
,EQ33(I),EQ34(I),EQ35(I),EQ36(I),EQ37(M),EQ38(M),EQ39(M),EQ40(M),EQ40,EQ41(I),EQ42(I),EQ43(I),EQ44(I),EQ45(I),EQ46(I),EQ47(I)
,EQ47(I),EQ48(I),EQ49(I),EQ50(I),EQ51(I),EQ52(I),EQ53(I),EQ54(I),EQ55(I),EQ56(I),EQ57(I),EQ58(I),EQ59(I),EQ60(I),EQ61(I)
,EQ62(I),EQ63(I),EQ64(I),EQ65(I),EQ66(I),EQ67(I),EQ68(I),EQ69(I),EQ70(I),EQ71(I),EQ72(I),EQ73(I),EQ74(I),EQ75(I),EQ76(I),EQ77(M)
,EQ78(M),EQ79(M),EQ80(M),EQ81(M),EQ82(M),EQ83(M),EQ84(M),EQ85,EQ86,objective;

EQ1…C1 =E= 0.1142 - (0.0893X1);
EQ2…C2 =E= 0.1935 - (0.1702
X1);
EQ3…C3 =E= 0.2595 - (0.1687X1);
EQ4…C4 =E= 0.6198 - (0.2409
X1) - (0.2942X2);
EQ5…C5 =E= 0.9472 - (0.3062
X1) - (0.5618X2);
EQ6…C6 =E= 1.2433 - (0.3651
X1) - (0.8042X2);
EQ7…C7 =E= 1.3230 - (0.3628
X1) - (0.7992X2);
EQ8…C8 =E= 1.8327 - (0.4149
X1) - (1.0150X2) - (0.2524X3);
EQ9…C9 =E= 2.2948 - (0.4620X1) - (1.2095X2) - (0.4828X3);
EQ10…C10 =E= 2.7140 - (0.5041
X1) - (1.3862X2) - (0.6923X3);
EQ11…C11 =E= 3.0919 - (0.5418X1) - (1.5453X2) - (0.8821X3);
EQ12…C12 =E= 3.1175 - (0.5361
X1) - (1.5289X2) - (0.8734X3);
EQ13…C13 =E= 3.6006 - (0.5691X1) - (1.6690X2) - (1.0412X3) - (0.1538X4);
EQ14…C14 =E= 4.0345 - (0.5980X1) - (1.7928X2) - (1.1937X3) - (0.2935X4);
EQ15…C15 =E= 4.4259 - (0.6238X1) - (1.9039X2) - (1.3309X3) - (0.4211X4);
EQ16…C16 =E= 4.7756 - (0.6462X1) - (2.0023X2) - (1.4538X3) - (0.5366X4);
EQ17…C17 =E= 5.0877 - (0.6656X1) - (2.0894X2) - (1.5635X3) - (0.6413X4);
EQ18…C18 =E= 5.3635 - (0.6823X1) - (2.1652X2) - (1.6611X3) - (0.7354X4);
EQ19(I)…LAMBDA =L= ((CH(I) - C1)/(CH(I) - CD(I))) ;
EQ20(I)…LAMBDA =L= ((CH(I) - C2)/(CH(I) - CD(I)));
EQ21(I)…LAMBDA =L= ((CH(I) - C3)/(CH(I) - CD(I)));
EQ22(I)…LAMBDA =L= ((CH(I) - C4)/(CH(I) - CD(I)));
EQ23(I)…LAMBDA =L= ((CH(I) - C5)/(CH(I) - CD(I)));
EQ24(I)…LAMBDA =L= ((CH(I) - C6)/(CH(I) - CD(I)));
EQ25(I)…LAMBDA =L= ((CH(I) - C7)/(CH(I) - CD(I)));
EQ26(I)…LAMBDA =L= ((CH(I) - C8)/(CH(I) - CD(I)));
EQ27(I)…LAMBDA =L= ((CH(I) - C9)/(CH(I) - CD(I)));
EQ28(I)…LAMBDA =L= ((CH(I) - C10)/(CH(I) - CD(I)));
EQ29(I)…LAMBDA =L= ((CH(I) - C11)/(CH(I) - CD(I)));
EQ30(I)…LAMBDA =L= ((CH(I) - C12)/(CH(I) - CD(I)));
EQ31(I)…LAMBDA =L= ((CH(I) - C13)/(CH(I) - CD(I)));
EQ32(I)…LAMBDA =L= ((CH(I) - C14)/(CH(I) - CD(I)));
EQ33(I)…LAMBDA =L= ((CH(I) - C15)/(CH(I) - CD(I)));
EQ34(I)…LAMBDA =L= ((CH(I) - C16)/(CH(I) - CD(I)));
EQ35(I)…LAMBDA =L= ((CH(I) - C17)/(CH(I) - CD(I)));
EQ36(I)…LAMBDA =L= ((CH(I) - C18)/(CH(I) - CD(I)));
EQ37(M)…LAMBDA =L= ((XM(M) - X1)/(XM(M) - XL(M)));
EQ38(M)…LAMBDA =L= ((XM(M) - X2)/(XM(M) - XL(M)));
EQ39(M)…LAMBDA =L= ((XM(M) - X3)/(XM(M) - XL(M)));
EQ40(M)…LAMBDA =L= ((XM(M) - X4)/(XM(M) - XL(M)));
EQ41(I)…C1 =G= CD(I);
EQ42(I)…C2 =G= CD(I);
EQ43(I)…C3 =G= CD(I);
EQ44(I)…C4 =G= CD(I);
EQ45(I)…C5 =G= CD(I);
EQ46(I)…C6 =G= CD(I);
EQ47(I)…C7 =G= CD(I);
EQ48(I)…C8 =G= CD(I);
EQ49(I)…C9 =G= CD(I);
EQ50(I)…C10 =G= CD(I);
EQ51(I)…C11 =G= CD(I);
EQ52(I)…C12 =G= CD(I);
EQ53(I)…C13 =G= CD(I);
EQ54(I)…C14 =G= CD(I);
EQ55(I)…C15 =G= CD(I);
EQ56(I)…C16 =G= CD(I);
EQ57(I)…C17 =G= CD(I);
EQ58(I)…C18 =G= CD(I);
EQ59(I)…C1 =L= CH(I);
EQ60(I)…C2 =L= CH(I);
EQ61(I)…C3 =L= CH(I);
EQ62(I)…C4 =L= CH(I);
EQ63(I)…C5 =L= CH(I);
EQ64(I)…C6 =L= CH(I);
EQ65(I)…C7 =L= CH(I);
EQ66(I)…C8 =L= CH(I);
EQ67(I)…C9 =L= CH(I);
EQ68(I)…C10 =L= CH(I);
EQ69(I)…C11 =L= CH(I);
EQ70(I)…C12 =L= CH(I);
EQ71(I)…C13 =L= CH(I);
EQ72(I)…C14 =L= CH(I);
EQ73(I)…C15 =L= CH(I);
EQ74(I)…C16 =L= CH(I);
EQ75(I)…C17 =L= CH(I);
EQ76(I)…C18 =L= CH(I);
EQ77(M)…X1 =G= XL(M);
EQ78(M)…X2 =G= XL(M);
EQ79(M)…X3 =G= XL(M);
EQ80(M)…X4 =G= XL(M);
EQ81(M)…X1 =L= XM(M);
EQ82(M)…X2 =L= XM(M);
EQ83(M)…X3 =L= XM(M);
EQ84(M)…X4 =L= XM(M);
EQ85…LAMBDA =G= 0;
EQ86…LAMBDA =G= 1;
objective…obj =E= LAMBDA;

MODEL EQ /ALL/

SOLVE Eq USING LP MINIMIZING obj;

Thanks,

Best Regards
Sohom Mandal
M.tech
Center for Enviornmental Science and Engineering
IIT Bombay, Powai, Mumbai
Pin 400076
Mobile: 9930065368
sohomiitb@gmail.com
sohomiitb@iitb.ac.in


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

hi
I run this code by Gurobi in neos-server (NEOS) that return below statement

LP status(4): Model was proven to be either infeasible or unbounded.


*** Gurobi reports the model to be either infeasible or unbounded.
*** Use option ‘rerun 1’ in a GAMS/Gurobi option file
*** to determine the primal solution status.




No solution returned

On Fri, Nov 18, 2011 at 1:50 PM, SOHOM MANDAL wrote:

Hi,
Any one can just copy and pastes this code in GAMS and send me the answer file. It’s really help full to me. I am very much sure that there is no error
in this code but I have demo version of GAMS, so I can’t solve this.


SETS I / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18/;
SETS M / 1,2,3,4/;
PARAMETER CD(I) / 1 0.0, 2 0.0, 3 0.1, 4 0.1, 5 0.1 , 6 0.1, 7 0.2, 8 0.2, 9 0.2, 10 0.2, 11 0.2, 12 0.2, 13 0.2, 14 0.2, 15 0.2, 16 0.2, 17 0.2, 18 0.2/;
PARAMETER CH(I) / 1 3, 2 3, 3 3,4 3 ,5 3, 6 3,7 3.5, 8 3.5, 9 3.5, 10 3.5, 11 3.5, 12 3.5, 13 3.5, 14 3.5, 15 3.5, 16 3.5, 17 3.5, 18 3.5/;
PARAMETER XL(M) / 1 0.3, 2 0.3, 3 0.35, 4 0.35/;
PARAMETER XM(M) / 1 0.85, 2 0.85, 3 0.85,4 0.85/;

VARIABLES C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,X1,X2,
X3,X4,LAMBDA, obj;
EQUATION EQ1,EQ2,EQ3,EQ4,EQ5,EQ6,EQ7,EQ8,EQ9,EQ10,EQ11,EQ12,EQ13,EQ14,EQ15
EQ16,EQ17,EQ18,EQ19(I),EQ20(I),EQ21(I),EQ22(I),EQ23(I),EQ24(I),EQ25(I),EQ26(I),EQ27(I),EQ28(I),EQ29(I),EQ30(I),EQ31(I),EQ32(I)
,EQ33(I),EQ34(I),EQ35(I),EQ36(I),EQ37(M),EQ38(M),EQ39(M),EQ40(M),EQ40,EQ41(I),EQ42(I),EQ43(I),EQ44(I),EQ45(I),EQ46(I),EQ47(I)
,EQ47(I),EQ48(I),EQ49(I),EQ50(I),EQ51(I),EQ52(I),EQ53(I),EQ54(I),EQ55(I),EQ56(I),EQ57(I),EQ58(I),EQ59(I),EQ60(I),EQ61(I)
,EQ62(I),EQ63(I),EQ64(I),EQ65(I),EQ66(I),EQ67(I),EQ68(I),EQ69(I),EQ70(I),EQ71(I),EQ72(I),EQ73(I),EQ74(I),EQ75(I),EQ76(I),EQ77(M)
,EQ78(M),EQ79(M),EQ80(M),EQ81(M),EQ82(M),EQ83(M),EQ84(M),EQ85,EQ86,objective;

EQ1…C1 =E= 0.1142 - (0.0893X1);
EQ2…C2 =E= 0.1935 - (0.1702
X1);
EQ3…C3 =E= 0.2595 - (0.1687X1);
EQ4…C4 =E= 0.6198 - (0.2409
X1) - (0.2942X2);
EQ5…C5 =E= 0.9472 - (0.3062
X1) - (0.5618X2);
EQ6…C6 =E= 1.2433 - (0.3651
X1) - (0.8042X2);
EQ7…C7 =E= 1.3230 - (0.3628
X1) - (0.7992X2);
EQ8…C8 =E= 1.8327 - (0.4149
X1) - (1.0150X2) - (0.2524X3);
EQ9…C9 =E= 2.2948 - (0.4620X1) - (1.2095X2) - (0.4828X3);
EQ10…C10 =E= 2.7140 - (0.5041
X1) - (1.3862X2) - (0.6923X3);
EQ11…C11 =E= 3.0919 - (0.5418X1) - (1.5453X2) - (0.8821X3);
EQ12…C12 =E= 3.1175 - (0.5361
X1) - (1.5289X2) - (0.8734X3);
EQ13…C13 =E= 3.6006 - (0.5691X1) - (1.6690X2) - (1.0412X3) - (0.1538X4);
EQ14…C14 =E= 4.0345 - (0.5980X1) - (1.7928X2) - (1.1937X3) - (0.2935X4);
EQ15…C15 =E= 4.4259 - (0.6238X1) - (1.9039X2) - (1.3309X3) - (0.4211X4);
EQ16…C16 =E= 4.7756 - (0.6462X1) - (2.0023X2) - (1.4538X3) - (0.5366X4);
EQ17…C17 =E= 5.0877 - (0.6656X1) - (2.0894X2) - (1.5635X3) - (0.6413X4);
EQ18…C18 =E= 5.3635 - (0.6823X1) - (2.1652X2) - (1.6611X3) - (0.7354X4);
EQ19(I)…LAMBDA =L= ((CH(I) - C1)/(CH(I) - CD(I))) ;
EQ20(I)…LAMBDA =L= ((CH(I) - C2)/(CH(I) - CD(I)));
EQ21(I)…LAMBDA =L= ((CH(I) - C3)/(CH(I) - CD(I)));
EQ22(I)…LAMBDA =L= ((CH(I) - C4)/(CH(I) - CD(I)));
EQ23(I)…LAMBDA =L= ((CH(I) - C5)/(CH(I) - CD(I)));
EQ24(I)…LAMBDA =L= ((CH(I) - C6)/(CH(I) - CD(I)));
EQ25(I)…LAMBDA =L= ((CH(I) - C7)/(CH(I) - CD(I)));
EQ26(I)…LAMBDA =L= ((CH(I) - C8)/(CH(I) - CD(I)));
EQ27(I)…LAMBDA =L= ((CH(I) - C9)/(CH(I) - CD(I)));
EQ28(I)…LAMBDA =L= ((CH(I) - C10)/(CH(I) - CD(I)));
EQ29(I)…LAMBDA =L= ((CH(I) - C11)/(CH(I) - CD(I)));
EQ30(I)…LAMBDA =L= ((CH(I) - C12)/(CH(I) - CD(I)));
EQ31(I)…LAMBDA =L= ((CH(I) - C13)/(CH(I) - CD(I)));
EQ32(I)…LAMBDA =L= ((CH(I) - C14)/(CH(I) - CD(I)));
EQ33(I)…LAMBDA =L= ((CH(I) - C15)/(CH(I) - CD(I)));
EQ34(I)…LAMBDA =L= ((CH(I) - C16)/(CH(I) - CD(I)));
EQ35(I)…LAMBDA =L= ((CH(I) - C17)/(CH(I) - CD(I)));
EQ36(I)…LAMBDA =L= ((CH(I) - C18)/(CH(I) - CD(I)));
EQ37(M)…LAMBDA =L= ((XM(M) - X1)/(XM(M) - XL(M)));
EQ38(M)…LAMBDA =L= ((XM(M) - X2)/(XM(M) - XL(M)));
EQ39(M)…LAMBDA =L= ((XM(M) - X3)/(XM(M) - XL(M)));
EQ40(M)…LAMBDA =L= ((XM(M) - X4)/(XM(M) - XL(M)));
EQ41(I)…C1 =G= CD(I);
EQ42(I)…C2 =G= CD(I);
EQ43(I)…C3 =G= CD(I);
EQ44(I)…C4 =G= CD(I);
EQ45(I)…C5 =G= CD(I);
EQ46(I)…C6 =G= CD(I);
EQ47(I)…C7 =G= CD(I);
EQ48(I)…C8 =G= CD(I);
EQ49(I)…C9 =G= CD(I);
EQ50(I)…C10 =G= CD(I);
EQ51(I)…C11 =G= CD(I);
EQ52(I)…C12 =G= CD(I);
EQ53(I)…C13 =G= CD(I);
EQ54(I)…C14 =G= CD(I);
EQ55(I)…C15 =G= CD(I);
EQ56(I)…C16 =G= CD(I);
EQ57(I)…C17 =G= CD(I);
EQ58(I)…C18 =G= CD(I);
EQ59(I)…C1 =L= CH(I);
EQ60(I)…C2 =L= CH(I);
EQ61(I)…C3 =L= CH(I);
EQ62(I)…C4 =L= CH(I);
EQ63(I)…C5 =L= CH(I);
EQ64(I)…C6 =L= CH(I);
EQ65(I)…C7 =L= CH(I);
EQ66(I)…C8 =L= CH(I);
EQ67(I)…C9 =L= CH(I);
EQ68(I)…C10 =L= CH(I);
EQ69(I)…C11 =L= CH(I);
EQ70(I)…C12 =L= CH(I);
EQ71(I)…C13 =L= CH(I);
EQ72(I)…C14 =L= CH(I);
EQ73(I)…C15 =L= CH(I);
EQ74(I)…C16 =L= CH(I);
EQ75(I)…C17 =L= CH(I);
EQ76(I)…C18 =L= CH(I);
EQ77(M)…X1 =G= XL(M);
EQ78(M)…X2 =G= XL(M);
EQ79(M)…X3 =G= XL(M);
EQ80(M)…X4 =G= XL(M);
EQ81(M)…X1 =L= XM(M);
EQ82(M)…X2 =L= XM(M);
EQ83(M)…X3 =L= XM(M);
EQ84(M)…X4 =L= XM(M);
EQ85…LAMBDA =G= 0;
EQ86…LAMBDA =G= 1;
objective…obj =E= LAMBDA;

MODEL EQ /ALL/

SOLVE Eq USING LP MINIMIZING obj;

Thanks,

Best Regards
Sohom Mandal
M.tech
Center for Enviornmental Science and Engineering
IIT Bombay, Powai, Mumbai
Pin 400076
Mobile: 9930065368
sohomiitb@gmail.com
sohomiitb@iitb.ac.in


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

GAMS gives:

Reading data…
Starting Cplex…
Row ‘EQ1’ infeasible, all entries at implied bounds.
Presolve time = 0.03 sec.
Presolve found the problem infeasible or unbounded.
Rerunning with presolve turned off.
Initializing dual steep norms . . .

Iteration log . . .
Iteration: 1 Scaled dual infeas = 2.000000
Iteration: 7 Dual objective = 1.000000
Dual infeasible or unbounded. Switching to primal to aid diagnosis.
Using devex.

Model has been proven infeasible.


On 18 Νοέ, 12:20, SOHOM MANDAL wrote:

Hi,
Any one can just copy and pastes this code in GAMS and send me the answer
file. It’s really help full to me. I am very much sure that there is no
error
in this code but I have demo version of GAMS, so I can’t solve this.

SETS I / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18/;
SETS M / 1,2,3,4/;
PARAMETER CD(I) / 1 0.0, 2 0.0, 3 0.1, 4 0.1, 5 0.1 , 6 0.1, 7 0.2, 8 0.2,
9 0.2, 10 0.2, 11 0.2, 12 0.2, 13 0.2, 14 0.2, 15 0.2, 16 0.2, 17 0.2, 18
0.2/;
PARAMETER CH(I) / 1 3, 2 3, 3 3,4 3 ,5 3, 6 3,7 3.5, 8 3.5, 9 3.5, 10 3.5,
11 3.5, 12 3.5, 13 3.5, 14 3.5, 15 3.5, 16 3.5, 17 3.5, 18 3.5/;
PARAMETER XL(M) / 1 0.3, 2 0.3, 3 0.35, 4 0.35/;
PARAMETER XM(M) / 1 0.85, 2 0.85, 3 0.85,4 0.85/;

VARIABLES
C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,X1,X2,
X3,X4,LAMBDA, obj;
EQUATION EQ1,EQ2,EQ3,EQ4,EQ5,EQ6,EQ7,EQ8,EQ9,EQ10,EQ11,EQ12,EQ13,EQ14,EQ15
EQ16,EQ17,EQ18,EQ19(I),EQ20(I),EQ21(I),EQ22(I),EQ23(I),EQ24(I),EQ25(I),EQ26(I),EQ27(I),EQ28(I),EQ29(I),EQ30(I),EQ31(I),EQ32(I)
,EQ33(I),EQ34(I),EQ35(I),EQ36(I),EQ37(M),EQ38(M),EQ39(M),EQ40(M),EQ40,EQ41(I),EQ42(I),EQ43(I),EQ44(I),EQ45(I),EQ46(I),EQ47(I)
,EQ47(I),EQ48(I),EQ49(I),EQ50(I),EQ51(I),EQ52(I),EQ53(I),EQ54(I),EQ55(I),EQ56(I),EQ57(I),EQ58(I),EQ59(I),EQ60(I),EQ61(I)
,EQ62(I),EQ63(I),EQ64(I),EQ65(I),EQ66(I),EQ67(I),EQ68(I),EQ69(I),EQ70(I),EQ71(I),EQ72(I),EQ73(I),EQ74(I),EQ75(I),EQ76(I),EQ77(M)
,EQ78(M),EQ79(M),EQ80(M),EQ81(M),EQ82(M),EQ83(M),EQ84(M),EQ85,EQ86,objective;

EQ1…C1 =E= 0.1142 - (0.0893X1);
EQ2…C2 =E= 0.1935 - (0.1702
X1);
EQ3…C3 =E= 0.2595 - (0.1687X1);
EQ4…C4 =E= 0.6198 - (0.2409
X1) - (0.2942X2);
EQ5…C5 =E= 0.9472 - (0.3062
X1) - (0.5618X2);
EQ6…C6 =E= 1.2433 - (0.3651
X1) - (0.8042X2);
EQ7…C7 =E= 1.3230 - (0.3628
X1) - (0.7992X2);
EQ8…C8 =E= 1.8327 - (0.4149
X1) - (1.0150X2) - (0.2524X3);
EQ9…C9 =E= 2.2948 - (0.4620X1) - (1.2095X2) - (0.4828X3);
EQ10…C10 =E= 2.7140 - (0.5041
X1) - (1.3862X2) - (0.6923X3);
EQ11…C11 =E= 3.0919 - (0.5418X1) - (1.5453X2) - (0.8821X3);
EQ12…C12 =E= 3.1175 - (0.5361
X1) - (1.5289X2) - (0.8734X3);
EQ13…C13 =E= 3.6006 - (0.5691X1) - (1.6690X2) - (1.0412X3) -
(0.1538
X4);
EQ14…C14 =E= 4.0345 - (0.5980X1) - (1.7928X2) - (1.1937X3) -
(0.2935
X4);
EQ15…C15 =E= 4.4259 - (0.6238X1) - (1.9039X2) - (1.3309X3) -
(0.4211
X4);
EQ16…C16 =E= 4.7756 - (0.6462X1) - (2.0023X2) - (1.4538X3) -
(0.5366
X4);
EQ17…C17 =E= 5.0877 - (0.6656X1) - (2.0894X2) - (1.5635X3) -
(0.6413
X4);
EQ18…C18 =E= 5.3635 - (0.6823X1) - (2.1652X2) - (1.6611X3) -
(0.7354
X4);
EQ19(I)…LAMBDA =L= ((CH(I) - C1)/(CH(I) - CD(I))) ;
EQ20(I)…LAMBDA =L= ((CH(I) - C2)/(CH(I) - CD(I)));
EQ21(I)…LAMBDA =L= ((CH(I) - C3)/(CH(I) - CD(I)));
EQ22(I)…LAMBDA =L= ((CH(I) - C4)/(CH(I) - CD(I)));
EQ23(I)…LAMBDA =L= ((CH(I) - C5)/(CH(I) - CD(I)));
EQ24(I)…LAMBDA =L= ((CH(I) - C6)/(CH(I) - CD(I)));
EQ25(I)…LAMBDA =L= ((CH(I) - C7)/(CH(I) - CD(I)));
EQ26(I)…LAMBDA =L= ((CH(I) - C8)/(CH(I) - CD(I)));
EQ27(I)…LAMBDA =L= ((CH(I) - C9)/(CH(I) - CD(I)));
EQ28(I)…LAMBDA =L= ((CH(I) - C10)/(CH(I) - CD(I)));
EQ29(I)…LAMBDA =L= ((CH(I) - C11)/(CH(I) - CD(I)));
EQ30(I)…LAMBDA =L= ((CH(I) - C12)/(CH(I) - CD(I)));
EQ31(I)…LAMBDA =L= ((CH(I) - C13)/(CH(I) - CD(I)));
EQ32(I)…LAMBDA =L= ((CH(I) - C14)/(CH(I) - CD(I)));
EQ33(I)…LAMBDA =L= ((CH(I) - C15)/(CH(I) - CD(I)));
EQ34(I)…LAMBDA =L= ((CH(I) - C16)/(CH(I) - CD(I)));
EQ35(I)…LAMBDA =L= ((CH(I) - C17)/(CH(I) - CD(I)));
EQ36(I)…LAMBDA =L= ((CH(I) - C18)/(CH(I) - CD(I)));
EQ37(M)…LAMBDA =L= ((XM(M) - X1)/(XM(M) - XL(M)));
EQ38(M)…LAMBDA =L= ((XM(M) - X2)/(XM(M) - XL(M)));
EQ39(M)…LAMBDA =L= ((XM(M) - X3)/(XM(M) - XL(M)));
EQ40(M)…LAMBDA =L= ((XM(M) - X4)/(XM(M) - XL(M)));
EQ41(I)…C1 =G= CD(I);
EQ42(I)…C2 =G= CD(I);
EQ43(I)…C3 =G= CD(I);
EQ44(I)…C4 =G= CD(I);
EQ45(I)…C5 =G= CD(I);
EQ46(I)…C6 =G= CD(I);
EQ47(I)…C7 =G= CD(I);
EQ48(I)…C8 =G= CD(I);
EQ49(I)…C9 =G= CD(I);
EQ50(I)…C10 =G= CD(I);
EQ51(I)…C11 =G= CD(I);
EQ52(I)…C12 =G= CD(I);
EQ53(I)…C13 =G= CD(I);
EQ54(I)…C14 =G= CD(I);
EQ55(I)…C15 =G= CD(I);
EQ56(I)…C16 =G= CD(I);
EQ57(I)…C17 =G= CD(I);
EQ58(I)…C18 =G= CD(I);
EQ59(I)…C1 =L= CH(I);
EQ60(I)…C2 =L= CH(I);
EQ61(I)…C3 =L= CH(I);
EQ62(I)…C4 =L= CH(I);
EQ63(I)…C5 =L= CH(I);
EQ64(I)…C6 =L= CH(I);
EQ65(I)…C7 =L= CH(I);
EQ66(I)…C8 =L= CH(I);
EQ67(I)…C9 =L= CH(I);
EQ68(I)…C10 =L= CH(I);
EQ69(I)…C11 =L= CH(I);
EQ70(I)…C12 =L= CH(I);
EQ71(I)…C13 =L= CH(I);
EQ72(I)…C14 =L= CH(I);
EQ73(I)…C15 =L= CH(I);
EQ74(I)…C16 =L= CH(I);
EQ75(I)…C17 =L= CH(I);
EQ76(I)…C18 =L= CH(I);
EQ77(M)…X1 =G= XL(M);
EQ78(M)…X2 =G= XL(M);
EQ79(M)…X3 =G= XL(M);
EQ80(M)…X4 =G= XL(M);
EQ81(M)…X1 =L= XM(M);
EQ82(M)…X2 =L= XM(M);
EQ83(M)…X3 =L= XM(M);
EQ84(M)…X4 =L= XM(M);
EQ85…LAMBDA =G= 0;
EQ86…LAMBDA =G= 1;
objective…obj =E= LAMBDA;

MODEL EQ /ALL/

SOLVE Eq USING LP MINIMIZING obj;

Thanks,

Best Regards
Sohom Mandal
M.tech
Center for Enviornmental Science and Engineering
IIT Bombay, Powai, Mumbai
Pin 400076
Mobile: 9930065368
sohomi...@gmail.com
sohomi…@iitb.ac.in

\

Attached

On Fri, Nov 18, 2011 at 6:20 PM, SOHOM MANDAL wrote:

Hi,
Any one can just copy and pastes this code in GAMS and send me the answer file. It’s really help full to me. I am very much sure that there is no error
in this code but I have demo version of GAMS, so I can’t solve this.


SETS I / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18/;
SETS M / 1,2,3,4/;
PARAMETER CD(I) / 1 0.0, 2 0.0, 3 0.1, 4 0.1, 5 0.1 , 6 0.1, 7 0.2, 8 0.2, 9 0.2, 10 0.2, 11 0.2, 12 0.2, 13 0.2, 14 0.2, 15 0.2, 16 0.2, 17 0.2, 18 0.2/;
PARAMETER CH(I) / 1 3, 2 3, 3 3,4 3 ,5 3, 6 3,7 3.5, 8 3.5, 9 3.5, 10 3.5, 11 3.5, 12 3.5, 13 3.5, 14 3.5, 15 3.5, 16 3.5, 17 3.5, 18 3.5/;
PARAMETER XL(M) / 1 0.3, 2 0.3, 3 0.35, 4 0.35/;
PARAMETER XM(M) / 1 0.85, 2 0.85, 3 0.85,4 0.85/;

VARIABLES C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,X1,X2,
X3,X4,LAMBDA, obj;
EQUATION EQ1,EQ2,EQ3,EQ4,EQ5,EQ6,EQ7,EQ8,EQ9,EQ10,EQ11,EQ12,EQ13,EQ14,EQ15
EQ16,EQ17,EQ18,EQ19(I),EQ20(I),EQ21(I),EQ22(I),EQ23(I),EQ24(I),EQ25(I),EQ26(I),EQ27(I),EQ28(I),EQ29(I),EQ30(I),EQ31(I),EQ32(I)
,EQ33(I),EQ34(I),EQ35(I),EQ36(I),EQ37(M),EQ38(M),EQ39(M),EQ40(M),EQ40,EQ41(I),EQ42(I),EQ43(I),EQ44(I),EQ45(I),EQ46(I),EQ47(I)
,EQ47(I),EQ48(I),EQ49(I),EQ50(I),EQ51(I),EQ52(I),EQ53(I),EQ54(I),EQ55(I),EQ56(I),EQ57(I),EQ58(I),EQ59(I),EQ60(I),EQ61(I)
,EQ62(I),EQ63(I),EQ64(I),EQ65(I),EQ66(I),EQ67(I),EQ68(I),EQ69(I),EQ70(I),EQ71(I),EQ72(I),EQ73(I),EQ74(I),EQ75(I),EQ76(I),EQ77(M)
,EQ78(M),EQ79(M),EQ80(M),EQ81(M),EQ82(M),EQ83(M),EQ84(M),EQ85,EQ86,objective;

EQ1…C1 =E= 0.1142 - (0.0893X1);
EQ2…C2 =E= 0.1935 - (0.1702
X1);
EQ3…C3 =E= 0.2595 - (0.1687X1);
EQ4…C4 =E= 0.6198 - (0.2409
X1) - (0.2942X2);
EQ5…C5 =E= 0.9472 - (0.3062
X1) - (0.5618X2);
EQ6…C6 =E= 1.2433 - (0.3651
X1) - (0.8042X2);
EQ7…C7 =E= 1.3230 - (0.3628
X1) - (0.7992X2);
EQ8…C8 =E= 1.8327 - (0.4149
X1) - (1.0150X2) - (0.2524X3);
EQ9…C9 =E= 2.2948 - (0.4620X1) - (1.2095X2) - (0.4828X3);
EQ10…C10 =E= 2.7140 - (0.5041
X1) - (1.3862X2) - (0.6923X3);
EQ11…C11 =E= 3.0919 - (0.5418X1) - (1.5453X2) - (0.8821X3);
EQ12…C12 =E= 3.1175 - (0.5361
X1) - (1.5289X2) - (0.8734X3);
EQ13…C13 =E= 3.6006 - (0.5691X1) - (1.6690X2) - (1.0412X3) - (0.1538X4);
EQ14…C14 =E= 4.0345 - (0.5980X1) - (1.7928X2) - (1.1937X3) - (0.2935X4);
EQ15…C15 =E= 4.4259 - (0.6238X1) - (1.9039X2) - (1.3309X3) - (0.4211X4);
EQ16…C16 =E= 4.7756 - (0.6462X1) - (2.0023X2) - (1.4538X3) - (0.5366X4);
EQ17…C17 =E= 5.0877 - (0.6656X1) - (2.0894X2) - (1.5635X3) - (0.6413X4);
EQ18…C18 =E= 5.3635 - (0.6823X1) - (2.1652X2) - (1.6611X3) - (0.7354X4);
EQ19(I)…LAMBDA =L= ((CH(I) - C1)/(CH(I) - CD(I))) ;
EQ20(I)…LAMBDA =L= ((CH(I) - C2)/(CH(I) - CD(I)));
EQ21(I)…LAMBDA =L= ((CH(I) - C3)/(CH(I) - CD(I)));
EQ22(I)…LAMBDA =L= ((CH(I) - C4)/(CH(I) - CD(I)));
EQ23(I)…LAMBDA =L= ((CH(I) - C5)/(CH(I) - CD(I)));
EQ24(I)…LAMBDA =L= ((CH(I) - C6)/(CH(I) - CD(I)));
EQ25(I)…LAMBDA =L= ((CH(I) - C7)/(CH(I) - CD(I)));
EQ26(I)…LAMBDA =L= ((CH(I) - C8)/(CH(I) - CD(I)));
EQ27(I)…LAMBDA =L= ((CH(I) - C9)/(CH(I) - CD(I)));
EQ28(I)…LAMBDA =L= ((CH(I) - C10)/(CH(I) - CD(I)));
EQ29(I)…LAMBDA =L= ((CH(I) - C11)/(CH(I) - CD(I)));
EQ30(I)…LAMBDA =L= ((CH(I) - C12)/(CH(I) - CD(I)));
EQ31(I)…LAMBDA =L= ((CH(I) - C13)/(CH(I) - CD(I)));
EQ32(I)…LAMBDA =L= ((CH(I) - C14)/(CH(I) - CD(I)));
EQ33(I)…LAMBDA =L= ((CH(I) - C15)/(CH(I) - CD(I)));
EQ34(I)…LAMBDA =L= ((CH(I) - C16)/(CH(I) - CD(I)));
EQ35(I)…LAMBDA =L= ((CH(I) - C17)/(CH(I) - CD(I)));
EQ36(I)…LAMBDA =L= ((CH(I) - C18)/(CH(I) - CD(I)));
EQ37(M)…LAMBDA =L= ((XM(M) - X1)/(XM(M) - XL(M)));
EQ38(M)…LAMBDA =L= ((XM(M) - X2)/(XM(M) - XL(M)));
EQ39(M)…LAMBDA =L= ((XM(M) - X3)/(XM(M) - XL(M)));
EQ40(M)…LAMBDA =L= ((XM(M) - X4)/(XM(M) - XL(M)));
EQ41(I)…C1 =G= CD(I);
EQ42(I)…C2 =G= CD(I);
EQ43(I)…C3 =G= CD(I);
EQ44(I)…C4 =G= CD(I);
EQ45(I)…C5 =G= CD(I);
EQ46(I)…C6 =G= CD(I);
EQ47(I)…C7 =G= CD(I);
EQ48(I)…C8 =G= CD(I);
EQ49(I)…C9 =G= CD(I);
EQ50(I)…C10 =G= CD(I);
EQ51(I)…C11 =G= CD(I);
EQ52(I)…C12 =G= CD(I);
EQ53(I)…C13 =G= CD(I);
EQ54(I)…C14 =G= CD(I);
EQ55(I)…C15 =G= CD(I);
EQ56(I)…C16 =G= CD(I);
EQ57(I)…C17 =G= CD(I);
EQ58(I)…C18 =G= CD(I);
EQ59(I)…C1 =L= CH(I);
EQ60(I)…C2 =L= CH(I);
EQ61(I)…C3 =L= CH(I);
EQ62(I)…C4 =L= CH(I);
EQ63(I)…C5 =L= CH(I);
EQ64(I)…C6 =L= CH(I);
EQ65(I)…C7 =L= CH(I);
EQ66(I)…C8 =L= CH(I);
EQ67(I)…C9 =L= CH(I);
EQ68(I)…C10 =L= CH(I);
EQ69(I)…C11 =L= CH(I);
EQ70(I)…C12 =L= CH(I);
EQ71(I)…C13 =L= CH(I);
EQ72(I)…C14 =L= CH(I);
EQ73(I)…C15 =L= CH(I);
EQ74(I)…C16 =L= CH(I);
EQ75(I)…C17 =L= CH(I);
EQ76(I)…C18 =L= CH(I);
EQ77(M)…X1 =G= XL(M);
EQ78(M)…X2 =G= XL(M);
EQ79(M)…X3 =G= XL(M);
EQ80(M)…X4 =G= XL(M);
EQ81(M)…X1 =L= XM(M);
EQ82(M)…X2 =L= XM(M);
EQ83(M)…X3 =L= XM(M);
EQ84(M)…X4 =L= XM(M);
EQ85…LAMBDA =G= 0;
EQ86…LAMBDA =G= 1;
objective…obj =E= LAMBDA;

MODEL EQ /ALL/

SOLVE Eq USING LP MINIMIZING obj;

Thanks,

Best Regards
Sohom Mandal
M.tech
Center for Enviornmental Science and Engineering
IIT Bombay, Powai, Mumbai
Pin 400076
Mobile: 9930065368
sohomiitb@gmail.com
sohomiitb@iitb.ac.in


Sohom.lst (119 KB)

Dear Aqeel.



You have an infeasible solution (attached listing).



Best wishes,



Frank Ward



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of AQEEL AHMED BAZMI
Sent: Sunday, November 20, 2011 12:58 PM
To: gamsworld@googlegroups.com
Subject: Re: Solve this Program



Attached

On Fri, Nov 18, 2011 at 6:20 PM, SOHOM MANDAL wrote:

Hi,

Any one can just copy and pastes this code in GAMS and send me the answer file. It’s really help full to me. I am very much sure that there is no error

in this code but I have demo version of GAMS, so I can’t solve this.





SETS I / 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18/;

SETS M / 1,2,3,4/;

PARAMETER CD(I) / 1 0.0, 2 0.0, 3 0.1, 4 0.1, 5 0.1 , 6 0.1, 7 0.2, 8 0.2, 9 0.2, 10 0.2, 11 0.2, 12 0.2, 13 0.2, 14 0.2, 15 0.2, 16 0.2, 17 0.2, 18 0.2/;

PARAMETER CH(I) / 1 3, 2 3, 3 3,4 3 ,5 3, 6 3,7 3.5, 8 3.5, 9 3.5, 10 3.5, 11 3.5, 12 3.5, 13 3.5, 14 3.5, 15 3.5, 16 3.5, 17 3.5, 18 3.5/;

PARAMETER XL(M) / 1 0.3, 2 0.3, 3 0.35, 4 0.35/;

PARAMETER XM(M) / 1 0.85, 2 0.85, 3 0.85,4 0.85/;



VARIABLES C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,X1,X2,

X3,X4,LAMBDA, obj;

EQUATION EQ1,EQ2,EQ3,EQ4,EQ5,EQ6,EQ7,EQ8,EQ9,EQ10,EQ11,EQ12,EQ13,EQ14,EQ15

EQ16,EQ17,EQ18,EQ19(I),EQ20(I),EQ21(I),EQ22(I),EQ23(I),EQ24(I),EQ25(I),EQ26(I),EQ27(I),EQ28(I),EQ29(I),EQ30(I),EQ31(I),EQ32(I)

,EQ33(I),EQ34(I),EQ35(I),EQ36(I),EQ37(M),EQ38(M),EQ39(M),EQ40(M),EQ40,EQ41(I),EQ42(I),EQ43(I),EQ44(I),EQ45(I),EQ46(I),EQ47(I)

,EQ47(I),EQ48(I),EQ49(I),EQ50(I),EQ51(I),EQ52(I),EQ53(I),EQ54(I),EQ55(I),EQ56(I),EQ57(I),EQ58(I),EQ59(I),EQ60(I),EQ61(I)

,EQ62(I),EQ63(I),EQ64(I),EQ65(I),EQ66(I),EQ67(I),EQ68(I),EQ69(I),EQ70(I),EQ71(I),EQ72(I),EQ73(I),EQ74(I),EQ75(I),EQ76(I),EQ77(M)

,EQ78(M),EQ79(M),EQ80(M),EQ81(M),EQ82(M),EQ83(M),EQ84(M),EQ85,EQ86,objective;



EQ1…C1 =E= 0.1142 - (0.0893*X1);

EQ2…C2 =E= 0.1935 - (0.1702*X1);

EQ3…C3 =E= 0.2595 - (0.1687*X1);

EQ4…C4 =E= 0.6198 - (0.2409X1) - (0.2942X2);

EQ5…C5 =E= 0.9472 - (0.3062X1) - (0.5618X2);

EQ6…C6 =E= 1.2433 - (0.3651X1) - (0.8042X2);

EQ7…C7 =E= 1.3230 - (0.3628X1) - (0.7992X2);

EQ8…C8 =E= 1.8327 - (0.4149X1) - (1.0150X2) - (0.2524*X3);

EQ9…C9 =E= 2.2948 - (0.4620X1) - (1.2095X2) - (0.4828*X3);

EQ10…C10 =E= 2.7140 - (0.5041X1) - (1.3862X2) - (0.6923*X3);

EQ11…C11 =E= 3.0919 - (0.5418X1) - (1.5453X2) - (0.8821*X3);

EQ12…C12 =E= 3.1175 - (0.5361X1) - (1.5289X2) - (0.8734*X3);

EQ13…C13 =E= 3.6006 - (0.5691X1) - (1.6690X2) - (1.0412X3) - (0.1538X4);

EQ14…C14 =E= 4.0345 - (0.5980X1) - (1.7928X2) - (1.1937X3) - (0.2935X4);

EQ15…C15 =E= 4.4259 - (0.6238X1) - (1.9039X2) - (1.3309X3) - (0.4211X4);

EQ16…C16 =E= 4.7756 - (0.6462X1) - (2.0023X2) - (1.4538X3) - (0.5366X4);

EQ17…C17 =E= 5.0877 - (0.6656X1) - (2.0894X2) - (1.5635X3) - (0.6413X4);

EQ18…C18 =E= 5.3635 - (0.6823X1) - (2.1652X2) - (1.6611X3) - (0.7354X4);

EQ19(I)…LAMBDA =L= ((CH(I) - C1)/(CH(I) - CD(I))) ;

EQ20(I)…LAMBDA =L= ((CH(I) - C2)/(CH(I) - CD(I)));

EQ21(I)…LAMBDA =L= ((CH(I) - C3)/(CH(I) - CD(I)));

EQ22(I)…LAMBDA =L= ((CH(I) - C4)/(CH(I) - CD(I)));

EQ23(I)…LAMBDA =L= ((CH(I) - C5)/(CH(I) - CD(I)));

EQ24(I)…LAMBDA =L= ((CH(I) - C6)/(CH(I) - CD(I)));

EQ25(I)…LAMBDA =L= ((CH(I) - C7)/(CH(I) - CD(I)));

EQ26(I)…LAMBDA =L= ((CH(I) - C8)/(CH(I) - CD(I)));

EQ27(I)…LAMBDA =L= ((CH(I) - C9)/(CH(I) - CD(I)));

EQ28(I)…LAMBDA =L= ((CH(I) - C10)/(CH(I) - CD(I)));

EQ29(I)…LAMBDA =L= ((CH(I) - C11)/(CH(I) - CD(I)));

EQ30(I)…LAMBDA =L= ((CH(I) - C12)/(CH(I) - CD(I)));

EQ31(I)…LAMBDA =L= ((CH(I) - C13)/(CH(I) - CD(I)));

EQ32(I)…LAMBDA =L= ((CH(I) - C14)/(CH(I) - CD(I)));

EQ33(I)…LAMBDA =L= ((CH(I) - C15)/(CH(I) - CD(I)));

EQ34(I)…LAMBDA =L= ((CH(I) - C16)/(CH(I) - CD(I)));

EQ35(I)…LAMBDA =L= ((CH(I) - C17)/(CH(I) - CD(I)));

EQ36(I)…LAMBDA =L= ((CH(I) - C18)/(CH(I) - CD(I)));

EQ37(M)…LAMBDA =L= ((XM(M) - X1)/(XM(M) - XL(M)));

EQ38(M)…LAMBDA =L= ((XM(M) - X2)/(XM(M) - XL(M)));

EQ39(M)…LAMBDA =L= ((XM(M) - X3)/(XM(M) - XL(M)));

EQ40(M)…LAMBDA =L= ((XM(M) - X4)/(XM(M) - XL(M)));

EQ41(I)…C1 =G= CD(I);

EQ42(I)…C2 =G= CD(I);

EQ43(I)…C3 =G= CD(I);

EQ44(I)…C4 =G= CD(I);

EQ45(I)…C5 =G= CD(I);

EQ46(I)…C6 =G= CD(I);

EQ47(I)…C7 =G= CD(I);

EQ48(I)…C8 =G= CD(I);

EQ49(I)…C9 =G= CD(I);

EQ50(I)…C10 =G= CD(I);

EQ51(I)…C11 =G= CD(I);

EQ52(I)…C12 =G= CD(I);

EQ53(I)…C13 =G= CD(I);

EQ54(I)…C14 =G= CD(I);

EQ55(I)…C15 =G= CD(I);

EQ56(I)…C16 =G= CD(I);

EQ57(I)…C17 =G= CD(I);

EQ58(I)…C18 =G= CD(I);

EQ59(I)…C1 =L= CH(I);

EQ60(I)…C2 =L= CH(I);

EQ61(I)…C3 =L= CH(I);

EQ62(I)…C4 =L= CH(I);

EQ63(I)…C5 =L= CH(I);

EQ64(I)…C6 =L= CH(I);

EQ65(I)…C7 =L= CH(I);

EQ66(I)…C8 =L= CH(I);

EQ67(I)…C9 =L= CH(I);

EQ68(I)…C10 =L= CH(I);

EQ69(I)…C11 =L= CH(I);

EQ70(I)…C12 =L= CH(I);

EQ71(I)…C13 =L= CH(I);

EQ72(I)…C14 =L= CH(I);

EQ73(I)…C15 =L= CH(I);

EQ74(I)…C16 =L= CH(I);

EQ75(I)…C17 =L= CH(I);

EQ76(I)…C18 =L= CH(I);

EQ77(M)…X1 =G= XL(M);

EQ78(M)…X2 =G= XL(M);

EQ79(M)…X3 =G= XL(M);

EQ80(M)…X4 =G= XL(M);

EQ81(M)…X1 =L= XM(M);

EQ82(M)…X2 =L= XM(M);

EQ83(M)…X3 =L= XM(M);

EQ84(M)…X4 =L= XM(M);

EQ85…LAMBDA =G= 0;

EQ86…LAMBDA =G= 1;

objective…obj =E= LAMBDA;



MODEL EQ /ALL/



SOLVE Eq USING LP MINIMIZING obj;


\




Thanks,

Best Regards

Sohom Mandal
M.tech
Center for Enviornmental Science and Engineering

IIT Bombay, Powai, Mumbai
Pin 400076
Mobile: 9930065368
sohomiitb@gmail.com
sohomiitb@iitb.ac.in


\

gamsmodel.lst (159 KB)

Reply-to: gamsworld@googlegroups.com


Hi,
I am using demo version of GAMS so I can’t find the full solution of my problem.I checked my problem many times, there is no error.Would you please run the program in your GAMS and give me the solution file.It would be great help.

Thanks
Sanjay Paul


Here is my coding:


sets
h high failure station/17/
d medium failure station/8
24/
l low failure station/2541/
m month/1
12/;
variables
z number of preventive maintenance
x(h,m) high failure rate
y(d,m) medium failure rate
w(l,m) low failure rate;
binary variables x(h,m),y(d,m),w(l,m);
equations
n_pm objective function
eq1 constraint1
eq2 constraint2
eq3 constraint3
eq4 constraint4
eq5 constraint5
eq6 constraint6
eq7 constraint7;
n_pm…z=e=.6sum((h,m),x(h,m))+.3sum((d,m),y(d,m))+.1*sum((l,m),w(l,m));
eq1(h)…sum(m,x(h,m))=g=2;
eq2(d)…sum(m,y(d,m))=g=2;
eq3(l)…sum(m,w(l,m))=g=2;
eq4(h)…sum(m,x(h,m))=l=4;
eq5(d)…sum(m,y(d,m))=l=4;
eq6(l)…sum(m,w(l,m))=l=4;
eq7(m)…sum(h,x(h,m))+sum(d,y(d,m))+sum(l,w(l,m))=l=3;
model problem/all/;
solve problem using mip maximizing z;


problem.docx (13.7 KB)

Reply-to: gamsworld@googlegroups.com

Hi,

as mentioned above, your model is infeasible. However, I have chnaged constraint 7 from l to g like this:

eq7(m)…sum(h,x(h,m))+sum(d,y(d,m))+sum(l,w(l,m))=g=3;

I don’t know if this is correct but this seems to be the constraint that causes infeasibility.

Hope that helps.

Kostas

Τη Σάββατο, 9 Μαΐου 2015 - 9:55:35 μ.μ. UTC+1, ο χρήστης alamin saddam έγραψε:


Hi,
I am using demo version of GAMS so I can’t find the full solution of my problem.I checked my problem many times, there is no error.Would you please run the program in your GAMS and give me the solution file.It would be great help.

Thanks
Sanjay Paul


Here is my coding:


sets
h high failure station/17/
d medium failure station/8
24/
l low failure station/2541/
m month/1
12/;
variables
z number of preventive maintenance
x(h,m) high failure rate
y(d,m) medium failure rate
w(l,m) low failure rate;
binary variables x(h,m),y(d,m),w(l,m);
equations
n_pm objective function
eq1 constraint1
eq2 constraint2
eq3 constraint3
eq4 constraint4
eq5 constraint5
eq6 constraint6
eq7 constraint7;
n_pm…z=e=.6sum((h,m),x(h,m))+.3sum((d,m),y(d,m))+.1*sum((l,m),w(l,m));
eq1(h)…sum(m,x(h,m))=g=2;
eq2(d)…sum(m,y(d,m))=g=2;
eq3(l)…sum(m,w(l,m))=g=2;
eq4(h)…sum(m,x(h,m))=l=4;
eq5(d)…sum(m,y(d,m))=l=4;
eq6(l)…sum(m,w(l,m))=l=4;
eq7(m)…sum(h,x(h,m))+sum(d,y(d,m))+sum(l,w(l,m))=l=3;
model problem/all/;
solve problem using mip maximizing z;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi
your model is infeasible, check what is constraining it,
cheers
R

2015-05-09 21:31 GMT+02:00 alamin saddam :


Hi,
I am using demo version of GAMS so I can’t find the full solution of my problem.I checked my problem many times, there is no error.Would you please run the program in your GAMS and give me the solution file.It would be great help.

Thanks
Sanjay Paul


Here is my coding:


sets
h high failure station/17/
d medium failure station/8
24/
l low failure station/2541/
m month/1
12/;
variables
z number of preventive maintenance
x(h,m) high failure rate
y(d,m) medium failure rate
w(l,m) low failure rate;
binary variables x(h,m),y(d,m),w(l,m);
equations
n_pm objective function
eq1 constraint1
eq2 constraint2
eq3 constraint3
eq4 constraint4
eq5 constraint5
eq6 constraint6
eq7 constraint7;
n_pm…z=e=.6sum((h,m),x(h,m))+.3sum((d,m),y(d,m))+.1*sum((l,m),w(l,m));
eq1(h)…sum(m,x(h,m))=g=2;
eq2(d)…sum(m,y(d,m))=g=2;
eq3(l)…sum(m,w(l,m))=g=2;
eq4(h)…sum(m,x(h,m))=l=4;
eq5(d)…sum(m,y(d,m))=l=4;
eq6(l)…sum(m,w(l,m))=l=4;
eq7(m)…sum(h,x(h,m))+sum(d,y(d,m))+sum(l,w(l,m))=l=3;
model problem/all/;
solve problem using mip maximizing z;


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.