summaryrefslogtreecommitdiff
path: root/Engineering_Economics_by_R_Panneerselvam/Chapter12_1.ipynb
blob: 75f40350dbd6b9a3d6822e1945ec5754215b716a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
 "metadata": {
  "name": "EE-12"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Inventory Control"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.1 Page 160"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#initiation of variable\nfrom math import sqrt\nD=24000.0;#in units/year\nCo=150.0;#in Rs./order\nPprice=75.0;#Rs./unit\nCpupy=18.0;#in % of Pprice/unit\n\n#calculation\nCc=Pprice*Cpupy/100;#in Rs.\nEOQ=sqrt((2*Co*D)/Cc);#in units\nn=D/round(EOQ);#no. of orders/year\nT=round(EOQ)/D;# time between successive orders in year\nT=T*12;#in months\nT=T*30;#in Days\n\n#result\nprint \"Economic order quantity in units : \",round(EOQ);\nprint \"No. of orders/year : \",round(n,2);\nprint \"Time between successive orders in days : \",round(T);",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Economic order quantity in units :  730.0\nNo. of orders/year :  32.88\nTime between successive orders in days :  11.0\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.2 Page 162"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=24000.0;#in units/year\nCo=175.0;#in Rs./setup\nCc=15.0;#in Rs./unit/year\n\n#calclation\nEOQ=sqrt((2*Co*r)/(Cc*(1-r/k)));#in units\nQ=round(EOQ);#units\nt1=Q/k;#in year\nt1=t1*12*30;#in days\nt2=(Q/r)*(1-r/k);#in year\nt2=t2*12*30;#in days\n\n#result\nprint \"Economic order quantity in units : \",round(Q,3);\nprint \"Cycle time in days :\",round(t1+t2);\nprint \"No. of setups/year : \",round(r/Q,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Economic order quantity in units :  748.0\nCycle time in days : 22.0\nNo. of setups/year :  16.043\n"
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.3 Page 164"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#iniatiation of variable\nfrom math import sqrt\nD=30000.0;#in units/year\nCc=2.0;#in Rs./unit/year\nCo=100.0;#in Rs./orde\nCs=12.0;#in units/year\n\n#calculation\nEOQ=sqrt(2*Co*D*(Cs+Cc)/(Cc*Cs));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*D*Cs/(Cc*(Cs+Cc)));#in units\nt=Q/D;#in year\nt=t*365;#in days\nt1=Q1/D;#in year\nt1=t1*365;#in days\nt2=t-t1;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q-Q1);\nprint \"Cycle time in days: \",round(t);\nprint \"Inventory period(t1) in days : \",round(t1);\nprint \"Shortage period(t2) in days : \",round(t2);\nprint \"No. of Orders/year : \",round(D/Q,3);",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Ordering quantity in units :  1871.0\nMaximum Inventory in units :  1604.0\nMaximum shortage quantity in units :  267.0\nCycle time in days:  23.0\nInventory period(t1) in days :  20.0\nShortage period(t2) in days :  3.0\nNo. of Orders/year :  16.034\n"
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 12.4 Page 166"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#initiation of variable\nfrom math import sqrt\nr=12000.0;#in units/year\nk=2000.0*12;#in units/year\nCo=400.0;#in Rs./setup\nCc=0.20*12;#in Rs./year\nCs=15.0;#in Rs./unit/year\n\n#calculation\nEOQ=sqrt((2*Co*k*r*(Cc+Cs)/(Cc*(k-r)*Cs)));#in units\nQ=round(EOQ);#units\nQ1=sqrt(2*Co*Cc*r*(k-r)/(Cs*(Cc+Cs)*k));#in units\nQ2=(Q*(k-r)/k)-Q1;#in Units\nt=Q/r;#in year\nt=t*365.0;#in days\nt1=(Q2/r)*365.0;#in days\nt2=(Q2/(k-r))*365.0;#in days\nt3=(Q1/(k-r))*365.0;#in days\nt4=(Q1/r)*365.0;#in days\n\n#result\nprint \"Ordering quantity in units : \",round(Q,3);\nprint \"Maximum Inventory in units : \",round(Q1);\nprint \"Maximum shortage quantity in units : \",round(Q2);\nprint \"Cycle time in days: \",round(t);\nprint \"Period of shortage in days : \",round(t1);\nprint \"Period of production satisfying back order in days : \",round(t2);\nprint \"Period of production satisfying period requirement in days : \",round(t3);\nprint \"Period of consumption only in days : \",round(t4);\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Ordering quantity in units :  3046.0\nMaximum Inventory in units :  210.0\nMaximum shortage quantity in units :  1313.0\nCycle time in days:  93.0\nPeriod of shortage in days :  40.0\nPeriod of production satisfying back order in days :  40.0\nPeriod of production satisfying period requirement in days :  6.0\nPeriod of consumption only in days :  6.0\n"
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}