From d4094835dba5d067b40022bb88f2ac7700f11967 Mon Sep 17 00:00:00 2001 From: Hantao Cui Date: Sun, 10 Mar 2024 19:18:34 +0000 Subject: [PATCH] Allow steady state power flow to be solved when DPLine is off. --- andes/models/line/line.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/andes/models/line/line.py b/andes/models/line/line.py index b58f236e5..7862727b2 100644 --- a/andes/models/line/line.py +++ b/andes/models/line/line.py @@ -253,14 +253,16 @@ def __init__(self, system=None, config=None): self.idd = State(info='real current', tex_name='idd', v_str='1e-8', - e_str='u * ( -(x+1e-8)*iqq - (r+1e-8)*idd - v2*sin(a2) + v1*sin(a1) )', - t_const=self.Leq) + e_str='u * ( -(x+1e-8)*iqq - (r+1e-8)*idd - v2*sin(a2) + v1*sin(a1) ) + (1-u) * idd', + t_const=self.Leq, + ) self.iqq = State(info='real current', tex_name='iqq', v_str='1e-8', - e_str='u * (1*(x+1e-8)*idd - (r+1e-8)*iqq - v2*cos(a2) + v1*cos(a1) )', - t_const=self.Leq) + e_str='u * (1*(x+1e-8)*idd - (r+1e-8)*iqq - v2*cos(a2) + v1*cos(a1) ) + (1-u) * iqq', + t_const=self.Leq, + ) self.a1.e_str = 'u * (idd*v1*sin(a1) + iqq*v1*cos(a1))'