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_active_branch_flow — Methodvariable: p[l,i,j] for (l,i,j) in arcs
PowerModels.variable_active_branch_flow_ne — 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_active_dcline_flow — Methodvariable: p_dc[l,i,j] for (l,i,j) in arcs_dc
PowerModels.variable_active_generation — Methodvariable: pg[j] for j in gen
PowerModels.variable_active_storage — MethodPowerModels.variable_active_switch_flow — Methodvariable: pws[l,i,j] for (l,i,j) in arcs_sw
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_flow — MethodPowerModels.variable_branch_flow_ne — Methodgenerates variables for both active and reactive branch_flow_ne
PowerModels.variable_branch_indicator — Methodvariable: 0 <= z_branch[l] <= 1 for l in branches
PowerModels.variable_branch_ne — Methodvariable: 0 <= branch_ne[l] <= 1 for l in branches
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_cosine — MethodPowerModels.variable_current_storage — Methoddo nothing by default but some formulations require this
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_demand_factor — MethodPowerModels.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_generation — Methodgenerates variables for both active and reactive generation
PowerModels.variable_reactive_branch_flow — Methodvariable: q[l,i,j] for (l,i,j) in arcs
PowerModels.variable_reactive_branch_flow_ne — 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_reactive_dcline_flow — Methodvariable: q_dc[l,i,j] for (l,i,j) in arcs_dc
PowerModels.variable_reactive_generation — Methodvariable: qq[j] for j in gen
PowerModels.variable_reactive_storage — MethodPowerModels.variable_reactive_switch_flow — Methodvariable: pws[l,i,j] for (l,i,j) in arcs_sw
PowerModels.variable_shunt_factor — MethodPowerModels.variable_sine — MethodPowerModels.variable_storage — Methodvariables for modeling storage units, includes grid injection and internal variables
PowerModels.variable_storage_charge — MethodPowerModels.variable_storage_complementary_indicator — MethodPowerModels.variable_storage_discharge — MethodPowerModels.variable_storage_energy — MethodPowerModels.variable_storage_mi — Methodvariables for modeling storage units, includes grid injection and internal variables, with mixed int variables for charge/discharge
PowerModels.variable_switch_flow — MethodPowerModels.variable_transformer_ta — Methodvariable: ta[l] for l in branches
PowerModels.variable_transformer_tm — Methodvariable: 0 <= tm[l] for l in branches
PowerModels.variable_voltage_angle — Methodvariable: t[i] for i in buses
PowerModels.variable_voltage_imaginary — Methodreal part of the voltage variable i in buses
PowerModels.variable_voltage_magnitude — Methodvariable: v[i] for i in buses
PowerModels.variable_voltage_magnitude_from_on_off — Methodvariable: 0 <= vm_fr[l] <= buses[branches[l]["f_bus"]]["vmax"] for l in branches
PowerModels.variable_voltage_magnitude_sqr — Methodvariable: w[i] >= 0 for i in buses
PowerModels.variable_voltage_magnitude_sqr_from_on_off — Methodvariable: 0 <= w_fr[l] <= buses[branches[l]["f_bus"]]["vmax"]^2 for l in branches
PowerModels.variable_voltage_magnitude_sqr_to_on_off — Methodvariable: 0 <= w_to[l] <= buses[branches[l]["t_bus"]]["vmax"]^2 for l in branches
PowerModels.variable_voltage_magnitude_to_on_off — Methodvariable: 0 <= vm_to[l] <= buses[branches[l]["t_bus"]]["vmax"] for l in branches
PowerModels.variable_voltage_product — MethodPowerModels.variable_voltage_product_on_off — MethodPowerModels.variable_voltage_real — Methodreal part of the voltage variable i in buses