Hello dear all
I defined a problem in GAMS (the attached file) which I know it is not feasible. But I expect that GAMS executes the solve statement and reports the modelstat after executing the solve statement. If I change my data set, the program works properly, but within this data set, the solve statement is not executed at all and exits with exit code 3 and therefore the remaining lines of the program are not executed. How can I prevent the GAMS program to exit? Thank you very much in advance. This is the code:
sets
t /T1*T4/
i /i1*i2/
r /r1*r3/ ;
table p(t,i)
i1 i2
T1 1 0
T2 -1 0
T3 0 0
T4 0 0;
table q(t,r)
r1 r2 r3
T1 1.2 1 0
T2 -1 -1 -0.3
T3 -0.3 0.1 0
T4 0.5 -0.1 0;
variable obj2;
positive variable alpha(r) , pi(t);
equation
eq4(i)
eq5(r)
eq6 ;
eq4(i).. sum(t , pi(t)*p(t,i))=e=-1;
eq5(r).. sum(t , pi(t)*q(t,r))=e=-1+alpha(r);
eq6.. obj2=e=sum(r,alpha(r));
model model2 /eq4,eq5,eq6 /;
solve model2 using LP maximizing obj2;
file str /"D:\cinsistency.xls"/ ;
PUT str;
put model2.modelstat;