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
5ed303bb
Commit
5ed303bb
authored
6 years ago
by
Junjie Zhang
Browse files
Options
Downloads
Patches
Plain Diff
script for comparing dpsim and neplan on WSCC9bus power flow
parent
f7c1019a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+5
-1
5 additions, 1 deletion
.gitignore
.vscode/settings.json
+0
-3
0 additions, 3 deletions
.vscode/settings.json
examples/compareresults/compare_neplan_dpsim_WSCC9bus.py
+51
-0
51 additions, 0 deletions
examples/compareresults/compare_neplan_dpsim_WSCC9bus.py
with
56 additions
and
4 deletions
.gitignore
+
5
−
1
View file @
5ed303bb
...
...
@@ -36,4 +36,8 @@ __pycache__
# ignore jupyter notebook files
.ipynb_checkpoints
.eggs
\ No newline at end of file
.eggs
#IDEs
.vscode
.json
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.vscode/settings.json
deleted
100644 → 0
+
0
−
3
View file @
f7c1019a
{
"python.pythonPath"
:
"D:
\\
Anaconda3
\\
python.exe"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
examples/compareresults/compare_neplan_dpsim_WSCC9bus.py
0 → 100644
+
51
−
0
View file @
5ed303bb
from
villas.dataprocessing.readtools
import
*
from
villas.dataprocessing.timeseries
import
*
import
villas.dataprocessing.validationtools
as
validationtools
# reference rtf data directory
file
=
r
"
..\..\..\reference-results\Neplan\ReferenceGrids\WSCC-09_RX.rlf
"
# Read in NEPLAN data
print
(
'
************************ Test for read in all variable start ****************
'
)
ts_NEPLAN
=
read_timeseries_NEPLAN_loadflow
(
file
)
for
i
in
range
(
len
(
ts_NEPLAN
)):
print
(
'
%s is %s
'
%
(
ts_NEPLAN
[
i
].
name
,
ts_NEPLAN
[
i
].
values
))
# result as list of TimeSeries
print
(
'
************************ Test for read in all variable end ****************
'
)
print
(
'
\n
'
)
# Read in CIM powerflow data
path
=
'
..
\\
..
\\
..
\\
..
\\
dpsim_jzh_pfinteg
\\
dpsim
\\
build
\\
Dependencies
\\
fpotencia
\\
src
\\
test
\\
Logs
\\
'
logName
=
'
WSCC-09_Neplan
'
;
dataType
=
'
.csv
'
;
logFilename
=
path
+
logName
+
dataType
;
ts_dpsim
=
read_timeseries_csv
(
logFilename
)
for
ts
,
values
in
ts_dpsim
.
items
():
ts_abs
=
values
.
abs
(
ts
+
'
.Vpp
'
)
ts_phase
=
values
.
phase
(
ts
+
'
.Vangle
'
)
print
(
ts_abs
.
name
+
'
:
'
+
str
(
ts_abs
.
values
)
+
'
\n
'
+
ts_phase
.
name
+
'
:
'
+
str
(
ts_phase
.
values
))
# compare CIM-pf data with NEPLAN
net_name
=
'
WSCC-9bus
'
threshold
=
0.5
print
(
'
************************ convert neplan to modelica start ****************
'
)
res_ref
=
validationtools
.
convert_neplan_to_modelica_timeseries
(
ts_NEPLAN
)
for
i
in
range
(
len
(
res_ref
)):
print
(
res_ref
[
i
].
name
)
print
(
res_ref
[
i
].
values
)
print
(
'
************************ convert neplan to modelica end ****************
'
)
print
(
'
************************ convert dpsim to modelica start ****************
'
)
ts_dpsimList
=
validationtools
.
convert_dpsim_to_modelica_timeseries
(
ts_dpsim
)
for
i
in
range
(
len
(
ts_dpsimList
)):
print
(
ts_dpsimList
[
i
].
name
)
print
(
ts_dpsimList
[
i
].
values
)
print
(
'
************************ convert dpsim to modelica end ****************
'
)
res_err
=
validationtools
.
compare_timeseries
(
res_ref
,
ts_dpsimList
)
validationtools
.
assert_modelia_results
(
net_name
,
res_err
,
threshold
)
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