3.1 Data Formats

The data files used by Matpower are Matlab M-files or MAT-files which define and return a single Matlab struct. The M-file format is plain text that can be edited using any standard text editor. The fields of the struct are baseMVA, bus, branch, gen and optionally gencost, where baseMVA is a scalar and the rest are matrices. In the matrices, each row corresponds to a single bus, branch, or generator. The columns are similar to the columns in the standard IEEE CDF and PTI formats. The number of rows in bus, branch and gen are nb  , nl  and ng  , respectively. If present, gencost has either ng  or 2ng  rows, depending on whether it includes costs for reactive power or just real power. Full details of the Matpower case format are documented in Appendix B and can be accessed from the Matlab command line by typing help caseformat.