-
Notifications
You must be signed in to change notification settings - Fork 19
Powerflow related APIs
Format: load_powerflow_data(file, ftype)
Description: Load powerflow data from file.
Args:
(1) file: string, source powerflow file name.
(2) ftype: string, powerflow data format.
Rets: N/A
Example: N/A
Format: check_powerflow_data()
Description: Check powerflow data. If any inappropriate data is set, report will be sent to log file.
Args: N/A
Rets: N/A
Example: N/A
Format: save_powerflow_data(file, ftype, export_zero_line=True, export_out_of_service_bus=True, export_mode=0)
Description: Save powerflow data to file.
Args:
(1) file: string, target powerflow file name.
(2) ftype: string, powerflow data format.
(3) export_zero_line: boolean, logic of whether exporting zero impedance lines. True for export, False for not export.
(4) export_out_of_service_bus: boolean, logic of whether exporting out-of-service buses. True for export, False for not export.
(5) export_mode: integer, export mode (0,1,2,3). 0 for exporting data as import, 1 for exporting data ordered by bus number in ascending order, 2 for exporting data ordered by bus name in ascending order, 3 for exporting buses in the order of generator, load, hvdc buses.
Rets: N/A
Example: N/A
Format: load_powerflow_result(file, ftype)
Description: Load powerflow result from file.
Args:
(1) file: string, source powerflow result file name.
(2) ftype: string, powerflow result data format.
Rets: N/A
Example: N/A
Format: get_powerflow_solver_parameter(par_type, par_name)
Description: Get powerflow solver configuration parameter.
Args:
(1) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(2) par_name: String of parameter name.
Rets:
(1) Value of parameter.
Tips:
The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.
Example: N/A
Format: set_powerflow_solver_parameter(par_type, par_name, value)
Description: Set powerflow solver configuration parameter.
Args:
(1) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(2) par_name: String of parameter name.
(3) value: Value of parameter.
Rets: N/A
Tips:
The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be changed.
Example: N/A
Format: show_powerflow_solver_configuration()
Description: Show powerflow solver configuration. Report is sent to log.
Args: N/A
Rets: N/A
Example: N/A
Format: solve_powerflow(method)
Description: Solve powerflow.
Args:
(1) method: String of powerflow solution method. Should be one of {"NR", "PQ"}
Rets: N/A
Example: N/A
Format: is_powerflow_converged()
Description: Check if powerflow is converged or not.
Args: N/A
Rets:
(1) Boolean value. True for converged, False for not converged.
Example: N/A
Format: get_powerflow_loss()
Description: Get active power loss of solved powerflow.
Args: N/A
Rets:
(1) System power loss in MW.
Tips:
If powerflow is not converged, the return result is meaningless.
Example: N/A
Format: show_powerflow_result()
Description: Show powerflow result in log.
Args: N/A
Rets: N/A
Example: N/A
Format: save_powerflow_result(file)
Description: Save powerflow result to file.
Args:
(1) file: String of target file name.
Rets: N/A
Tips:
The result exported by save_powerflow_result() is briefer than that exported by save_extended_powerflow_result().
Example: N/A
Format: save_extended_powerflow_result(file)
Description: Save extended powerflow result to file.
Args:
(1) file: String of target file name.
Rets: N/A
Tips:
The result exported by save_extended_powerflow_result() is more detailed than that exported by save_powerflow_result().
Example: N/A
Format: save_jacobian_matrix(file)
Description: Save jacobian matrix of powerflow solver to file.
Args:
(1) file: String of target file name.
Rets: N/A
Example: N/A
Cite STEPS via: Changgang Li, Yue Wu, Hengxu Zhang, Hua Ye, Yutian Liu and Yilu Liu, "STEPS: A Portable Numerical Simulation Toolkit for Electrical Power System Dynamic Studies," in IEEE Transactions on Power Systems, doi: 10.1109/TPWRS.2020.3045102.