mp.task_opf

class mp.task_opf

Bases: mp.task

mp.task_opf - MATPOWER task for optimal power flow (OPF).

Provides task implementation for the optimal power flow problem.

mp.task_opf Properties:
  • tag - task tag ‘OPF’

  • name - task name ‘Optimal Power Flow’

  • dc - true if using DC network model

mp.task_opf Methods:

See also mp.task.

Property Summary
dc

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

Method Summary
run_pre(d, mpopt)

Set dc property after calling superclass run_pre(), then check for unsupported AC OPF solver selection.

print_soln_header(mpopt, fd)

Call superclass print_soln_header() the print out the objective function value.

data_model_class_default()

Implement selector for default data model constructor.

data_model_build_post(dm, dmc, mpopt)

Call superclass data_model_build_post() then adjust bus voltage magnitude limits based on generator vm_setpoint, if requested.

network_model_class_default(dm, mpopt)

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

math_model_class_default(nm, dm, mpopt)

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