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
1ccf9738
Commit
1ccf9738
authored
6 years ago
by
Jan Dinkelbach
Browse files
Options
Downloads
Patches
Plain Diff
minor changes
parent
d2a3a596
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
dataprocessing/validationtools.py
+5
-6
5 additions, 6 deletions
dataprocessing/validationtools.py
with
5 additions
and
6 deletions
dataprocessing/
V
alidationtools.py
→
dataprocessing/
v
alidationtools.py
+
5
−
6
View file @
1ccf9738
...
...
@@ -3,7 +3,7 @@
import
os
from
dataprocessing.readtools
import
*
def
mapping
_mod
c
elica_
neplan
(
neplan_timeseries
):
def
convert_neplan_to
_modelica_
timeseries
(
neplan_timeseries
):
"""
Mapping the variable names between modelica and neplan
- Voltage: change *.U and *.ANGLEU to *.V and *.Vangle
...
...
@@ -58,19 +58,18 @@ def compare_modelica_neplan(modelica_res, neplan_res): # compare the result fil
file_Neplan
=
os
.
path
.
abspath
(
neplan_res
)
# Read in original Modelica result file
file_Modelica
=
os
.
path
.
abspath
(
modelica_res
)
result_neplan
=
mapping
_mod
c
elica_
neplan
(
read_timeseries_NEPLAN_loadflow
(
file_Neplan
))
result_neplan
=
convert_neplan_to
_modelica_
timeseries
(
read_timeseries_NEPLAN_loadflow
(
file_Neplan
))
result_modelica
=
read_timeseries_Modelica
(
file_Modelica
)
#
Unification of the variable names and units of the voltage and current
#
Transfer the angle unit to degree
for
i
in
range
(
len
(
result_neplan
)):
result_neplan
[
i
].
name
=
result_neplan
[
i
].
name
.
upper
()
if
'
ANGLE
'
in
result_neplan
[
i
].
name
:
result_neplan
[
i
].
values
=
result_neplan
[
i
].
values
/
cmath
.
pi
*
180
# transfer the angle unit to degree
# Unification of the units of the angle
result_neplan
[
i
].
values
=
result_neplan
[
i
].
values
/
cmath
.
pi
*
180
for
i
in
range
(
len
(
result_modelica
)):
result_modelica
[
i
].
name
=
result_modelica
[
i
].
name
.
upper
()
if
'
ANGLE
'
in
result_modelica
[
i
].
name
:
result_modelica
[
i
].
values
=
result_modelica
[
i
].
values
/
cmath
.
pi
*
180
# transfer the angle unit to degree
result_modelica
[
i
].
values
=
result_modelica
[
i
].
values
/
cmath
.
pi
*
180
timeseries_names
=
[]
# list for names of components
timeseries_error
=
[]
# list for error
...
...
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