Methods
Model builders
BusInjectionModel.build_bim_rectangular! — Functionbuild_bim_rectangular!(m::JuMP.AbstractModel, net::Network, mtype::ModelType=Unrelaxed)Top-level model builder that dispatches the ModelType enum
build_bim_rectangular!(m::JuMP.AbstractModel, net::Network{SinglePhase}, ::Val{Unrelaxed})Model builder for single-phase, unrelaxed BIM with rectangular voltage variables. See the Single Phase Bus Injection Model (Unrelaxed) math for details.
Adds the variables:
- m[:v]with complex values for all busses in- CommonOPF.busses(net)
- m[:s0]for the complex slack bus power injection
build_bim_rectangular!(m::JuMP.AbstractModel, net::Network{MultiPhase}, ::Val{Unrelaxed})Model builder for multi-phase, unrelaxed BIM with rectangular voltage variables. See the Multi-Phase Bus Injection Model (Unrelaxed) math for details.
Adds the variables:
- m[:v]with complex values for all busses in- CommonOPF.busses(net)
- m[:s0]for the complex slack bus power injection
build_bim_rectangular!(m::JuMP.Model, net::Network, ::Val{FixedPointLinear})Build the fixed point linear model.
BusInjectionModel.build_bim_polar! — Functionbuild_bim_polar!(m::JuMP.AbstractModel, net::Network{SinglePhase}, ::Val{DC})Build the classic DC OPF model.
Variables:
- pjnet bus power injection variable
- p_genall generators are given real power injection decision variables at their busses.
- v_angvoltage angle at all busses
build_bim_polar!(m::JuMP.AbstractModel, net::Network, mtype::ModelType=Unrelaxed)Top-level model builder that dispatches the ModelType enum
build_bim_polar!(m::JuMP.AbstractModel, net::Network{SinglePhase}, ::Val{Unrelaxed})Model builder for single-phase, unrelaxed BIM with polar voltage variables. See the Single Phase Bus Injection Model (Unrelaxed) math for details.
Adds the variables:
- m[:v_mag]for all busses in- CommonOPF.busses(net)
- m[:v_ang]for all busses in- CommonOPF.busses(net)
- m[:pj]and- m[:qj]for the bus power injections
- m[:q_gen]for any P-V busses (via the- CommonOPF.Generator)
BusInjectionModel.add_or_update_fixed_point_constraint — Function add_or_update_fixed_point_constraint(
    m::JuMP.Model, 
    net::Network, 
    v_fp::Matrix{ComplexF64},
)Apply the fixed point voltage constraint to the model m. If :fixed_point_con in keys(m.obj_dict) then the existing constraints are deleted first.
BusInjectionModel.add_complex_terminal_power_variable — Functionadd_complex_terminal_power_variable(
    m::JuMP.Model, 
    net::Network, 
    trmnls::Vector{CommonOPF.BusTerminal},
)Add an :s variable to the model. If the net.bounds for s missing the default bounds are zero (to keep the model bounded).
BusInjectionModel.add_complex_terminal_voltage_variable — Functionadd_complex_terminal_voltage_variable(
    m::JuMP.Model, 
    net::Network, 
    trmnls::Vector{CommonOPF.BusTerminal},
)Add a variable with symbol :v for the complex voltage indexed on trmnls and 1:net.Ntimesteps