Commit ad4d24e7 authored by Bichen Li's avatar Bichen Li

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

parent 48704105
......@@ -169,7 +169,7 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex
seq = []
value = []
i = 0
namelist = ['U', 'ANGLEU', 'P', 'Q', 'I', 'ANGLEI']
namelist = ['V', 'Vangel', 'P', 'Q', 'I', 'Iangle']
timeseries = []
isfloat = re.compile(r'^[-+]?[0-9]+\.[0-9]+$')
for line in str_tmp.readlines():
......@@ -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(
value[10], value[11] / 180 * cmath.pi)
(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 - 2].values += value[8]
if check_pass:
......@@ -234,4 +234,4 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names = None, is_regex
line_del.append(rule_check);
for num_to_del in range(len(line_del)):
del timeseries[line_del[len(line_del) - num_to_del - 1]]
return timeseries
return timeseries
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment