Hi!

Thank you for helping me.

I try to fix something and still get an infeasible result. Thus, I am wondering if the procedure I fixed it is correct.

```
set
t period /1*3/
i parts /i1,i2/;
parameter
MC capaciy/3000/
DC capaciy/3000/
AC capaciy/500/
RC capaciy/500/
a(i) number of part i in a product /i1 1, i2 4/
c(i) Defected rate of part i /i1 0.8, i2 0.8/
CR(t)'returned product shipped to CC at the beginning of period t'
CU(t) 'reused product shipped to DC at the beginning of period t'
CA(t) 'returned product shipped to A at the beginning of period t'
X(t) /1 500, 2 1000/
MF(t) /1 800, 2 1200/
DF(t) /1 700, 2 1000/
RQ /0/
MPC production cost /30/
DDC shipping cost /30/
MOC ordering cost /30/
MIC invenotry cost /20/
MIPC product inventory cost /20/
DIPC dc inventory cost /25/
;
Scalar
d /0.3/
b /0.2/
z1/1.65/
z2/1.65/
;
CR(t)=b*X(t);
CU(t+1)=d*CR(t);
CA(t+1)=(1-d)*CR(t);
positive variable
MO(i,t) 'part i purchased from external at the beginning of period t'
MP(t) 'product produced at mfg at the beginning of period t'
DD(t) 'DC demand at the beginning of period t'
MU(t) 'produce up to level at the beginning of period t'
DU(t) 'order up to level at the beginning of period t';
free variable
MIP(t) 'product inventory at mfg at the beginning of period t'
DI(t) 'product inventory at DC at the beginning of period t'
MI(i,t) 'part i inventory at mfg at the beginning of period t'
z;
equation
E_DU(t) 'order up to level at the beginning of period t'
E_DD2(t)
E_DI(t) 'product inventory at DC at the beginning of period t'
E_MU(t) 'produce up to level at the beginning of period t'
E_MP(t) 'product produced at mfg at the beginning of period t'
E_MIP(t) 'product inventory at mfg at the beginning of period t'
E_MI(i,t) 'part i inventory at mfg at the beginning of period t'
E_MO(i,t) 'part i purchased from external at the beginning of period t'
E_DD(t) 'demand for DC'
obj'objective function';
E_DU(t)..DU(t+1)=E=DF(t+1)+z2*(DF(t)-X(t));
E_DD2(t)..DD(t)=e=DU(t)-DI(t)-CU(t);
E_DI(t)..DI(t+1)=e=DI(t)+(DD(t))+CU(t)-X(t);
E_MU(t)..MU(t+1)=e=MF(t+1)+z1*(MF(t)-DD(t));
E_MP(t)..MP(t)=e=MU(t+1)-MIP(t);
E_MIP(t)..MIP(t+1)=e=MIP(t)+MP(t)-DD(t+1);
E_MI(i,t)..MI(i,t+1)=e=MI(i,t)+MO(i,t)+RQ-a(i)*MP(t+1);
E_MO(i,t)..MO(i,t+1)=e=a(i)* MP(t+1)- RQ-MI(i,t+1);
E_DD(t)..DD(t+1)=l=DC-CU(t);
MI.L("i1",t)=0;
MI.L("i2",t)=0;
MI.L("i1",t)=0;
MI.L("i2",t)=0;
MO.L("i1",t)=0;
MO.L("i2",t)=0;
DU.l(t)=0;
MU.l(t)=0;
MIP.l(t)=0;
DI.l(t)=0;
MP.up(t)=MC;
obj..z=e=MIC*SUM(I,SUM(T,MI(i,t)))+MPC*SUM(t,MP(t))+DDC*SUM(t,DD(T))+MOC*SUM(I,SUM(T,MO(i,t)))+MIPC*SUM(t,MIP(T))+DIPC*SUM(t,DI(T))
;
model LP/
all/;
Solve LP using LP minimizing z;
Display MF,MU.L,MI.L,MI.L,MP.L,MIP.L,MO.L,DD.L,DU.L,DI.L,DF,X,CR,CU,CA;
```

the result is **“Duplicate columns MO(i1.2) and MI(i1.2) make problem unbounded.”**

MO(1,2)=a(1)* MP(2)- RQ-MI(1,2);

MI(1,2)=MI(1,1)+MO(1,1)+RQ-a(1)*MP(2);

If I do not consider MO’s and MI’s common variable (MP and RQ), we can see MO1,2 depending on MI1,2, and MI1,2 depending on MI1,1 and MO1,1. If MO1,1 and MI1,1 increase a lot, MI1,2 will increase a lot, and then MO1,2 will decrease unlimitedly. However, I set up MO as positive variable.

As I set up MO as a variable without the equal constraint and also give other variables for the model.

