summaryrefslogtreecommitdiff
path: root/Engineering_Economics/Chapter16.ipynb
blob: 25b1144918a157d95119b2e151c4354a06e62de6 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
{
 "metadata": {
  "name": "",
  "signature": "sha256:2e3de312e11632c16b5c14fdb6f5e083c4b44aeeb327466acbfc97c2f088ee01"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Linear Progrmming"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 16.1 Page 200"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "#result\n",
      "print\"The data of the problem are summarized below : \";\n",
      "print\"Machine                   Products           Limit on \";\n",
      "print\"                        P1         P2       machine hours\";\n",
      "print\"Lathe                    5         10            60\";\n",
      "print\"Milling                  4          4            40\";\n",
      "print\"Profit/unit              6          8\";\n",
      "print\"Let X1 be the production volume of the product.P1, and\";\n",
      "print\"X2 be the production volume of the product,P2.\";\n",
      "print\"The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \";\n",
      "print\"maximize Z = 6*X1 + 8*X2\";\n",
      "print\"subject to\";\n",
      "print\"5*X1+10*X2 <= 60\"\n",
      "print\"4*X1+4*X2 <= 40\"\n",
      "print\"X1,X2 >= 0\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The data of the problem are summarized below : \n",
        "Machine                   Products           Limit on \n",
        "                        P1         P2       machine hours\n",
        "Lathe                    5         10            60\n",
        "Milling                  4          4            40\n",
        "Profit/unit              6          8\n",
        "Let X1 be the production volume of the product.P1, and\n",
        "X2 be the production volume of the product,P2.\n",
        "The corresponding linear programming model to determine the production volume of each product such that the total profit is maximized is as shown below : \n",
        "maximize Z = 6*X1 + 8*X2\n",
        "subject to\n",
        "5*X1+10*X2 <= 60\n",
        "4*X1+4*X2 <= 40\n",
        "X1,X2 >= 0\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 16.2 Page 200"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "print\"Let X1 be the No. of packets of food type1 suggested for babies, and\";\n",
      "print\"X2 be the No. of packets of food type1 suggested for babies.\";\n",
      "print\"The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \";\n",
      "print\"maximize Z = 2*X1 + 3*X2\";\n",
      "print\"subject to\";\n",
      "print\"X1+X2 >= 6\"\n",
      "print\"7*X1+X2 >= 14\";\n",
      "print\"X1,X2 >= 0\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Let X1 be the No. of packets of food type1 suggested for babies, and\n",
        "X2 be the No. of packets of food type1 suggested for babies.\n",
        "The corresponding linear programming model to determine the No. of packets of each food type to be suggested for babies with the minimum cost such that the minimum daily required vitamin in each food type is satisfied is as shown below : \n",
        "maximize Z = 2*X1 + 3*X2\n",
        "subject to\n",
        "X1+X2 >= 6\n",
        "7*X1+X2 >= 14\n",
        "X1,X2 >= 0\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 16.3 Page201"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "%pylab inline\n",
      "import matplotlib.pyplot as plt\n",
      "print\"Given the following LP model :\"\n",
      "print\"maximize Z = 6*X1 + 8*X2\";\n",
      "print\"subject to\";\n",
      "print\"5*X1+10*X2 <= 60\";\n",
      "print\"4*X1+4*X2 <= 40\";\n",
      "print\"X1,X2 >= 0\";\n",
      "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n",
      "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n",
      "print\"5*X1+10*X2 <= 60\";\n",
      "print\"When X1=0 : X2=6\";\n",
      "print\"When X2=0 : X1=12\";\n",
      "plt.plot([0,12],[6,0],'r')\n",
      "plt.plot([10,0],[0,10])\n",
      "plt.title('Graphical Plot')\n",
      "plt.show()\n",
      "print \"Consider the 2nd constraint in the form : in blue \";\n",
      "print \"4*X1+4*X2 <= 40\";\n",
      "print \"When X1=0 : X2=10\";\n",
      "print \"When X2=0 : X1=10\";\n",
      "print \"The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\";\n",
      "ZA=6*0+8*0;\n",
      "ZB=6*10+8*0;\n",
      "ZC=6*8+8*2;\n",
      "ZD=6*0+8*6;\n",
      "print \"Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \";\n",
      "print \"X1 = 8  X2 = 2 and Z(Optimum) is\",ZC;"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Populating the interactive namespace from numpy and matplotlib\n",
        "Given the following LP model :\n",
        "maximize Z = 6*X1 + 8*X2\n",
        "subject to\n",
        "5*X1+10*X2 <= 60\n",
        "4*X1+4*X2 <= 40\n",
        "X1,X2 >= 0\n",
        "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n",
        "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n",
        "5*X1+10*X2 <= 60\n",
        "When X1=0 : X2=6\n",
        "When X2=0 : X1=12\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAXEAAAEKCAYAAADkYmWmAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGzlJREFUeJzt3Xtw1PW5x/HPImCRSAgISXMbSiAl4ZbYCJUOkMq1TIlc\nFZBCCeBR9FTQ4TRlqglSIRGl2qnSc4jhIhboZQoUkKlg12IRQYNAUaRQUgKBdCgkIQYSCXv+SAkG\nNrfNb/d32fdrJjPmsrvfdfTh4Z29uDwej0cAAFtqZfYBAAC+Y4gDgI0xxAHAxhjiAGBjDHEAsDGG\nOADYGEMcjpCVlaUf/OAH9X6/T58++stf/uLX26hPQUGBWrVqpevXr7fo9gFvGOLwi40bN2rgwIEK\nCQlReHi4vv3tb2vlypV+uz2Xy9Xg9//2t79pyJAhfrsNt9utVq1a6e6771aHDh3Uq1cvrVmzptm3\n4esfFAheDHEY7uWXX9b8+fP14x//WMXFxSouLtavfvUr/fWvf1VVVZXXy7R0Sw3Ec9Yau42oqChd\nvnxZZWVlysnJ0dy5c3Xs2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XGepUuX+uMmTLNn\nzx6Py+Xy9O/f35OUlORJSkryvP3222Yfy3But9szduxYs49huE8++cSTkpLi6devn2f8+PGekpIS\ns49kqJycHE9iYqKnT58+nhkzZniqqqrMPlKLTJkyxfP1r3/d06ZNG090dLQnLy/P8+9//9szbNgw\nT8+ePT0jRozwXLp0yexj+uzW+/fGG294evTo4YmNja2dL48//niD18GTfQDAxpz3EAQACCIMcQCw\nMYY4ANgYQxwAbIwhDgA2xhAHABtjiAOAjTHEAcDG/h92IUTgGfYhtAAAAABJRU5ErkJggg==\n",
       "text": [
        "<matplotlib.figure.Figure at 0x51094e0>"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Consider the 2nd constraint in the form : in blue \n",
        "4*X1+4*X2 <= 40\n",
        "When X1=0 : X2=10\n",
        "When X2=0 : X1=10\n",
        "The closed polygon is the feasible region at each of the corner points of the closed polygon is computed as follows by substituting its coordinates in the objective function :\n",
        "Since the type of the objective function is maximization, the solution corresponding to the maximum Z value should be selected as the optimum solution. The Z value is maximum for the corner point C. Hence, the corresponding solution is \n",
        "X1 = 8  X2 = 2 and Z(Optimum) is 64\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 16.4 Page 203"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initiation of variable\n",
      "%pylab inline\n",
      "import matplotlib.pyplot as plt\n",
      "print\"Given the following LP model :\"\n",
      "print \"minimize Z = 2*X1 + 3*X2\";\n",
      "print\"subject to\";\n",
      "print\"X1+X2 >= 6\";\n",
      "print\"7*X1+X2 >= 14\";\n",
      "print\"X1,X2 >= 0\";\n",
      "print\"The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\";\n",
      "print\"Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \";\n",
      "print\"X1+X2 = 6\";\n",
      "print\"When X1=0 : X2=6\";\n",
      "print\"When X2=0 : X1=6\";\n",
      "plt.plot([0,6],[6,0],'r')\n",
      "plt.plot([2,0],[0,14])\n",
      "plt.title('Graphical Plot')\n",
      "plt.show()\n",
      "print\"Consider the 2nd constraint in the form  (in blue):\";\n",
      "print\"7*X1+X2 = 14\";\n",
      "print\"When X1=0 : X2=14\";\n",
      "print\"When X2=0 : X1=2\";\n",
      "print\"The Optimum solution will be in any one of the corners A, B and C\";\n",
      "print\"The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\"\n",
      "ZA=2*0+3*14;\n",
      "ZB=2*(4.0/3)+3*(14.0/3);\n",
      "ZC=2*6+3*0;\n",
      "\n",
      "#result\n",
      "print\"Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \";\n",
      "print \"X1 = 6  X2 = 0 and Z(Optimum) =\",ZC"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Populating the interactive namespace from numpy and matplotlib\n",
        "Given the following LP model :\n",
        "minimize Z = 2*X1 + 3*X2\n",
        "subject to\n",
        "X1+X2 >= 6\n",
        "7*X1+X2 >= 14\n",
        "X1,X2 >= 0\n",
        "The introduction of non-negative constraints X1>=0 and X2>=0 will eliminate the 2nd, 3rd and 4th quadrants of XY plane.\n",
        "Compute the cordinates to plot equations relting to the constraints on the XY plane as shown below : \n",
        "X1+X2 = 6\n",
        "When X1=0 : X2=6\n",
        "When X2=0 : X1=6\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEKCAYAAAAyx7/DAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGwVJREFUeJzt3Xlw1PX9x/HXpoiAkRAQNs3VtAHKHaJRig6yyBVtgcgl\nl9AgcayjLdJhRKeWwwoE1JZSpTNQUaQF2vKrUMCMgXYDipQhIFKoxYOMiRydoAlHhEiyvz8iKyHZ\nZHfz/e7u97vPx8zOJHt8v59VfPPsd7/frcPj8XgEALCMmHAvAAAQGAY3AFgMgxsALIbBDQAWw+AG\nAIthcAOAxTC4YQsLFizQgw8+6PPxPn36aPfu3abuw5eSkhLFxMSotra2RfsHrmJwwxQbN27UgAED\nFBsbK6fTqR/84AdatWqVaftzOBxNPv7vf/9bd999t2n7cLvdiomJ0c0336z27durR48eevXVVwPe\nR7B/OSC6MLhhuBdeeEGzZ8/Wk08+qTNnzujMmTP6/e9/r3feeUfV1dWNvqalNRqK68ia20dSUpLO\nnz+vc+fOKT8/X3l5efrggw9MXxeiD4MbhqqsrNT8+fO1atUqjR07VjfddJMkqX///lq/fr1at24t\nSfrxj3+sn/zkJ7rvvvsUGxsrt9ut7du3KzMzU3FxcUpNTdXChQu92716uGH16tVKSkpSYmKiXnjh\nBe/jDodD1dXVmjFjhtq3b68+ffqouLjY+3haWpp27dolSaqpqdHixYvVtWtXtW/fXllZWfrss88k\nST/72c+UmpqquLg4ZWVl6e233w7qn8OYMWMUHx+vY8eONXjs5MmTGj16tDp16qRu3bppzZo1kqSC\nggItWbJEmzZt0s0336zMzMyg9g37Y3DDUO+++64uX76sMWPGNPvcDRs26JlnntGFCxd01113KTY2\nVuvXr1dlZaW2b9+uVatWacuWLfVe43a79dFHH+mtt95Sfn6+dxh7PB5t3bpVkydPVmVlpUaPHq3H\nHnvM+zqHw+E91PHiiy9q48aNevPNN3Xu3DmtXbtWbdu2lSTdcccdOnz4sL744gtNmTJFEyZM8Pm/\nEnypra3V3/72N1VUVKhv374NHp80aZJSU1N16tQp/fWvf9XTTz+tf/7zn8rOztbTTz+tSZMm6fz5\n8zp06FBA+0X0YHDDUOXl5brlllsUE/PNH60777xT8fHxateuXb2CzcnJ0cCBAyVJN954owYPHqze\nvXtLkvr27atJkyapqKio3vbnz5+vtm3bqk+fPsrNzdWGDRu8jw0aNEjZ2dlyOByaNm2a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8MGdlJSk\n0tJS7++lpaVKTk42ejcwyVdffaVx48Zp2rRpysnJCfdyTBMXF6cf/vCHOnDgQLiXYpi9e/dq69at\n+u53v6vJkyfrH//4h6ZPnx7uZRnq29/+tiSpc+fOuv/++7V///4wr8gYycnJSk5O1u233y5JGj9+\nvA4ePOjz+YYP7qysLH344YcqKSlRdXW1Nm3apNGjRxu9G5jA4/HooYceUq9evTR79uxwL8dw5eXl\nqqiokCR9+eWXKiwsVGZmZphXZZzFixertLRUJ06c0MaNG3XPPfdo3bp14V6WYaqqqnT+/HlJ0sWL\nF/XWW2/Z5uyuhIQEpaSk6Pjx45KknTt3qnfv3j6fH9QFOE2x+8U5kydPVlFRkc6ePauUlBQtWrRI\nubm54V6WId555x2tX7/ee7qVJC1ZskTZ2dlhXpkxTp06pRkzZqi2tla1tbV68MEHNXTo0HAvyzR2\nO2x55swZ3X///ZLqDi1MnTpVI0aMCPOqjLNy5UpNnTpV1dXVSk9P19q1a30+lwtwAMBi7PnRMwDY\nGIMbACyGwQ0AFsPgBgCLYXADgMUwuAHAYhjcAGAxDG4AsJj/B8cOct+Nyla5AAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x81f27b8>"
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Consider the 2nd constraint in the form  (in blue):\n",
        "7*X1+X2 = 14\n",
        "When X1=0 : X2=14\n",
        "When X2=0 : X1=2\n",
        "The Optimum solution will be in any one of the corners A, B and C\n",
        "The objective function value at each of these corner points of the feasible solution space is computed as fllows by substituting its coordinates in the objective function.\n",
        "Since the type of the objective function is minimization, the solution corresponding to the minimum Z value should be selected as the optimum solution. The Z value is minimum for the corner point C. Hence, the corresponding solution is \n",
        "X1 = 6  X2 = 0 and Z(Optimum) = 12\n"
       ]
      }
     ],
     "prompt_number": 15
    }
   ],
   "metadata": {}
  }
 ]
}