Variables
We provide the following methods to provide a compositional approach for defining common variables used in power flow models. These methods should always be defined over "AbstractPowerModel".
PowerModels.sol_component_value_buspair — Methodmap sparse buspair variables into components
PowerModels.variable_branch_current_imaginary — Methodvariable: ci[l,i,j] for (l,i,j) in arcs
PowerModels.variable_branch_current_real — Methodvariable: cr[l,i,j] for (l,i,j) in arcs
PowerModels.variable_branch_indicator — Methodvariable: 0 <= z_branch[l] <= 1 for l in branches
PowerModels.variable_branch_power — Methodvariable_branch_power(pm::AbstractPowerModel; kwargs...)PowerModels.variable_branch_power_imaginary — Methodvariable: q[l,i,j] for (l,i,j) in arcs
PowerModels.variable_branch_power_real — Methodvariable: p[l,i,j] for (l,i,j) in arcs
PowerModels.variable_branch_series_current_imaginary — Methodvariable: csi[l,i,j] for (l,i,j) in arcs_from
PowerModels.variable_branch_series_current_real — Methodvariable: csr[l,i,j] for (l,i,j) in arcs_from
PowerModels.variable_branch_transform_angle — Methodvariable: ta[l] for l in branches
PowerModels.variable_branch_transform_magnitude — Methodvariable: 0 <= tm[l] for l in branches
PowerModels.variable_branch_voltage_magnitude_fr_on_off — Methodvariable: 0 <= vm_fr[l] <= buses[branches[l]["f_bus"]]["vmax"] for l in branches
PowerModels.variable_branch_voltage_magnitude_fr_sqr_on_off — Methodvariable: 0 <= w_fr[l] <= buses[branches[l]["f_bus"]]["vmax"]^2 for l in branches
PowerModels.variable_branch_voltage_magnitude_to_on_off — Methodvariable: 0 <= vm_to[l] <= buses[branches[l]["t_bus"]]["vmax"] for l in branches
PowerModels.variable_branch_voltage_magnitude_to_sqr_on_off — Methodvariable: 0 <= w_to[l] <= buses[branches[l]["t_bus"]]["vmax"]^2 for l in branches
PowerModels.variable_bus_voltage_angle — Methodvariable: t[i] for i in buses
PowerModels.variable_bus_voltage_imaginary — Methodreal part of the voltage variable i in buses
PowerModels.variable_bus_voltage_magnitude — Methodvariable: v[i] for i in buses
PowerModels.variable_bus_voltage_magnitude_sqr — Methodvariable: w[i] >= 0 for i in buses
PowerModels.variable_bus_voltage_real — Methodreal part of the voltage variable i in buses
PowerModels.variable_dcline_current_imaginary — Methodvariable: cidc[j] for j in dcline
PowerModels.variable_dcline_current_real — Methodvariable: crdc[j] for j in dcline
PowerModels.variable_dcline_power_imaginary — Methodvariable: q_dc[l,i,j] for (l,i,j) in arcs_dc
PowerModels.variable_dcline_power_real — Methodvariable: p_dc[l,i,j] for (l,i,j) in arcs_dc
PowerModels.variable_gen_current_imaginary — Methodvariable: cig[j] for j in gen
PowerModels.variable_gen_current_real — Methodvariable: crg[j] for j in gen
PowerModels.variable_gen_power — Methodgenerates variables for both active and reactive generation
PowerModels.variable_gen_power_imaginary — Methodvariable: qq[j] for j in gen
PowerModels.variable_gen_power_real — Methodvariable: pg[j] for j in gen
PowerModels.variable_ne_branch_indicator — Methodvariable: 0 <= branch_ne[l] <= 1 for l in branches
PowerModels.variable_ne_branch_power — Methodgenerates variables for both active and reactive branch_flow_ne
PowerModels.variable_ne_branch_power_imaginary — Methodvariable: -ne_branch[l]["rate_a"] <= q_ne[l,i,j] <= ne_branch[l]["rate_a"] for (l,i,j) in ne_arcs
PowerModels.variable_ne_branch_power_real — Methodvariable: -ne_branch[l]["rate_a"] <= p_ne[l,i,j] <= ne_branch[l]["rate_a"] for (l,i,j) in ne_arcs
PowerModels.variable_storage_charge — Methodvariable_storage_charge(pm::AbstractPowerModel; nw::Int=nw_id_default, bounded::Bool=true, report::Bool=true)PowerModels.variable_storage_current — Methoddo nothing by default but some formulations require this
PowerModels.variable_storage_discharge — Methodvariable_storage_discharge(pm::AbstractPowerModel; nw::Int=nw_id_default, bounded::Bool=true, report::Bool=true)PowerModels.variable_storage_energy — Methodvariable_storage_energy(pm::AbstractPowerModel; nw::Int=nw_id_default, bounded::Bool=true, report::Bool=true)PowerModels.variable_storage_power — Methodvariables for modeling storage units, includes grid injection and internal variables
PowerModels.variable_storage_power_control_imaginary — Methoda reactive power slack variable that enables the storage device to inject or consume reactive power at its connecting bus, subject to the injection limits of the device.
PowerModels.variable_storage_power_control_imaginary_on_off — Methoda reactive power slack variable that enables the storage device to inject or consume reactive power at its connecting bus, subject to the injection limits of the device.
PowerModels.variable_storage_power_mi — Methodvariables for modeling storage units, includes grid injection and internal variables, with mixed int variables for charge/discharge
PowerModels.variable_switch_indicator — Methodvariable_switch_indicator(pm::AbstractPowerModel; nw::Int=nw_id_default, relax::Bool=false, report::Bool=true)PowerModels.variable_switch_power — Methodvariable_switch_power(pm::AbstractPowerModel; kwargs...)PowerModels.variable_switch_power_imaginary — Methodvariable: pws[l,i,j] for (l,i,j) in arcs_sw
PowerModels.variable_switch_power_real — Methodvariable: pws[l,i,j] for (l,i,j) in arcs_sw
PowerModels.variable_branch_current — Functionvariable_branch_current(pm::AbstractBFModel; kwargs...)PowerModels.variable_bus_voltage — Functionnothing to do, no voltage angle variables
PowerModels.variable_gen_current — Functionvariable_gen_current(pm::AbstractIVRModel; nw::Int=nw_id_default, bounded::Bool=true, report::Bool=true, kwargs...)