2024年Python最全电力系统—转移因子法求潮流(Python实现)(1)

args1 = (3300,40,50,57.5,4225,43.75,46.25,48.75,2910,55.8,57,58.2)

args2 = (800, 0,200,0,200,0,100,0,100,0,100,0,100,0,50,0,50,0,50)

cons = con(args2)

x0 = np.random.uniform(10, 400, 9) # 初值

res = minimize(fun(args1), x0, method=‘SLSQP’, constraints=cons)

print(‘FGi-代价:’, res.fun)

print(res.success)

x=res.x

pI11 = x[0]

pI12 = x[1]

pI13 = x[2]

pI21 = x[3]

pI22 = x[4]

pI23 = x[5]

pI31 = x[6]

pI32 = x[7]

pI33 = x[8]

PG1 = 100 + pI11 + pI12 + pI13

PG2 = 100 + pI21 + pI22 + pI23

PG3 = 50 + pI31 + pI32 + pI33

PD=800

线路潮流

PL12 = 0 * PG1 - (2 / 3) * PG2 - (1 / 3) * (PG3 - PD)

PL13 = 0 * PG1 - 0.5 * (1 / 3) * PG2 - (1 / 3) * (PG3 - PD)

PL23 = 0 * PG1 + (1 / 3) * PG2 - (1 / 3) * (PG3 - PD)

原理注解

PL13 = 0.5 * ((0.01 + 0.01) * (PG3 - 800) + 0.01 * PG2) / (0.01 + 0.01 + 0.01)

PL12 = ((0.01 + 0.01) * PG2 + 0.01 * (PG3 - 800)) / (0.01 + 0.01 + 0.01)

PL23 = ((0.01 + 0.01) * (PG3 - 800) + 0.01 * PG1) / (0.01 + 0.01 + 0.01)

print(‘机组PG1=’, PG1)

print(‘机组PG2=’, PG2)

print(‘机组PG3=’, PG3)

print(‘线路PL13=’, np.abs(PL13))

print(‘线路PL12=’, np.abs(PL12))

print(“线路PL23=”, np.abs(PL23))

if name == “main”:

main()

<

  • 25
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值