Commit 48c9b67a authored by Jan Dinkelbach's avatar Jan Dinkelbach Committed by Markus Mirz
Browse files

Fix CI

parent 37a5aba0
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
# DP Simulation of topology with slack, line and PQ load # DP Simulation of topology with slack, line and PQ load
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
%%bash %%bash
TOP=${TOP:-$(git rev-parse --show-toplevel)} TOP=${TOP:-$(git rev-parse --show-toplevel)}
PATH=${TOP}/build/Examples/Cxx PATH=${TOP}/build/Examples/Cxx
EMT_Slack_PiLine_PQLoad_with_PF_Init EMT_Slack_PiLine_PQLoad_with_PF_Init
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
from villas.dataprocessing.readtools import * from villas.dataprocessing.readtools import *
from villas.dataprocessing.timeseries import * from villas.dataprocessing.timeseries import *
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import re import re
%matplotlib widget # %matplotlib widget
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## PF results ## PF results
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
modelName = 'EMT_Slack_PiLine_PQLoad_with_PF_Init_PF' modelName = 'EMT_Slack_PiLine_PQLoad_with_PF_Init_PF'
path = 'logs/' + modelName + '/' path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv' dpsim_result_file = path + modelName + '.csv'
ts_dpsim_pf = read_timeseries_csv(dpsim_result_file) ts_dpsim_pf = read_timeseries_csv(dpsim_result_file)
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## EMT results ## EMT results
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
modelName = 'EMT_Slack_PiLine_PQLoad_with_PF_Init_EMT' modelName = 'EMT_Slack_PiLine_PQLoad_with_PF_Init_EMT'
path = 'logs/' + modelName + '/' path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv' dpsim_result_file = path + modelName + '.csv'
PEAK1PH_TO_RMS3PH = np.sqrt(3.0/2.0) PEAK1PH_TO_RMS3PH = np.sqrt(3.0/2.0)
ts_dpsim = read_timeseries_csv(dpsim_result_file) ts_dpsim = read_timeseries_csv(dpsim_result_file)
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
plt.figure(figsize=(12,6)) plt.figure(figsize=(12,6))
for ts_name, ts_obj in ts_dpsim.items(): for ts_name, ts_obj in ts_dpsim.items():
if '_0' in ts_name: if '_0' in ts_name:
plt.plot(ts_obj.time, PEAK1PH_TO_RMS3PH*ts_obj.values, label=ts_name) plt.plot(ts_obj.time, PEAK1PH_TO_RMS3PH*ts_obj.values, label=ts_name)
for ts_name, ts_obj in ts_dpsim_pf.items(): for ts_name, ts_obj in ts_dpsim_pf.items():
plt.plot(ts_obj.time, ts_obj.abs().values, label=ts_name+'_pf', linestyle=':') plt.plot(ts_obj.time, ts_obj.abs().values, label=ts_name+'_pf', linestyle=':')
plt.legend() plt.legend()
plt.show() plt.show()
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
``` ```
......
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
# DP Simulation of topology with slack, line and PQ load # DP Simulation of topology with slack, line and PQ load
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
%%bash %%bash
TOP=${TOP:-$(git rev-parse --show-toplevel)} TOP=${TOP:-$(git rev-parse --show-toplevel)}
PATH=${TOP}/build/Examples/Cxx PATH=${TOP}/build/Examples/Cxx
EMT_Slack_PiLine_VSI_with_PF_Init EMT_Slack_PiLine_VSI_with_PF_Init
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
from villas.dataprocessing.readtools import * from villas.dataprocessing.readtools import *
from villas.dataprocessing.timeseries import * from villas.dataprocessing.timeseries import *
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import re import re
%matplotlib widget # %matplotlib widget
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## PF results ## PF results
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
modelName = 'EMT_Slack_PiLine_VSI_with_PF_Init_PF' modelName = 'EMT_Slack_PiLine_VSI_with_PF_Init_PF'
path = 'logs/' + modelName + '/' path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv' dpsim_result_file = path + modelName + '.csv'
ts_dpsim_pf = read_timeseries_csv(dpsim_result_file) ts_dpsim_pf = read_timeseries_csv(dpsim_result_file)
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## EMT results ## EMT results
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
modelName = 'EMT_Slack_PiLine_VSI_with_PF_Init_EMT' modelName = 'EMT_Slack_PiLine_VSI_with_PF_Init_EMT'
path = 'logs/' + modelName + '/' path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv' dpsim_result_file = path + modelName + '.csv'
PEAK1PH_TO_RMS3PH = np.sqrt(3.0/2.0) PEAK1PH_TO_RMS3PH = np.sqrt(3.0/2.0)
ts_dpsim = read_timeseries_csv(dpsim_result_file) ts_dpsim = read_timeseries_csv(dpsim_result_file)
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
plt.figure(figsize=(12,6)) plt.figure(figsize=(12,6))
for ts_name, ts_obj in ts_dpsim.items(): for ts_name, ts_obj in ts_dpsim.items():
if '_0' in ts_name: if '_0' in ts_name:
plt.plot(ts_obj.time, PEAK1PH_TO_RMS3PH*ts_obj.values, label=ts_name) plt.plot(ts_obj.time, PEAK1PH_TO_RMS3PH*ts_obj.values, label=ts_name)
for ts_name, ts_obj in ts_dpsim_pf.items(): for ts_name, ts_obj in ts_dpsim_pf.items():
plt.plot(ts_obj.time, ts_obj.abs().values, label=ts_name+'_pf', linestyle=':') plt.plot(ts_obj.time, ts_obj.abs().values, label=ts_name+'_pf', linestyle=':')
plt.legend() plt.legend()
plt.show() plt.show()
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
``` ```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment