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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 19 : Economic Load Dispatch"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 19.1, Page No 643"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"import numpy as np\n",
"#initialisation of variables\n",
"#dF1/dP1=.4*P1+40 per MWhr\n",
"#dF2/dP2=.5*P1+30 per MWhr\n",
"print(\"Two equations are :\")\n",
"print(\"%.1f P1 %.1f P2 = %.1f\\n\" %(.4,-.5,-10))\n",
"print(\"%.1f P1+ %.1fP2 = %.1f\\n\" %(1,1,180))\n",
"A=[[.4,1],[-.5,1]]\n",
"B=[-10,180]\n",
"P1=88.89\n",
"P2=91.11\n",
"\n",
"#Calculations\n",
"F1=.2*(P1)**2 +40*P1+120\n",
"F2=.25*(P2)**2+30*P2+150\n",
"Total=F1+F2\t\t\t#Total cost\n",
"print(\"(a)Cost of Generation=Rs %.2f /hr\\n\" %Total)\n",
"P1=90\n",
"P2=90\n",
"F1=.2*(P1)**2 +40*P1+120\n",
"F2=.25*(P2)**2+30*P2+150\n",
"Total2=F1+F2\t\t#Total cost\n",
"savings=Total2-Total\n",
"\n",
"#Results\n",
"print(\"(b)Savings=Rs %.2f /hr\\n\" %savings)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Two equations are :\n",
"0.4 P1 -0.5 P2 = -10.0\n",
"\n",
"1.0 P1+ 1.0P2 = 180.0\n",
"\n",
"(a)Cost of Generation=Rs 10214.44 /hr\n",
"\n",
"(b)Savings=Rs 0.56 /hr\n",
"\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 19.2, Page No 643"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"pf=10.0/8 #penalty factor\n",
"\n",
"#Calculations\n",
"cost=(.1*10+3)*pf\t\t#Cost of recieved power=dF1/dP1\n",
"\n",
"#Results\n",
"print(\"Penalty Factor = %.1f\" %pf)\n",
"print(\"Cost of recieved Power = Rs %.1f /MWhr\" %cost)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Penalty Factor = 1.2\n",
"Cost of recieved Power = Rs 5.0 /MWhr\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 19.4, Page No 645"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"print(\"two equations are :\")\n",
"print(\"%.3f P1 %.2f P2 = %.1f\" %(0.048,-.08,-2))\n",
"print(\"%.1f P1+ %.1fP2 = %.1f\" %(1,1,50))\n",
"\n",
"#Calculations\n",
"A=[[.048,-.08],[1,1]]\n",
"B=[-2,50]\n",
"P1=15.625\n",
"P2=34.38\n",
"F1=(.024*(P1)**2 +8*P1+80)*(10**6)\n",
"F2=(.04*(P2)**2+6*P2+120)*(10**6)\n",
"print(\"when load is 150MW , equations are: :\")\n",
"print(\"%.3f P1 %.2f P2 = %.1f\" %(.048,-.08,-2))\n",
"print(\"%.1f P1+ %.1fP2 = %.1f\" %(1,1,150))\n",
"A=[[.048,-.08],[1,1]]\n",
"B=[-2,150]\n",
"P1=78.125\n",
"P2=71.88\n",
"f1=(.024*(P1)**2 +8*P1+80)*(10**6)\n",
"f2=(.04*(P2)**2+6*P2+120)*(10**6)\n",
"Total=(F1+F2+f1+f2)*12*2/(10**6)\n",
"\n",
"#Results\n",
"print(\"Total cost=Rs. %.2f\" %(Total))\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"two equations are :\n",
"0.048 P1 -0.08 P2 = -2.0\n",
"1.0 P1+ 1.0P2 = 50.0\n",
"when load is 150MW , equations are: :\n",
"0.048 P1 -0.08 P2 = -2.0\n",
"1.0 P1+ 1.0P2 = 150.0\n",
"Total cost=Rs. 52652.46\n"
]
}
],
"prompt_number": 12
}
],
"metadata": {}
}
]
}
|