Hello GAMS family,
I would like to include the conditional statement x(i,j) = 1, if pr(i,j) <= (data(i, “pr-thold”)), otherwise x(i,j) = 0. where x(i,j) and pr(i,j) are variables. I have tried to write this out with the dollar operator but it keeps giving me an error message requesting for a suffix. I feel a mathematical format will be better. Does any one have a clue?
In addition to this problem, when I run my model, I keep having this results:
S O L V E S U M M A R Y
MODEL production OBJECTIVE cost
TYPE MINLP DIRECTION MINIMIZE
SOLVER LINDOGLOBAL FROM LINE 97
**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 19 Infeasible - No Solution
**** OBJECTIVE VALUE 452589.3000
RESOURCE USAGE, LIMIT 0.422 1000.000
ITERATION COUNT, LIMIT 0 2000000000
EVALUATION ERRORS NA 0
LINDO 24.4.2 r51415 Released Mar 15, 2015 WEI x86 64bit/MS Windows
LINDO Driver
Lindo Systems Inc, www.lindo.com
Lindo API version 9.0.1983.157 built on Jan 1 2015 23:18:07
— Saw MIN/MAX operator. Note: This will be linearized by Lindo using BIGM.
— It might be necessary to increase the value of MIP_LBIGM to avoid infeasibil
ity.
No solution returned
EXECUTION TIME = 0.016 SECONDS 2 MB 24.4.2 r51415 WEX-WEI
I have tried to put in larger values for MIP_LBGIM as suggested by GAMS but I am still receiving the very same message. Please how can I fix this?
Below is my GAMS model please HELP!!!
sets i machine identitiy /m1, m2, m3, m4, m5/
d(i) last machine identity /m5/
n buffer identity /b1, b2, b3, b4/
j production intervals /1*40/
e(j) peak production intervals /7,8,15,16,23,24,31,32,39,40/
o(j) off-peak production intervals /1,2,3,4,5,6,9,10,11,12,13,14,17,18,19,20,21,22,26,27,28,29,30,33,34,35,36,37,38/;
Table data(i,*)
wi pr-thold ini-pr pwr mat-cost mat-use
-
(hr) (prts/hr) (prts/hr) (kW) (USD) (prts)
m1 0.1 121 132 14 5.50 4
m2 0.15 109 122 24 4.35 5
m3 0.116 116 127 14 6.75 4
m4 0.1167 109 123 15 9.25 1
m5 0.0833 115 124 25 3.20 3
Table buf(n,*)
ini-bcont max-bcap
-
(units) (units)
b1 32 142
b2 30 132
b3 40 137
b4 30 133
Scalar k degradation percentage per interval /0.01/
ch holding cost per unit per hour () /0.05/
cm maintenace cost per machine() /14.20/
ofp off-peak consumption charge ( per kWh) /0.02/
onp1 peak consumption charge ( per kWh) /0.23/
onp2 peak demand charge ($ per kW) /13.34/
pt production target /3820/
pl production interval duration (hrs) /1.0/;
Binary Variables x(i,j) production threshold status of machine i at j interval
z(i,j) machine i on-off status at j intervals
p(i,j) preventive maintenance decision of machine i at j interval
c
r;
Integer variables pr(i,j) Production rate of a machine i different at j interval
a(i,j) cumulative production interval of machine i after maintenance at j interval
b(n,j) inventory level of buffer n at interval j;
Positive variables kc(i,j) cumulative production rate degradation percentage of machine i at interval j
s(i) production loss;
Variable cost total cost of production;
Equations target(d) production count of machine d
maintr maintenance relationship with production threshold
stam machine on-off status relationship with maintenance
tcost cost of production
kkc(i,j) cumulative degradation percentage
ppr(i,j) production rate
bb(n,j) buffer inventory
aa(i,j) conditional statement for a(ij)
pmc conditional equation for a(ij)
ss(i,j) conditional statement for production loss
rsi conditional equation for s(i);
rsi… 0 =e= sum{(i,j), z(i,j-1)*r};
ss(i,j)… s(i) =e= [z(i,j-1)*z(i,j)] + [({1-(data(i,“wi”)/pl)}+(z(i,j-1)*z(i,j)))*r];
pmc… 0 =e= sum{(i,j), p(i,j)*c};
aa(i,j)… a(i,j) =e= {[a(i,j-1)+1]*z(i,j)} + [a(i,j-1)*z(i,j)p(i,j)] + {[a(i,j-1)+(p(i,j)z(i,j))]c};
kkc(i,j)… kc(i,j) =e= (a(i,j)-1)k;
ppr(i,j)… pr(i,j) =e= (data(i,“ini-pr”)(1-kc(i,j)))(1-p(i,j))z(i,j);
bb(n,j)… b(n,j) =e= b(n,j-1) + sum(i, plpr(i,j)(1-p(i,j))z(i,j) - plpr(i+1,j)(1-p(i+1,j))z(i+1,j));
target(d)… pt =l= sum(j, pr(d,j)pl);
maintr… 0 =e= sum{(i,j), p(i,j)(1-x(i,j))};
stam… 0 =e= sum{(i,j), z(i,j)p(i,j)};
tcost… cost =e= sum((i,j),cmp(i,j)) + (ch * sum((n,j), b(n,j)/80))+(sum((i,j),pr(i,j)pldata(i,“mat-use”)data(i,“mat-cost”)))+ ((ofp * sum((i,o), data(i,“pwr”)plz(i,o)(1-p(i,o))))+(onp1 * sum((i,e), data(i,“pwr”)plz(i,e)(1-p(i,e))))+(onp2 * smax(e, sum(i, data(i,“pwr”)z(i,e)(1-p(i,e))))));
model production /all/;
- bounds
b.up(n,j) = buf(n,“max-bcap”);
pr.up(i,j) = data(i,“ini-pr”);
b.lo(n,j) = 0;
pr.lo(i,j) = 0;
pr.lo(i,j)= data(i,“pr-thold”);
*initial values
b.l(n,j) = buf(n,“ini-bcont”);
pr.l(i,j) = data(i,“ini-pr”);
a.l(i,j) = 0;
r.l = 0;
c.l = 0;
solve production using minlp minimizing cost;
display z.l, p.l, z.m, p.m;
\
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.