Parsing MATPOWER or PSS/e Files

The following code will create a System from a MATPOWER .m or PSS/e .raw file:

julia> using PowerSystems
julia> file_dir = joinpath(pkgdir(PowerSystems), "docs", "src", "tutorials", "tutorials_data")"/home/runner/work/PowerSystems.jl/PowerSystems.jl/docs/src/tutorials/tutorials_data"
julia> sys = System(joinpath(file_dir, "case5.m"))[ Info: Correcting vm in bus 1 to 1.07762 to match generator set-point [ Info: Correcting vm in bus 3 to 1.1 to match generator set-point [ Info: Correcting vm in bus 4 to 1.06414 to match generator set-point [ Info: Correcting vm in bus 10 to 1.06907 to match generator set-point [ Info: extending matpower format with data: areas 1x3 [ Info: reversing the orientation of branch 6 (4, 3) to be consistent with other parallel branches [ Info: removing 1 cost terms from generator 5: [1000.0, 0.0] [ Info: removing 1 cost terms from generator 4: [4000.0, 0.0] [ Info: removing 1 cost terms from generator 2: [1500.0, 0.0] [ Info: removing 1 cost terms from generator 3: [3000.0, 0.0] [ Info: removing 1 cost terms from generator 1: [1400.0, 0.0] ┌ Info: Constructing System from Power Models data["name"] = "nesta_case5_pjm" data["source_type"] = "matpower" [ Info: Reading bus data [ Info: Reading Load data in PowerModels dict to populate System ... [ Info: Reading LoadZones data in PowerModels dict to populate System ... [ Info: Reading generator data [ Info: Reading branch data [ Info: Reading shunt data [ Info: Reading DC Line data [ Info: Reading storage data System ┌───────────────────┬─────────────┐ │ Property │ Value │ ├───────────────────┼─────────────┤ │ Name │ │ │ Description │ │ │ System Units Base │ SYSTEM_BASE │ │ Base Power │ 100.0 │ │ Base Frequency │ 60.0 │ │ Num Components │ 28 │ └───────────────────┴─────────────┘ Static Components ┌──────────────────────────┬───────┐ │ Type │ Count │ ├──────────────────────────┼───────┤ │ ACBus │ 5 │ │ Arc │ 6 │ │ Area │ 1 │ │ Line │ 5 │ │ LoadZone │ 1 │ │ PhaseShiftingTransformer │ 2 │ │ PowerLoad │ 3 │ │ ThermalStandard │ 5 │ └──────────────────────────┴───────┘

This parsing code was copied with permission from PowerModels.jl.

See also: