Dear Friends,
I have a GAMS code, in which I have a constraint ( something like x>0) and x**y in the model. I do not know why GAMS does not satisfy the constraint and shows error.
The real code is
SCALARS r1 the manufacturer capacity utilization /0.9/
q deteriorating rate which is a fraction of the on-hand inventory /0.1/
Ip manufacturer opportunity cost per dollar per unit time /0.06/
M the manufacturer trade credit period offered by the supplier / 0.0821917808219178/
N the customer trade credit period offered by the manufacturer / 0.0410958904109589/
k constant in the manufacturer demand function representing his market scale /5000000/
e price elasticity of manufacturer demand rate which is alpha in the thesis /1.5/ ;
VARIABLES
z5 total net profit ;
POSITIVE VARIABLES
T1 production time with backorder at manufacturer’s side
T2 production time when positive stock builds up and the stock depletes due to the demand and deterioration at manufacturers side
v the unit price charged by the manufacturer to the customers ;
T1.lo = 0.01 ;
T2.lo = 0.01 ;
v.lo = 1 ;
T1.up = 2 ;
T2.up = 2 ;
Equations
Profit define objective function
Constraint1 condition1 for NP5
Constraint2 condition2 for NP5 ;
Profit … z5 =e= ((T1+T2+((1/q)(log((1-(1/r1))exp(-qT2)+(1/r1))))+N-M)**2) ;
Constraint1 … M =g= T1+T2+(1/q)(log((1-(1/r1))exp(-qT2)+(1/r1))) ;
Constraint2 … M =l= T1+T2+(1/q)*(log((1-(1/r1))exp(-qT2)+(1/r1)))+N ;
MODEL NetProfit /ALL/ ;
SOLVE NetProfit USING NLP MINIMIZING z5 ;
option decimals=8 ;
Display z5.l;
Display T1.l, T2.l, v.l;
However, when I change the lower bound of T2 from 0.01 to 0.03, it would be considered as the optimal value for T2 and does not give error anymore. But, it is not logical! And when I use multiplication instead of power, it finds zero as the answer while the lower bounds are greater.
I would highly appreciate it if you can help me solve this problem.
Best regards.
–
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/groups/opt_out.