I'm trying to solve a close loop supply chain design problem . While trying to minimize the objective functions the solver shows no solution. I'm a beginner at CPLEX so I couldn't figure it out . Please give me your valuable suggestions how to get rid off that. In engine log it shows Dual infeasible due to empty column 'YD("i1")("f1") too. What's the meaning of that. Thanks in advance
My model ;
/*********************************************
* OPL 20.1.0.0 Model
* Author: user
* Creation Date: 7 Apr 2021 at 4:12:23 pm
*********************************************/
{string} Products=...;
{string} Factory=...;
{string} Warehouse=...;
{string} Customers=...;
{string}DC=...;
// Fixed Cost
float FixedCost_F[Factory] =...;
float FixedCost_W [Warehouse]=...;
float FixedCost_DC [DC]=...;
// Variable cost
float VA[Factory]=...;
float VB [Warehouse]=...;
float VC [Customers]=...;
float VD [DC]=...;
float VR [Factory]=...;
// Transportation cost
float TC_FW [Factory][Warehouse]=...;
float TC_WC [Warehouse][Customers]=...;
float TC_CD [Customers][DC]=...;
float TC_DF [DC][Factory]=...;
// capacity
float HA[Factory]=...;
float HB [Warehouse]=...;
float HD [DC]=...;
float HR [Factory]=...;
// Demand
float Demand[Customers]=...;
//variables
dvar boolean Open[Factory];
dvar boolean Start[Warehouse];
dvar boolean Prior[DC];
dvar float YA[Factory][Warehouse];
dvar float YB[Warehouse][Customers];
dvar float YC[Customers][DC];
dvar float YD[DC][Factory];
dexpr float FixedCost = sum(f in Factory)FixedCost_F[f]*Open[f] +
sum(w in Warehouse)FixedCost_W[w]*Start[w] +
sum(i in DC)FixedCost_DC[i]*Prior[i];
dexpr float VariableCost = sum(f in Factory)VA[f]*sum(w in Warehouse)YA[f][w]+
sum(w in Warehouse)VB[w]* sum(c in Customers)YB[w][c]+
sum(c in Customers)VC[c]*sum(i in DC)YC[c][i]+
sum(i in DC)VD[i]* sum(c in Customers)YC[c][i]+
sum(f in Factory)VR[f]*sum(i in DC)YD[i][f];
dexpr float TransportCost = sum(f in Factory, w in Warehouse)TC_FW[f][w]*YA[f][w]+
sum(w in Warehouse, c in Customers)TC_WC[w][c]*YB[w][c]+
sum(c in Customers,i in DC)TC_CD[c][i]*YC[c][i]+
sum(i in DC, f in Factory)TC_DF[i][f]*YD[i][f];
minimize FixedCost+ VariableCost+ TransportCost;
subject to {
forall(f in Factory){
sum(w in Warehouse)YA[f][w] <= HA[f]*Open[f];
}
forall(w in Warehouse){
sum(f in Factory) YA[f][w] <= HB[w]*Start[w] ;
}
forall(w in Warehouse){
sum(c in Customers) YB[w][c]<= sum(f in Factory)YA[f][w];
}
forall(c in Customers){
sum(w in Warehouse)YB[w][c] >= Demand[c];
}
forall(c in Customers){
sum(i in DC) YC[c][i] <= Demand[c];
}
forall (i in DC){
sum(c in Customers) YC[c][i] <= HD[i]*Prior[i];
}
}
My DAT file :
/*********************************************
* OPL 20.1.0.0 Data
* Author: user
* Creation Date: 7 Apr 2021 at 4:12:23 pm
*********************************************/
Products ={ New Disposed Dismantled};
Factory = {f1, f2};
Warehouse = {w1, w2, w3};
Customers = {c1,c2,c3,c4,c5};
DC = {i1, i2};
FixedCost_F = [10000, 5000];
FixedCost_W = [10000, 5000, 4000];
FixedCost_DC =[10000, 5000];
// Variable cost
VA = [61.27, 61.27];
VB = [4.25, 4.55, 4.98];
VC = [4.25, 4.55, 4.98, 4.93, 4.85];
VD = [3.90, 4.06];
VR = [59.45, 59.45];
// Transportation cost
TC_FW =[[1.24, 58.56, 62.30],[60.82,1.68,70.96]];
TC_WC =[[0, 74.40, 76.13, 25.96, 69.21],
[58.85, 0, 62.96, 45.16, 109.69],
[72.83, 76.44, 0 ,49.66, 94.35]];
//TC_CD = [[0, 75.61, 54.51, 12.30, 70.34],
//[73.55, 0,78.68. 73.55, 136.84]];
TC_CD = [[0, 73.55],
[75.61,0],
[54.51,78.68],
[12.30,73.55],
[70.34, 136.84]];
TC_DF = [[60.82, 1.68],
[76.16, 79.21]];
// Capacity
HA = [158, 2268];// f
HB = [1701, 1512, 0]; // w
HD = [812, 642];// i
HR = [ 972, 778];// f
Demand = [18, 0,0,15,0];
------------------------------
Md Ashikur Rahman
------------------------------
#DecisionOptimization