Supply chain cost model - supplier selection problem

18 views
Skip to first unread message

Mayur Pustode

unread,
Jan 19, 2018, 2:29:16 AM1/19/18
to AMPL Modeling Language
set Supl;
set Manu;

param FC_S {Supl};
param SC_SM {Supl,Manu};
param C_S {Supl};


param D {Manu};


var Q_SM {i in Supl,j in Manu} >=0;
var X {i in Supl} binary;


minimize Total_Cost: sum {i in Supl} (FC_S[i] * X[i]) + sum {i in Supl,j in Manu} (SC_SM[i,j]*Q_SM[i,j]);
                    
                     
                     
subject to capacity {i in Supl} : sum {j in Manu} Q_SM[i,j] <= C_S[i];

subject to demand {j in Manu} : sum {i in Supl} Q_SM[i,j] >= (D[j]);


subject to binary_1 {i in Supl}: sum {j in Manu} Q_SM[i,j] > (((X[i]-1)*999999999));

subject to binary_2 {i in Supl}: sum {j in Manu} Q_SM[i,j] <= ((X[i]*999999999));


Dear sir, please check this model. I am getting my variable x value zero which is binary. please tell me whats the problem with this.  

ptiwari

unread,
Jan 19, 2018, 6:35:25 PM1/19/18
to AMPL Modeling Language
You need to look into your constraints. The solver will set x to zero if it satisfies all constraints. So, you might be missing some constraints.

Thanks,
Paras 
Reply all
Reply to author
Forward
0 new messages