Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VILLASdataprocessing
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACS
Public
VILLASframework
VILLASdataprocessing
Commits
80215f64
Commit
80215f64
authored
6 years ago
by
Steffen Vogel
Browse files
Options
Downloads
Patches
Plain Diff
refactor: file_name -> filename
parent
1a52cacf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
villas/dataprocessing/readtools.py
+9
-9
9 additions, 9 deletions
villas/dataprocessing/readtools.py
with
9 additions
and
9 deletions
villas/dataprocessing/readtools.py
+
9
−
9
View file @
80215f64
...
...
@@ -160,19 +160,19 @@ def read_timeseries_PLECS(filename, timeseries_names=None):
return
timeseries_list
def
read_timeseries_NEPLAN_loadflow
(
file
_
name
,
timeseries_names
=
None
,
is_regex
=
False
):
def
read_timeseries_NEPLAN_loadflow
(
filename
,
timeseries_names
=
None
,
is_regex
=
False
):
"""
Read in NEPLAN loadflow result from result file, the result is in angle notation, amplitude and angle are stored
separately
To keep consistent with the names of voltage in most cases, the name of voltage variables are changed into
'
.V*
'
instead of
'
.U*
'
as in the result file
:param file
_
name: name of the mat file for the loadflow result from neplan
:param filename: name of the mat file for the loadflow result from neplan
:param timeseries_names: column name to be read
:param is_regex: flag for using regular expression
:return: list of Timeseries objects
"""
str_tmp
=
open
(
file
_
name
,
"
r
"
)
# Read in files
str_tmp
=
open
(
filename
,
"
r
"
)
# Read in files
low
=
0
# flag for the start of a new data in str_cmp
high
=
0
# flag for the end of this new data in str_cmp
flag
=
True
# To judge if this is the first line of the file, which will be the names for the data type
...
...
@@ -210,9 +210,9 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names=None, is_regex=F
high
+=
1
"""
A typical line current in neplan has two parts from both end, but we doesn
'
t have to calculate them
with the assumption that the topology of the gird should be correct with which we can validate the
current by comparing the voltage of the nodes connected to the ends of the line
A typical line current in neplan has two parts from both end, but we doesn
'
t have to calculate them
with the assumption that the topology of the gird should be correct with which we can validate the
current by comparing the voltage of the nodes connected to the ends of the line
"""
if
flag
is
not
True
:
# flag is true when it's the first line
if
value
[
3
]
is
not
'
#
'
:
...
...
@@ -254,7 +254,7 @@ def read_timeseries_NEPLAN_loadflow(file_name, timeseries_names=None, is_regex=F
return
timeseries
def
read_timeseries_simulink_loadflow
(
file
_
name
,
timeseries_names
=
None
,
is_regex
=
False
):
def
read_timeseries_simulink_loadflow
(
filename
,
timeseries_names
=
None
,
is_regex
=
False
):
"""
Read in simulink load-flow result from result file(.rep), the result is in angle notation, amplitude and angle are stored
separately.
...
...
@@ -262,12 +262,12 @@ def read_timeseries_simulink_loadflow(file_name, timeseries_names=None, is_regex
.Arms/.IDegree for current/current angle,
.Vrms/.VDegree for voltage/voltage angle.
:param file
_
name:path of the .rep file for the loadflow result from simulink
:param filename:path of the .rep file for the loadflow result from simulink
:param timeseries_names: specific values to be read
:param is_regex: flag for using regular expression
:return: list of Timeseries objects
"""
str_tmp
=
open
(
file
_
name
,
'
r
'
,
encoding
=
'
latin-1
'
)
# Read in files, using latin-1 to decode /xb0
str_tmp
=
open
(
filename
,
'
r
'
,
encoding
=
'
latin-1
'
)
# Read in files, using latin-1 to decode /xb0
# Read in data from result file of neplan
name
=
[]
# list for data type names
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment