pwrs.power_models.dispatch#
Formulation registry and build/extend/solve lifecycle.
- class pwrs.power_models.dispatch.FormulationSpec(name, builder, solver, classifier)[source]#
Bases:
objectLazy entry points for one public PowerModels formulation.
- Parameters:
name (str)
builder (str)
solver (str)
classifier (str)
- pwrs.power_models.dispatch.build_power_model(mpc, formulation)[source]#
Build one registered formulation without applying extensions.
- Parameters:
mpc (Any)
formulation (str)
- Return type:
Any
- pwrs.power_models.dispatch.formulation_spec(formulation)[source]#
Return a registered formulation or raise a stable public error.
- Parameters:
formulation (str)
- Return type:
- pwrs.power_models.dispatch.solve_built_power_model(problem, mpopt, nargout=1, *, expected_formulation=None)[source]#
Apply configured extensions and solve a previously built model.
- Parameters:
problem (Any)
mpopt (Any)
nargout (int)
expected_formulation (str | None)