# Inventory Control¶

## Example 12.1 Page 160¶

In [3]:
#initiation of variable
from math import sqrt
D=24000.0;#in units/year
Co=150.0;#in Rs./order
Pprice=75.0;#Rs./unit
Cpupy=18.0;#in % of Pprice/unit

#calculation
Cc=Pprice*Cpupy/100;#in Rs.
EOQ=sqrt((2*Co*D)/Cc);#in units
n=D/round(EOQ);#no. of orders/year
T=round(EOQ)/D;# time between successive orders in year
T=T*12;#in months
T=T*30;#in Days

#result
print "Economic order quantity in units : ",round(EOQ);
print "No. of orders/year : ",round(n,2);
print "Time between successive orders in days : ",round(T);

Economic order quantity in units :  730.0
No. of orders/year :  32.88
Time between successive orders in days :  11.0


## Example 12.2 Page 162¶

In [5]:
#initiation of variable
from math import sqrt
r=12000.0;#in units/year
k=24000.0;#in units/year
Co=175.0;#in Rs./setup
Cc=15.0;#in Rs./unit/year

#calclation
EOQ=sqrt((2*Co*r)/(Cc*(1-r/k)));#in units
Q=round(EOQ);#units
t1=Q/k;#in year
t1=t1*12*30;#in days
t2=(Q/r)*(1-r/k);#in year
t2=t2*12*30;#in days

#result
print "Economic order quantity in units : ",round(Q,3);
print "Cycle time in days :",round(t1+t2);
print "No. of setups/year : ",round(r/Q,3)

Economic order quantity in units :  748.0
Cycle time in days : 22.0
No. of setups/year :  16.043


## Example 12.3 Page 164¶

In [6]:
#iniatiation of variable
from math import sqrt
D=30000.0;#in units/year
Cc=2.0;#in Rs./unit/year
Co=100.0;#in Rs./orde
Cs=12.0;#in units/year

#calculation
EOQ=sqrt(2*Co*D*(Cs+Cc)/(Cc*Cs));#in units
Q=round(EOQ);#units
Q1=sqrt(2*Co*D*Cs/(Cc*(Cs+Cc)));#in units
t=Q/D;#in year
t=t*365;#in days
t1=Q1/D;#in year
t1=t1*365;#in days
t2=t-t1;#in days

#result
print "Ordering quantity in units : ",round(Q,3);
print "Maximum Inventory in units : ",round(Q1);
print "Maximum shortage quantity in units : ",round(Q-Q1);
print "Cycle time in days: ",round(t);
print "Inventory period(t1) in days : ",round(t1);
print "Shortage period(t2) in days : ",round(t2);
print "No. of Orders/year : ",round(D/Q,3);

Ordering quantity in units :  1871.0
Maximum Inventory in units :  1604.0
Maximum shortage quantity in units :  267.0
Cycle time in days:  23.0
Inventory period(t1) in days :  20.0
Shortage period(t2) in days :  3.0
No. of Orders/year :  16.034


## Example 12.4 Page 166¶

In [8]:
#initiation of variable
from math import sqrt
r=12000.0;#in units/year
k=2000.0*12;#in units/year
Co=400.0;#in Rs./setup
Cc=0.20*12;#in Rs./year
Cs=15.0;#in Rs./unit/year

#calculation
EOQ=sqrt((2*Co*k*r*(Cc+Cs)/(Cc*(k-r)*Cs)));#in units
Q=round(EOQ);#units
Q1=sqrt(2*Co*Cc*r*(k-r)/(Cs*(Cc+Cs)*k));#in units
Q2=(Q*(k-r)/k)-Q1;#in Units
t=Q/r;#in year
t=t*365.0;#in days
t1=(Q2/r)*365.0;#in days
t2=(Q2/(k-r))*365.0;#in days
t3=(Q1/(k-r))*365.0;#in days
t4=(Q1/r)*365.0;#in days

#result
print "Ordering quantity in units : ",round(Q,3);
print "Maximum Inventory in units : ",round(Q1);
print "Maximum shortage quantity in units : ",round(Q2);
print "Cycle time in days: ",round(t);
print "Period of shortage in days : ",round(t1);
print "Period of production satisfying back order in days : ",round(t2);
print "Period of production satisfying period requirement in days : ",round(t3);
print "Period of consumption only in days : ",round(t4);

Ordering quantity in units :  3046.0
Maximum Inventory in units :  210.0
Maximum shortage quantity in units :  1313.0
Cycle time in days:  93.0
Period of shortage in days :  40.0
Period of production satisfying back order in days :  40.0
Period of production satisfying period requirement in days :  6.0
Period of consumption only in days :  6.0