Commit 995daffb authored by Jan Dinkelbach's avatar Jan Dinkelbach
Browse files

Fix CI

parent f0cd7151
%% Cell type:markdown id: tags:
# DP Simulation of topology with slack, line and PQ load
%% Cell type:code id: tags:
``` python
%%bash
TOP=${TOP:-$(git rev-parse --show-toplevel)}
PATH=${TOP}/build/Examples/Cxx
DP_Slack_PiLine_PQLoad_with_PF_Init
```
%% Cell type:code id: tags:
``` python
from villas.dataprocessing.readtools import *
from villas.dataprocessing.timeseries import *
import matplotlib.pyplot as plt
import re
%matplotlib widget
# %matplotlib widget
```
%% Cell type:markdown id: tags:
## PF results
%% Cell type:code id: tags:
``` python
modelName = 'DP_Slack_PiLine_PQLoad_with_PF_Init_PF'
path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv'
ts_dpsim_pf = read_timeseries_csv(dpsim_result_file)
```
%% Cell type:markdown id: tags:
## DP results
%% Cell type:code id: tags:
``` python
modelName = 'DP_Slack_PiLine_PQLoad_with_PF_Init_DP'
path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv'
ts_dpsim = read_timeseries_csv(dpsim_result_file)
```
%% Cell type:code id: tags:
``` python
plt.figure(figsize=(12,6))
for ts_name, ts_obj in ts_dpsim.items():
plt.plot(ts_obj.time, ts_obj.abs().values, label=ts_name)
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.legend()
plt.show()
```
%% Cell type:code id: tags:
``` python
```
......
%% Cell type:markdown id: tags:
# DP Simulation of topology with slack, line and VSI
%% Cell type:code id: tags:
``` python
%%bash
TOP=${TOP:-$(git rev-parse --show-toplevel)}
PATH=${TOP}/build/Examples/Cxx
DP_Slack_PiLine_VSI_with_PF_Init
```
%% Cell type:code id: tags:
``` python
from villas.dataprocessing.readtools import *
from villas.dataprocessing.timeseries import *
import matplotlib.pyplot as plt
import re
%matplotlib widget
# %matplotlib widget
```
%% Cell type:markdown id: tags:
## PF results
%% Cell type:code id: tags:
``` python
modelName = 'DP_Slack_PiLine_VSI_with_PF_Init_PF'
path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv'
ts_dpsim_pf = read_timeseries_csv(dpsim_result_file)
```
%% Cell type:markdown id: tags:
## DP results
%% Cell type:code id: tags:
``` python
modelName = 'DP_Slack_PiLine_VSI_with_PF_Init_DP'
path = 'logs/' + modelName + '/'
dpsim_result_file = path + modelName + '.csv'
ts_dpsim = read_timeseries_csv(dpsim_result_file)
```
%% Cell type:code id: tags:
``` python
plt.figure(figsize=(12,6))
for ts_name, ts_obj in ts_dpsim.items():
if ts_name == 'v1' or ts_name == 'v2':
plt.plot(ts_obj.time, ts_obj.abs().values, label=ts_name)
for ts_name, ts_obj in ts_dpsim_pf.items():
if ts_name == 'v1' or ts_name == 'v2':
plt.plot(ts_obj.time, ts_obj.abs().values, label=ts_name+'_pf', linestyle=':')
plt.legend()
plt.show()
```
......
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