```
set
t period /1*3/
i parts /i1,i2/;
parameter
MC capaciy/3000/
DC capaciy/3000/
AC capaciy/500/
RC capaciy/500/
a(i) number of part i in a product /i1 1, i2 4/
c(i) Defected rate of part i /i1 0.8, i2 0.8/
CR(t)'returned product shipped to CC at the beginning of period t'
CU(t) 'reused product shipped to DC at the beginning of period t'
CA(t) 'returned product shipped to A at the beginning of period t'
X(t) /1 500, 2 1000/
MF(t) /1 800, 2 1200/
DF(t) /1 700, 2 1000/
RQ /0/
MPC production cost /30/
DDC shipping cost /30/
MOC ordering cost /30/
MIC invenotry cost /20/
MIPC product inventory cost /20/
DIPC dc inventory cost /25/
;
Scalar
d /0.3/
b /0.2/
z1/1.65/
z2/1.65/
;
CR(t)=b*X(t);
CU(t+1)=d*CR(t);
CA(t+1)=(1-d)*CR(t);
positive variable
MO(i,t) 'part i purchased from external at the beginning of period t'
MP(t) 'product produced at mfg at the beginning of period t'
DD(t) 'DC demand at the beginning of period t'
MU(t) 'produce up to level at the beginning of period t'
DU(t) 'order up to level at the beginning of period t'
QMD(t) 'actual shipping product from mfg to dc'
QDC(t) 'actual shipping product from dc to customer'
;
free variable
MIP(t) 'product inventory at mfg at the beginning of period t'
DI(t) 'product inventory at DC at the beginning of period t'
MI(i,t) 'part i inventory at mfg at the beginning of period t'
z;
equation
E_DU(t) 'order up to level at the beginning of period t'
E_DD2(t)
E_DI(t) 'product inventory at DC at the beginning of period t'
C_QDC(t)
C_QDC2(t)
E_MU(t) 'produce up to level at the beginning of period t'
E_MP(t) 'product produced at mfg at the beginning of period t'
C_QMD(t)
C_QMD2(t)
E_MIP(t) 'product inventory at mfg at the beginning of period t'
E_MI(i,t) 'part i inventory at mfg at the beginning of period t'
E_MO(i,t)
E_DD(t) 'demand for DC'
obj'objective function';
E_DU(t)..DU(t+1)=E=DF(t+1)+z2*(DF(t)-X(t));
E_DD2(t)..DD(t)=e=DU(t)-DI(t)-CU(t);
E_DI(t)..DI(t+1)=e=DI(t)+(QMD(t))+CU(t)-QDC(t+1);
C_QDC(t)..QDC(t)=l=X(t+1);
C_QDC2(t)..QDC(t+1)=l=DI(t+1)+QMD(t)+CU(t);
E_MU(t)..MU(t+1)=e=MF(t+1)+z1*(MF(t)-DD(t));
E_MP(t)..MP(t)=e=MU(t+1)-MIP(t);
E_MIP(t)..MIP(t+1)=e=MIP(t)+MP(t)-QMD(t+1);
C_QMD(t)..QMD(t)=l=DD(t+1)-CU(t);
C_QMD2(t)..QMD(t+1)=l=MIP(t+1)+MP(t);
E_MI(i,t)..MI(i,t+1)=e=MI(i,t)+MO(i,t)+RQ-a(i)*MP(t+1);
E_MO(i,t)..MO(i,t+1)=e=a(i)* MP(t+1)- RQ-MI(i,t+1);
E_DD(t)..DD(t+1)=l=DC-CU(t);
MI.L("i1",t)=0;
MI.L("i2",t)=0;
MI.L("i1",t)=0;
MI.L("i2",t)=0;
MO.L("i1",t)=0;
MO.L("i2",t)=0;
DU.l(t)=0;
MU.l(t)=0;
MIP.l(t)=0;
DI.l(t)=0;
MP.up(t)=MC;
obj..z=e=MIC*SUM(I,SUM(T,MI(i,t)))+MPC*SUM(t,MP(t))+DDC*SUM(t,DD(T))+MOC*SUM(I,SUM(T,MO(i,t)))+MIPC*SUM(t,MIP(T))+DIPC*SUM(t,DI(T))
;
model LP/
all/;
Solve LP using LP minimizing z;
Display MF,MU.L,MI.L,MI.L,MP.L,MIP.L,MO.L,DD.L,DU.L,DI.L,DF,X,CR,CU,CA;
```

**the result is “Bound infeasibility column ‘QMD(2)’.”**

There is the equation including QMD2

QMD2<=DD3-CU2

QMD2 <=MIP2+MP1

QMD2 is positive variable

MIP(2) =MIP(1)+MP(1)-QMD(2);

I am thinking if the problem is QMD2 be calculated as negative variable instead of positive. Hence, I change the constraint as

C_QDC(t)…QDC(t+1)=e=min(X(t+2),DI(t+1)+QMD(t)+CU(t));

C_QMD(t)…QMD(t+1)=e=min(DD(t+2)-CU(t+1),MIP(t+1)+MP(t));

And using Discontinuous Nonlinear Program to solve it. But the error still exists and become complicated (expectedly using DNLP instead of LP)

I am wondering if I utilized a reasonable method to debug the problem. Also, I would like to use LP to solve my question.

Any suggestions can help for me and I appreciate your help so much!

Sincerely,

Sandy