Professional Documents
Culture Documents
OR - Report 4
OR - Report 4
FACULTY OF MANAGEMENT
INDUSTRIAL ENGINEERING DEPARTMENT
PARAMETERS
İ = {1,…,7} (Districts A,B,C,D,E,F,G)
J = {1,…,10,Jd} (Operators)
K = {1,…,5} (Days, Monday to Friday)
DECISION VARIABLES
Sijk = # of service by an operator on which district and
which day
OBJECTIVE FUNCTION
CONSTRAINTS
Answer – 2
PARAMETERS
i = Product name/type {1,2}
j = Which factory produces it {1 = China, 2 = Korea}
k = What month is it produced {1 = November, 2 =
December}
m = Production method {1, 2}
n = If it’s shipped or not {1 = not shipped, 2 = shipped}
DECISION VARIABLES
Xijkmn = The amount of the product produced with each
types, their original factories, the month that they are
produced, their production method, and if they are shipped
or not)
OBJECTIVE FUNCTION
REVENUE FROM SELLING THE PRODUCTS
INVENTORY COST
PRODUCTION COST
Σ(X x (Cijm)) (i = {1, 2}, j = {1, 2}, k = {1, 2}, m = {1,2}, n = {1, 2})
ijkmn
COMBINED FUNCTION
CONSTRAINTS
POSITIVE CONSTRAINT
INVENTORY CONSTRAINT
Answer – 3
SETS
i product name/type
/1*2/
j factory
/1*2/
k month
/1*2/
m production method
/1*2/
n shipped or not
/1*2/;
PARAMETERS
demand(i,k) demand for each product in each month
/1.1 3600, 1.2 4500, 2.1 6300, 2.2 5400/
production_days(j,k) production days available in each month for each
factory
/1.1 20, 1.2 23, 2.1 20, 2.2 23/
inventory_capacity(i) inventory capacity for each product
/1 1000, 2 1000/
holding_cost(i) cost of holding inventory for each product
/1 3, 2 4/
net_sales_revenue(i) net sales revenue for each product sold within
the country
/1 83, 2 112/
shipping_cost(i) extra shipping cost for each product shipped to the
other factory
/1 9, 2 7/;
TABLE C(i,j,m)
1 2
1 62 59 61 65
2 78 85 89 86;
TABLE P(i,j,m,m)
1.1 2.1 1.2 2.2
1.1 100 140 130 110
2.1 120 150 160 130
1.2 100 140 130 110
2.2 120 150 160 130;
VARIABLES
X(i,j,k,m,n) amount of product produced with each type, factory,
month, production method, and if it's shipped or not
Z(j,i) amount of each type of product left in each factory's inventory
Profit total profit to be maximized;
POSITIVE VARIABLES
X, Z, Profit;
EQUATIONS
Production_Constraint(j,i,k) production cannot exceed production
days
Inventory_Constraint(i) inventory cannot exceed capacity
Demand_Constraint(i,k) demand must be met
Profit_Equation objective function to maximize profit;
Production_Constraint(j,i,k)..
sum(m, sum(n, X(i,j,k,m,n) * P(i,j,m,k)) ) <= production_days(j,k) *
Z(j,i);
Inventory_Constraint(i)..
sum(j, Z(j,i)) + sum(m, sum(n, X(i,j,1,m,n) )) + Z(i) =
inventory_capacity(i);
Demand_Constraint(i,k)..
sum(j, sum(m, sum(n, X(i,j,k,m,n) ))) >= demand(i,k);
Profit_Equation..
Profit = sum(j, sum(i, net_sales_revenue(i) * sum(k, sum(n, X(i,j,k,1,n)
+ X(i,j,k,2,n) ))))
- sum(j, sum(i, sum(k, sum(m, sum(n, X(i,j,k,m,n) * C(i,j,m)))) +
sum(i, Z(j,i) * holding_cost(i))))
- sum(i$(i=1)), sum(j$)
Answer – 4
Sets
H /1*8/
N /1*5/
M /1*3/
S(N+1..N+M)
V /1*4/;
Parameters
d(N, S)
q(N)
c(V)
D(V)
gamma(N, S);
Scalar
inf / 100000 /;
d(N, S) =
0, 20, 15, 30, 0, 20, 15, 30, 0, 20, 15, 30,
20, 0, 10, 25, 20, 0, 10, 25, 20, 0, 10, 25,
15, 10, 0, 35, 15, 10, 0, 35, 15, 10, 0, 35,
30, 25, 35, 0, 30, 25, 35, 0, 30, 25, 35, 0,
0, 20, 15, 30, 0, 20, 15, 30, 0, 20, 15, 30,
20, 0, 10, 25, 20, 0, 10, 25, 20, 0, 10, 25,
15, 10, 0, 35, 15, 10, 0, 35, 15, 10, 0, 35,
30, 25, 35, 0, 30, 25, 35, 0, 30, 25, 35, 0;
gamma(N, S) =
0, 50, 100, 0, 0, 50, 100,
0, 0, 50, 100, 0, 0, 50, 100,
0, 0, 0, 50, 0, 0, 0, 50,
0, 0, 0, 0, 0, 0, 0, 0,
0, 50, 100, 0, 0, 50, 100,
0, 0, 50, 100, 0, 0, 50, 100,
0, 0, 0, 50, 0, 0, 0, 50,
0, 0, 0, 0, 0, 0, 0, 0;
Binary Variable
x(H,H,V);
Binary Variable
y(N,S);
Positive Variable
Q(N,V);
Equations
obj
supply(k)
demand(i)
cap(i,j,k)
dist(i,j)
flow(i)
balance;
obj..
z =e= sum((i,j,k)$x(i,j,k)*d(i,j)*q(i)) +
sum((i,j)$gamma(i,j)*y(i,j)*q(i)*300);
supply(k)..
sum((i,j:H)$x(i,j,k)) - sum((j,i:H)$x(i,j,k)) = 0;
demand(i)..
sum((j,k)$x(i,j,k)) + q(i) = sum((j,k)$x(j,i,k));
cap(i,j,k)..
x(i,j,k) <= inf*sum(v$(c(v)=k));
dist(i,j)..
sum(k$(x(i,j,k)=1)) = 1;
flow(i)..
sum((j,k)$x(i,j,k)) = q(i) + sum((j,k)$x(j,i,k));
balance..
sum((i,k)$Q(i,k)) = sum((i,j,k)$x(i,j,k));
option optcr=0.01;
option optca=0.01;
option optcr=0.001;
option optca=0.001;