Commit 05449812 authored by Bichen Li's avatar Bichen Li

2# deleted: venv/lib/python3.5/site-packages/pandas/tests/io/

- Delete some .py files which are not needed for the set up of Mod_CI.
- Change the absolute path to relative path to avoid some mistakes on server.
parent 511dd056
Pipeline #48317 failed with stage

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
import re
import os
import sys
from dataprocessing.Validationtools import *
from dataprocessing.readtools import *
print("Test Start")
# We need to extract all the result files from git now
assert_modelia_neplan_results("Slack_ZLoad") # Assert the result, model result path read from cmd line
print("Test End")
# Dataprocessing toolkit for RWTH ACS simulators
## Copyright
2017, Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
## License
This project is released under the terms of the [GPL version 3](
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <>.
For other licensing options please consult [Prof. Antonello Monti](
## Contact
[![EONERC ACS Logo](doc/eonerc_logo.png)](
- Markus Mirz <>
- Jan Dinkelbach <>
- Steffen Vogel <>
[Institute for Automation of Complex Power Systems (ACS)](
[EON Energy Research Center (EONERC)](
[RWTH University Aachen, Germany](
python /media/cafi/Project/HIWI/Git/data-processing/examples/Assert_Results/ $net_name
......@@ -3,15 +3,14 @@
import re
import os
import sys
from readtools import *
from dataprocessing.readtools import *
def compare_modelica_neplan(Net_Name): # compare the result file from NEPLAN and Modelica
# Read in original nepaln result file
file_Neplan = os.path.abspath("/home/cafi/Desktop/" + Net_Name + "/" + Net_Name + ".rlf")
file_Neplan = os.path.abspath(Net_Name + "/" + Net_Name + ".rlf")
# Read in original Modelica result file
file_Modelica = os.path.abspath("/home/cafi/Desktop/" + Net_Name + "/" + Net_Name + ".mat")
file_Modelica = os.path.abspath(Net_Name + "/" + Net_Name + ".mat")
result_neplan = read_timeseries_NEPLAN_loadflow(file_Neplan)
result_modelica = read_timeseries_Modelica(file_Modelica)
......@@ -53,7 +52,7 @@ def assert_modelia_neplan_results(net_name): # Assert the model using the funct
print("Test on %s Passed" % name)
if len(fail_list) is 0:
print("\033[1;36;40mModel Passed\033[0m")
print("\033[1;36;40mModel %s Passed\033[0m" % net_name)
for name in fail_list:
print("\033[1;31;40mTest on %s Failed\033[0m" % name)
from dataprocessing.readtools import *
from dataprocessing.timeseries import *
def get_node_voltage_phasors(dpsim_timeseries_list):
"""Calculate voltage phasors of all nodes
:param dpsim_timeseries_list: timeseries list retrieved from dpsim results
voltage_phasor_list = {}
for ts in dpsim_timeseries_list:
ts_abs = ts.abs( + '_abs')
ts_phase = ts.phase( + '_phase')
ts_phasor = {}
ts_phasor['abs'] = ts_abs
ts_phasor['phase'] = ts_phase
voltage_phasor_list[] = ts_phasor
return voltage_phasor_list
def get_node_emt_voltages(timeseries_list, freq):
"""Calculate voltage phasors of all nodes
:param timeseries_list: timeseries list retrieved from dpsim results
voltages_list = {}
for ts in timeseries_list:
ts_emt = ts.dynphasor_shift_to_emt(, freq)
voltages_list[] = ts_emt
return voltages_list
import matplotlib.pyplot as plt
import numpy as np
from .timeseries import *
def plot_timeseries(figure_id, timeseries, plt_linestyle='-', plt_linewidth=2, plt_color=None, plt_legend_loc='lower right'):
This function plots either a single timeseries or several timeseries in the figure defined by figure_id.
Several timeseries (handed over in a list) are plotted in several subplots.
In order to plot several timeseries in one plot, the function is to be called several times (hold is activated).
if not isinstance(timeseries, list):
if plt_color:
plt.plot(timeseries.time, timeseries.values, linestyle=plt_linestyle, label=timeseries.label, linewidth=plt_linewidth, color=plt_color)
plt.plot(timeseries.time, timeseries.values, linestyle=plt_linestyle, label=timeseries.label, linewidth=plt_linewidth)
plt.gca().autoscale(axis='x', tight=True)
for ts in timeseries:
plt.subplot(len(timeseries), 1, timeseries.index(ts) + 1)
if plt_color: