m2mpc#
- ams.io.matpower.m2mpc(infile: str) dict[source]#
Parse a MATPOWER file and return a dictionary containing the parsed data.
This function processes MATPOWER case files and extracts relevant fields into a structured dictionary. It is revised from
andes.io.matpower.m2mpc.Supported fields include: - baseMVA: The system base power in MVA. - bus: Bus data, including voltage, load, and generation information. - bus_name: Names of the buses (if available). - gen: Generator data, including power limits and voltage setpoints. - branch: Branch data, including line impedances and ratings. - gencost: Generator cost data (parsed but not used in this implementation). - areas: Area data (parsed but not used in this implementation). - gentype: Generator type information (if available). - genfuel: Generator fuel type information (if available).
- Parameters:
- infilestr
Path to the MATPOWER file to be parsed.
- Returns:
- dict
A dictionary containing the parsed MATPOWER data, where keys correspond to MATPOWER struct names and values are numpy arrays or lists.