Skip to content
Snippets Groups Projects
Commit ad4d24e7 authored by Bichen Li's avatar Bichen Li
Browse files

Change the name of variables to be consistent with the modelica readin function

parent 48704105
No related branches found
No related tags found
No related merge requests found
...@@ -169,7 +169,7 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex ...@@ -169,7 +169,7 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex
seq = [] seq = []
value = [] value = []
i = 0 i = 0
namelist = ['U', 'ANGLEU', 'P', 'Q', 'I', 'ANGLEI'] namelist = ['V', 'Vangel', 'P', 'Q', 'I', 'Iangle']
timeseries = [] timeseries = []
isfloat = re.compile(r'^[-+]?[0-9]+\.[0-9]+$') isfloat = re.compile(r'^[-+]?[0-9]+\.[0-9]+$')
for line in str_tmp.readlines(): for line in str_tmp.readlines():
...@@ -205,7 +205,7 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex ...@@ -205,7 +205,7 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex
timeseries[check + 1].values / 180 * cmath.pi) + cmath.rect( timeseries[check + 1].values / 180 * cmath.pi) + cmath.rect(
value[10], value[11] / 180 * cmath.pi) value[10], value[11] / 180 * cmath.pi)
(timeseries[check].values, timeseries[check + 1].values) = cmath.polar(result) (timeseries[check].values, timeseries[check + 1].values) = cmath.polar(result)
timeseries[check + 1].values = timeseries[check + 1].values / cmath.pi * 180 #timeseries[check + 1].values = timeseries[check + 1].values / cmath.pi * 180
timeseries[check - 1].values += value[9] timeseries[check - 1].values += value[9]
timeseries[check - 2].values += value[8] timeseries[check - 2].values += value[8]
if check_pass: if check_pass:
...@@ -234,4 +234,4 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex ...@@ -234,4 +234,4 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex
line_del.append(rule_check); line_del.append(rule_check);
for num_to_del in range(len(line_del)): for num_to_del in range(len(line_del)):
del timeseries[line_del[len(line_del) - num_to_del - 1]] del timeseries[line_del[len(line_del) - num_to_del - 1]]
return timeseries return timeseries
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment