mp.task_pf

class mp.task_pf

Bases: mp.task

mp.task_pf - MATPOWER task for power flow (PF).

Provides task implementation for the power flow problem.

This includes the handling of iterative runs to enforce generator reactive power limits, if requested.

mp.task_pf Properties:
  • tag - task tag ‘PF’

  • name - task name ‘Power Flow’

  • dc - true if using DC network model

  • iterations - total number of power flow iterations

  • ref - current ref node indices

  • ref0 - initial ref node indices

  • va_ref0 - initial ref node voltage angles

  • fixed_q_idx - indices of fixed Q gens

  • fixed_q_qty - Q output of fixed Q gens

mp.task_pf Methods:

See also mp.task.

Property Summary
tag = 'PF'
name = 'Power Flow'
dc

true if using DC network model (from mpopt.model, cached in run_pre())

iterations

(integer) total number of power flow iterations

ref

(integer) current ref node indices

ref0

(integer) initial ref node indices

va_ref0

(double) initial ref node voltage angles

fixed_q_idx

(integer) indices of fixed Q gens

fixed_q_qty

(double) Q output of fixed Q gens

Method Summary
run_pre(d, mpopt)

Set dc property after calling superclass run_pre().

next_dm(mm, nm, dm, mpopt, mpx)

Implement optional iterations to enforce generator reactive limits.

enforce_q_lims(nm, dm, mpopt)

Used by next_dm() to implement enforcement of generator reactive limits.

network_model_class_default(dm, mpopt)

Implement selector for default network model constructor depending on mpopt.model and mpopt.pf.v_cartesian.

network_model_build_post(nm, dm, mpopt)

Initialize mp.task_pf properties, if non-empty AC case with generator reactive limits enforced.

network_model_x_soln(mm, nm)

Call superclass network_model_x_soln() then correct the voltage angle if the ref node has been changed.

math_model_class_default(nm, dm, mpopt)

Implement selector for default mathematical model constructor depending on mpopt.model, mpopt.pf.v_cartesian, and mpopt.pf.current_balance.