The VSC two-terminal formulations introduce a small pair of helpers that gate reactive variable / constraint creation on whether the network model is AC or active-only:
_maybe_add_reactive_power_variables! (src/twoterminal_hvdc_models/TwoTerminalDC_branches.jl)
_maybe_add_reactive_power_constraints! (same file)
Other branch / converter formulations across POM (LCC HVDC, multi-terminal converters, AC branches with conditional reactive support, etc.) implement the same AC-vs-active-only gating ad hoc. Promoting these helpers to src/common_models/ and parameterizing them by the device type, variable types, and constraint types would let those formulations share the same gating mechanism instead of duplicating the <:AbstractPowerModel / <:AbstractActivePowerModel dispatch pattern.
Follow-up to the discussion in #119: #119 (comment)
The VSC two-terminal formulations introduce a small pair of helpers that gate reactive variable / constraint creation on whether the network model is AC or active-only:
_maybe_add_reactive_power_variables!(src/twoterminal_hvdc_models/TwoTerminalDC_branches.jl)_maybe_add_reactive_power_constraints!(same file)Other branch / converter formulations across POM (LCC HVDC, multi-terminal converters, AC branches with conditional reactive support, etc.) implement the same AC-vs-active-only gating ad hoc. Promoting these helpers to
src/common_models/and parameterizing them by the device type, variable types, and constraint types would let those formulations share the same gating mechanism instead of duplicating the<:AbstractPowerModel/<:AbstractActivePowerModeldispatch pattern.Follow-up to the discussion in #119: #119 (comment)