Integer Infeasible Soluiton

Problems with modeling
Post Reply
meloci01
User
User
Posts: 4
Joined: 3 years ago

Integer Infeasible Soluiton

Post by meloci01 »

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;
Last edited by meloci01 3 years ago, edited 1 time in total.
Fred
Posts: 372
Joined: 7 years ago

Re: Integer Infeasible Soluiton

Post by Fred »

Hi,

When posting code code, please use the code tags. The code tags are inserted if you click on the symbol with "<\>". Otherwise the formatting (e.g. of tables) gets destroyed when copy/pasting code.

For your model even the RMIP (the LP you get when neglecting integrality requirements for discrete variables) is infeasible.
There are different way to analyze infeasibilities. Just search the forum. One way is iis (see e.g. https://www.gams.com/latest/docs/S_CPLEX.html#CPLEXiis). If this is small (as in your case) this often helps. Cplex spits out the following iis (when solving as rmip):

Code: Select all

--- Time spent on conflict find: 0.016 seconds
--- Minimal conflict found.
--- A conflict is a set of equations and variables (i.e. a submodel) which is 
--- infeasible but becomes feasible if any one equation or variable bound is dropped.
--- A problem may contain several independent conflicts but only one will be found per run.

Number of equations in conflict: 3
lower: cons1(m1,a1) > 100
fixed: cons2(p1,c1,m1) = 0
upper: cons3(p1) < 0

Number of variables in conflict: 1
upper: cons2(p2,c1,m1) < 1

Model has been proven infeasible
Other methods are feasOpt or you providing a presumably feasible "solution" and then using the equation listing to spot the problem.

I hope this helps!

Fred
Post Reply