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
fa007c9e
Commit
fa007c9e
authored
6 years ago
by
Steffen Vogel
Browse files
Options
Downloads
Patches
Plain Diff
fix formatting
parent
a085ca78
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
examples/readinresults/NEPLAN/read_NEPLAN_example.py
+64
-66
64 additions, 66 deletions
examples/readinresults/NEPLAN/read_NEPLAN_example.py
with
64 additions
and
66 deletions
examples/readinresults/NEPLAN/read_NEPLAN_example.py
+
64
−
66
View file @
fa007c9e
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import
re
from
dataprocessing.readtools
import
*
file
=
r
"
C:\Users\admin\Desktop\Load_read\Load_flow_WCSS.rlf
"
# Example 1: Read in all variable
print
(
'
************************ Test for read in all variable start ****************
'
)
result_ALL
=
read_timeseries_NEPLAN_loadflow
(
file
)
for
i
in
range
(
len
(
result_ALL
)):
print
(
'
%s is %s
'
%
(
result_ALL
[
i
].
name
,
result_ALL
[
i
].
values
))
# result as list of TimeSeries
print
(
'
************************ Test for read in all variable end ****************
'
)
print
(
'
\n
'
)
# Example 2: Read in specific variable
print
(
'
************************ Test for read in specific variable start ****************
'
)
print
(
'
************************ Read in specific Voltage ****************
'
)
result_U
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
FOUR.U
'
)
for
i
in
range
(
len
(
result_U
)):
print
(
'
%s is %s
'
%
(
result_U
[
i
].
name
,
result_U
[
i
].
values
))
print
(
'
************************ Read in specific Voltage Angel ****************
'
)
result_ANGELU
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
FOUR.ANGELU
'
)
for
i
in
range
(
len
(
result_ANGELU
)):
print
(
'
%s is %s
'
%
(
result_ANGELU
[
i
].
name
,
result_ANGELU
[
i
].
values
))
print
(
'
************************ Read in specific Current ****************
'
)
result_I
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
LINE89.I
'
)
for
i
in
range
(
len
(
result_I
)):
print
(
'
%s is %s
'
%
(
result_I
[
i
].
name
,
result_I
[
i
].
values
))
print
(
'
************************ Read in specific Current Angel ****************
'
)
result_ANGELI
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
LINE89.ANGELI
'
)
for
i
in
range
(
len
(
result_ANGELI
)):
print
(
'
%s is %s
'
%
(
result_ANGELI
[
i
].
name
,
result_ANGELI
[
i
].
values
))
print
(
'
************************ Test for read in specific variable end ****************
'
)
print
(
'
\n
'
)
# Example 3: Read in using regular expression
print
(
'
************************ Test for read in using Regular Expression start ****************
'
)
print
(
'
************************ Read in Current using Regular Expression ****************
'
)
result_I_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.I$
'
,
True
)
for
i
in
range
(
len
(
result_I_REG
)):
print
(
'
%s is %s
'
%
(
result_I_REG
[
i
].
name
,
result_I_REG
[
i
].
values
))
print
(
'
************************ Read in Current Angel using Regular Expression ****************
'
)
result_ANGERLI_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.ANGELI$
'
,
True
)
for
i
in
range
(
len
(
result_ANGERLI_REG
)):
print
(
'
%s is %s
'
%
(
result_ANGERLI_REG
[
i
].
name
,
result_ANGERLI_REG
[
i
].
values
))
print
(
'
************************ Read in Voltage using Regular Expression ****************
'
)
result_U_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.U$
'
,
True
)
for
i
in
range
(
len
(
result_U_REG
)):
print
(
'
%s is %s
'
%
(
result_U_REG
[
i
].
name
,
result_U_REG
[
i
].
values
))
print
(
'
************************ Read in Voltage Angel using Regular Expression ****************
'
)
result_ANGELU_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.ANGELU$
'
,
True
)
for
i
in
range
(
len
(
result_ANGELU_REG
)):
print
(
'
%s is %s
'
%
(
result_ANGELU_REG
[
i
].
name
,
result_ANGELU_REG
[
i
].
values
))
print
(
'
************************ Test for read in using Regular Expression end ****************
'
)
\ No newline at end of file
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import
re
from
dataprocessing.readtools
import
*
file
=
r
"
C:\Users\admin\Desktop\Load_read\Load_flow_WCSS.rlf
"
# Example 1: Read in all variable
print
(
'
************************ Test for read in all variable start ****************
'
)
result_ALL
=
read_timeseries_NEPLAN_loadflow
(
file
)
for
i
in
range
(
len
(
result_ALL
)):
print
(
'
%s is %s
'
%
(
result_ALL
[
i
].
name
,
result_ALL
[
i
].
values
))
# result as list of TimeSeries
print
(
'
************************ Test for read in all variable end ****************
'
)
print
(
'
\n
'
)
# Example 2: Read in specific variable
print
(
'
************************ Test for read in specific variable start ****************
'
)
print
(
'
************************ Read in specific Voltage ****************
'
)
result_U
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
FOUR.U
'
)
for
i
in
range
(
len
(
result_U
)):
print
(
'
%s is %s
'
%
(
result_U
[
i
].
name
,
result_U
[
i
].
values
))
print
(
'
************************ Read in specific Voltage Angel ****************
'
)
result_ANGELU
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
FOUR.ANGELU
'
)
for
i
in
range
(
len
(
result_ANGELU
)):
print
(
'
%s is %s
'
%
(
result_ANGELU
[
i
].
name
,
result_ANGELU
[
i
].
values
))
print
(
'
************************ Read in specific Current ****************
'
)
result_I
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
LINE89.I
'
)
for
i
in
range
(
len
(
result_I
)):
print
(
'
%s is %s
'
%
(
result_I
[
i
].
name
,
result_I
[
i
].
values
))
print
(
'
************************ Read in specific Current Angel ****************
'
)
result_ANGELI
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
LINE89.ANGELI
'
)
for
i
in
range
(
len
(
result_ANGELI
)):
print
(
'
%s is %s
'
%
(
result_ANGELI
[
i
].
name
,
result_ANGELI
[
i
].
values
))
print
(
'
************************ Test for read in specific variable end ****************
'
)
print
(
'
\n
'
)
# Example 3: Read in using regular expression
print
(
'
************************ Test for read in using Regular Expression start ****************
'
)
print
(
'
************************ Read in Current using Regular Expression ****************
'
)
result_I_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.I$
'
,
True
)
for
i
in
range
(
len
(
result_I_REG
)):
print
(
'
%s is %s
'
%
(
result_I_REG
[
i
].
name
,
result_I_REG
[
i
].
values
))
print
(
'
************************ Read in Current Angel using Regular Expression ****************
'
)
result_ANGERLI_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.ANGELI$
'
,
True
)
for
i
in
range
(
len
(
result_ANGERLI_REG
)):
print
(
'
%s is %s
'
%
(
result_ANGERLI_REG
[
i
].
name
,
result_ANGERLI_REG
[
i
].
values
))
print
(
'
************************ Read in Voltage using Regular Expression ****************
'
)
result_U_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.U$
'
,
True
)
for
i
in
range
(
len
(
result_U_REG
)):
print
(
'
%s is %s
'
%
(
result_U_REG
[
i
].
name
,
result_U_REG
[
i
].
values
))
print
(
'
************************ Read in Voltage Angel using Regular Expression ****************
'
)
result_ANGELU_REG
=
read_timeseries_NEPLAN_loadflow
(
file
,
'
^.*\.ANGELU$
'
,
True
)
for
i
in
range
(
len
(
result_ANGELU_REG
)):
print
(
'
%s is %s
'
%
(
result_ANGELU_REG
[
i
].
name
,
result_ANGELU_REG
[
i
].
values
))
print
(
'
************************ Test for read in using Regular Expression end ****************
'
)
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