# Chapter 46 Digital computer Aided Protection and Automation¶

## Example 46_1 pgno:1017¶

In [2]:
#for low loads
p11=20;
p21=30;
t11=.1*p11+20;
t21=.12*p21+16;
t24=22;
p24=(t24-16)/.12;
t14=t24;
#upper limit 125MW
p25=125;
t15=1.12*p25+16;
p15=(t15-20)/.1;
n=7;
t21=19.6;
t22=20;
t23=21;
t24=22;
t25=31;
t26=32;
t27=32.5;
p15=110;
p2i=125;
p16=120;
p17=125;
p1i=125;
t2i=20;
for j in range(0,4):
p1j=20;

for i in range(0,n):
p2i1=(-16)/.12;
if(21>=31):
p2i=125;

pti=p1i+p2i;
print"\n\t\t\t\t\t\t\t\t",t2i,p1i,p2i,pti

incremental cost(rs./MWhr)	loading of unit 1(MW) 	 loading of unit 2(MW)	total generating power(MW)

20 125 125 250


## Example 46_2 pgno:1019¶

In [3]:
p=180;
p2=(20-16+(180*.1))/(.1+.12);
p1=p-p2;
t=.1*p1+20;

loading of unit 1 P1=MW
incremental operating cost =Rs/MWhr 80.0 100.0 28.0


## Example 46_3 pgno:1020¶

In [4]:
import scipy
from scipy import integrate
p11=80;
p12=90;
p21=100;
p22=90;
def fun1(x):
y=.1*x+20
return y

def fun2(x):
y=.2*x+6
return y


economic loading for unit 1=Rs/hr