Hi,
I try to solve a production planing design problem (MIP) but I got an erro “Problem is integer infeasible”.
Could please help me. (When I remove capacity constraints, the model give me optimal solution. So, I think I need to change my capacity data. But I couldn’t solve it. This is a mock data to solve this problem, I need to get an optimal solution.)
Sets
p plants /p1, p2/
c components and parts /c1/
m module /m1/
a assembly plant /a1/
t(p) all production units at plant p /p1/
s(p) all subassembly units at plant p /p2/
;
Alias(p, o);
Parameters
cap(t) capacity for component production unit /p1 10000/
caps(s) capacity for module production of subassembly unit /p2 5000/
area(t) Area required by production unit /p1 100/
areas(s) Area required by subassembly unit /p2 300/
areap(p) Area available in plant /p1 500, p2 600/
ft(t) Fixed costs for operating production unit t /p1 5/
fs(s) Fixed costs for operating subassembly unit s /p2 10/
fp(p) Fixed costs for operating plant p /p1 15, p2 20/
;
Table uc(c,t) Capacity usage of component c produced on production unit
p1
c1 500
;
Table us(s,m) Capacity usage of module m produced on subassembly unit
m1
p2 500
;
Table d(m,a) Demand for module m at assembly plant a
a1
m1 100
;
Table lo(o,p) Logistics costs for shipping one component from plant p
p1 p2
p1 0 20
p2 20 0
;
Table lp(p,a) Logistics costs for shipping one module from plant p to assembly plant a
a1
p1 30
p2 10
;
Table vc(c,t) Variable costs for producing component c production unit t
p1
c1 10
;
Table vm(m,s) Variable costs for assembling module m on subassembly unit s
p2
m1 20
;
Table bom(c,m) Required amount of component c
m1
c1 50
;
Variable
x(c,t,s) Amount of component c produced on unit t shipped to unit s
y(m,s,a) Amount of module m produced on unit s shipped to assembly plant a
z objective function;
Binary Variable
zt(t) 1 if unit t operating
zs(s) 1 if unit s operating
zp(p) 1 if unit p operating;
Positive Variable x, y;
Equation
obj objective func
cons1(m,a) const1
cons2(p,c,m) cons2
cons3(t) cons3
cons4(s) cons4
cons5(p) cons5;
obj…z=e=sum((c,o,p,t,s), x(c,t,s)(lo(o,p)+vc(c,t)))+sum((m,p,a,s), y(m,s,a)(lp(p,a)+vm(m,s)))+sum(p, zp(p)*fp(p))+ sum(t, zt(t)*ft(t))+sum(s, zs(s)*fs(s));
cons1(m,a)…sum(s, y(m,s,a))=g= d(m,a);
cons2(p,c,m)…sum((t,s), x(c,t,s))=e=(bom(c,m)*sum((s,a), y(m,s,a)));
cons3(t)…sum((c,s), uc(c,t)*x(c,t,s))=l= zt(t)*cap(t);
cons4(s)…sum((m,a), us(s,m)*y(m,s,a))=l= zs(s)*caps(s);
cons5(p)…sum(t, zt(t)*area(t))+sum(s, zs(s)*areas(s))=l= zp(p)*areap(p);
Model trial /all/;
Solve trial using mip minimizing z;