This package extends PowerModels.jl supported input formats to also support powsybl's supported formats (CGMES, UCTE, XIIDM).
These file formats are widely used by European TSO's.
import PowsyblToPowerModels
pm_data = PowsyblToPowerModels.parse_powsybl("path/to/case")
- Install Octave: https://octave.org/download
- Install Matpower: https://matpower.org/about/get-started/
- During the installation, generate the
startup.m
file with Matpower's paths. It should look something like this
cat startup.m %STARTUP %% add MATPOWER paths addpath( ... '/home/lukecai/programs/matpower8.0/lib', ... '/home/lukecai/programs/matpower8.0/lib/t', ... '/home/lukecai/programs/matpower8.0/data', ... '/home/lukecai/programs/matpower8.0/most/lib', ... '/home/lukecai/programs/matpower8.0/most/lib/t', ... '/home/lukecai/programs/matpower8.0/mp-opt-model/lib', ... '/home/lukecai/programs/matpower8.0/mp-opt-model/lib/t', ... '/home/lukecai/programs/matpower8.0/mips/lib', ... '/home/lukecai/programs/matpower8.0/mips/lib/t', ... '/home/lukecai/programs/matpower8.0/mptest/lib', ... '/home/lukecai/programs/matpower8.0/mptest/lib/t', ... '/home/lukecai/programs/matpower8.0/extras/maxloadlim', ... '/home/lukecai/programs/matpower8.0/extras/maxloadlim/tests', ... '/home/lukecai/programs/matpower8.0/extras/maxloadlim/examples', ... '/home/lukecai/programs/matpower8.0/extras/misc', ... '/home/lukecai/programs/matpower8.0/extras/reduction', ... '/home/lukecai/programs/matpower8.0/extras/sdp_pf', ... '/home/lukecai/programs/matpower8.0/extras/se', ... '/home/lukecai/programs/matpower8.0/extras/simulink_matpower', ... '/home/lukecai/programs/matpower8.0/extras/simulink_matpower/helper_functions', ... '/home/lukecai/programs/matpower8.0/extras/simulink_matpower/helper_functions/getter_setter_functions', ... '/home/lukecai/programs/matpower8.0/extras/smartmarket', ... '/home/lukecai/programs/matpower8.0/extras/state_estimator', ... '/home/lukecai/programs/matpower8.0/extras/syngrid/lib', ... '/home/lukecai/programs/matpower8.0/extras/syngrid/lib/t', ... '-end' );
- Put the
startup.m
file inside thesrc
directory
- During the installation, generate the
Launch julia
julia
Enter the package manager (pkg) and activate the current package
]
activate .
If it is the first time you are running the package, you must also download the dependencies.
Inside the package manager (pkg), run the following command
instantiate
This will create a Manifest.toml
file in the source of the repo.
Finally, for the conversion, leave the package manager (backspace) and run
import PowsyblToPowerModels
PowsyblToPowerModels.convert_m_to_xiidm("path/to/case")
This command will run octave and create a .mat file for the case.
Then, it will read the .mat file with Powsybl.jl and save it as an .xiidm file.
Aditionally, it will also create a .json with some extra information not contained in the .xiidm.