pwrs.power_models.results#
MATPOWER result mapping shared by PowerModels formulations.
- class pwrs.power_models.results.PowerModelSolution(vector, variables, constraint_multipliers, lower_bound_multipliers, upper_bound_multipliers)[source]#
Bases:
objectA solver result indexed by formulation-level semantic component names.
- Parameters:
vector (ndarray)
variables (dict[str, ndarray])
constraint_multipliers (dict[str, ndarray])
lower_bound_multipliers (dict[str, ndarray])
upper_bound_multipliers (dict[str, ndarray])
- pwrs.power_models.results.build_matpower_result(network, solution, objective, success, info, *, formulation, implementation, branch_limit='apparent_power', angle_limit='bus_pair')[source]#
Map semantic OPF values and multipliers into MATPOWER result matrices.
- Parameters:
network (PowerNetwork)
solution (PowerModelSolution)
objective (float)
success (int)
info (dict[str, Any])
formulation (str)
implementation (str)
branch_limit (str)
angle_limit (str)
- Return type:
tuple[dict[str, Any], dict[str, Any]]