Professional Documents
Culture Documents
Mathematical Model
Mathematical Model
sik =¿ unit warehousing cost at warehouse i and unit transportation cost between warehouse i and customer
k,
r ji =¿ cost of moving and relocating unit capacity j to consolidated site i ( j ≠ i ) ,
d k =¿ demand of customer k ,
z ji =
{1 , if capacity of warehouse
¿
j ( j ∈ E ) is relocated site i ( i∈ A ,i ≠ j ) ,¿ ¿if existing warehouse j ( j∈ E ,i= j ) ,remains o
{
w i = 1, if a new warehouse isestablished at site i ( i ∈ N ) ,
0 , otherwise .
3.4. Mathematical formulation
Min ∑ ∑ v pi y pi + ∑
i∈ A
∑ sik x ik + ∑ ∑ r ji z ji + ∑ f ci ∑ c j z ji + ∑ f im zii + ∑ f mi wi - ∑ ¿ ¿.
p ∈ P i∈ A k∈C (i) j∈ E i∈ A i∈ A j ∈E i ∈E i ∈N j∈ A
(1)
Subject to
∑ y pi ≤ q p ∀ p ∈ P, (2)
i∈ A
∑ y pi=¿ ∑ x ik ¿ ∀ i∈ A , (3)
p∈P k ∈ C(i)
∑ xik ≤ ∑ c j x ji ∀ i∈ A , (4)
k ∈C (i) j∈C
∑ x ik =d k ∀ k ∈ K , (5)
i ∈D (k)
∑ z ij <|E|w i ∀ i∈ N , (7)
j∈E
∑ z ji ≤1 ∀ j ∈ E, (8)
i∈ A
x ik ≥ 0 ∀ i∈ A , k ∈ K , (9)
y pi ≥ 0 ∀ p ∈ P ,i ∈ A (10)
z ji , wi ∈( 0,1) ∀ j ∈ E , i∈ A (11)
(1): Objective function to minimizes total supply chain costs comprised of production, transportation,
warehousing, and relocation costs, while maximizing the cost savings resulting from the closure or
consolidation of redundant warehouses.
(2): The total volume of products shipped to warehouses do not exceed the capacity of a manufacturing
plant supplying such products.
(3): The total volume of products supplied by the manufacturing plant to each warehouse matches to the
total volume of products shipped from that warehouse to its customers.
(4): The total volume of products shipped to customers cannot exceed the throughput capacity (after
consolidation) of the warehouse serving them.
CPLEX Code
1.
int K = …. ; // customers
range p = 1..P;
range k = 1..K;
range i = 1..A;
// Parameters
// Variables
dvar float x[i][k];
// Objective Function
+ sum(j in E, i in A) r[j][i]*z[i][j]
+ sum(i in A, j in E) f[i][j]*c[j]*z[i][j]
+ sum(i in E) f[i][i]*z[i][i]
+ sum(i in N) f[i][i]*w[i]
// Constraints
subject to {
forall (p in P)
forall (i in A)
forall (i in A)
forall (k in 1..K)
forall (i in E)
forall (i in N)
forall (j in E)
sum(i in A) (z[j][i]) <= 1
2.
range K = 1...nk;
range E = 1...ne;
range N = ne + 1....ne+nn;
// Parameters
// Variables
// Objective function
+ sum(j in E, i in A) r[j][i]*z[i][j]
+ sum(i in A, j in E) f[i][j]*c[j]*z[i][j]
+ sum(i in E) f[i][i]*z[i][i]
+ sum(i in N) f[i][i]*w[i]
// Define constraints
subject to {
forall(p in P, i in A) {
forall(i in A) {
forall(i in A) {
forall(k in K) {
sum(i in D[k]) x[i][k] == d[k];
forall(i in E) {
forall(i in N) {
forall(j in E) {
forall(i in A, k in K) {
x[i][k] >= 0;
forall(p in P, i in A) {
y[p][i] >= 0;
forall(j in E, i in A) {
forall(i in N) {