PreProcess_CIM_files module¶
The module PreProcess_CIM_files
defines function to be used for preprocessing CIM files before they are parsed with
the PyCIM
RDFXMLReader
. Most often it means fixing certain HTML tags.
See also
CIM2Matpower.cim_to_mpc()
and the Matlab functions MPC_NODAL2BB
and MPC_BB2NODAL
Date: | 2016-05-10 |
---|---|
Authors: | Konstantin Gerasimov |
e-mail: | kkgerasimov@gmail.com |
Credits: | This function is created for KU-Leuven as part of the GARPUR project http://www.garpur-project.eu |
-
PreProcess_CIM_files.
fix_RTE_cim_files
(cim_files)[source]¶ Defines string substitutions to be made in the CIM files (specific to RTE provided CIM files) so that they are compliant with the
PyCIM
package.Note
The CIM14 standard specifies that ReactiveCapabilityCurve.CurveDatas should point to the CurveData objects. However RTE’s implementation of CIM14 does the opposite which lead to not being able to access CurveData about the ReactiveCapabilityCurve from within the generator. The same goes for the other substitutions defined in this function.
Parameters: cim_files (list of strings) – CIM XML files Returns: None
-
PreProcess_CIM_files.
fix_cim_files
(cim_files, substitutions, cim_version, subst_id)[source]¶ Reads a XML file (containing the CIM model) and substitute strings, as defined by the substitutions input parameter.
Parameters: - cim_files (list of strings) – CIM XML files
- substitutions (dictionary) – defines substitutions to be made in the CIM XML file in the following format substitutions[( ‘original_string’, ‘substitution_string’ )] = count_of_substitutions
- cim_version (strings) – the CIM subst_id for which the substitution applies
- subst_id (string) – id of the set of substitutions to be made
Returns: None