Commit a77d83ea authored by Markus Mirz's avatar Markus Mirz
Browse files

use pathlib to specify cim files

parent f8c10051
import logging
from acs.state_estimation import network
from acs.state_estimation import nv_powerflow
from acs.state_estimation import results
from pyvolt import network
from pyvolt import nv_powerflow
from pyvolt import results
import cimpy
import os
from villas.dataprocessing.readtools import read_timeseries_dpsim
#print(os.path.dirname(__file__))
os.chdir(os.path.dirname(__file__))
from pathlib import Path
logging.basicConfig(filename='CIGRE.log', level=logging.INFO, filemode='w')
xml_path = r".\sample_data\CIGRE-MV-NoTap"
xml_files = [xml_path + r"\Rootnet_FULL_NE_06J16h_DI.xml",
xml_path + r"\Rootnet_FULL_NE_06J16h_EQ.xml",
xml_path + r"\Rootnet_FULL_NE_06J16h_SV.xml",
xml_path + r"\Rootnet_FULL_NE_06J16h_TP.xml"]
xml_files_abs = []
for file in xml_files:
xml_files_abs.append(os.path.abspath(file))
cim_dir = Path('.') / 'sample_data' / 'CIGRE-MV-NoTap'
cim_files = cim_dir.glob('*.xml')
cim_list = []
for file in cim_files:
cim_list.append(str(file.absolute()))
print(cim_list)
# read cim files and create new network.Systen object
res, _ = cimpy.cim_import(xml_files_abs, "cgmes_v2_4_15")
......
Markdown is supported
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