Skip to content

Inconsistent solution keys across variable_ne_branch_* methods #820

@matteorossini

Description

@matteorossini

variable_ne_branch_power_real

variable_ne_branch_power_real(pm::AbstractPowerModel; nw, bounded, report) defines :pf and :pt as solution keys when assigning variables to solution dict:

report && sol_component_value_edge(pm, nw, :ne_branch, :pf, :pt, ref(pm, nw, :ne_arcs_from), ref(pm, nw, :ne_arcs_to), p_ne)

However, variable_ne_branch_power_real(pm::AbstractAPLossLessModels; nw, bounded, report) uses :p_ne_fr and :p_ne_to instead:

report && sol_component_value_edge(pm, nw, :ne_branch, :p_ne_fr, :p_ne_to, ref(pm, nw, :ne_arcs_from), ref(pm, nw, :ne_arcs_to), p_ne_expr)


variable_ne_branch_power_imaginary

Similarly, variable_ne_branch_power_imaginary(pm::AbstractPowerModel; nw, bounded, report) uses :qf and :qt, whereas variable_ne_branch_power_imaginary(pm::AbstractActivePowerModel; nw, bounded, report) uses :q_ne_fr and :q_ne_to:

report && _IM.sol_component_fixed(pm, pm_it_sym, nw, :ne_branch, :q_ne_fr, ids(pm, nw, :ne_branch), NaN)
report && _IM.sol_component_fixed(pm, pm_it_sym, nw, :ne_branch, :q_ne_to, ids(pm, nw, :ne_branch), NaN)


Other functions

I also performed a similar search in other variable_ne_* functions: it seems that variable_ne_branch_cosine and variable_ne_branch_voltage_product_angle are the only ones that use :*_ne* in solution keys (:cs_ne and :td_ne, respectively). Perhaps those keys could be changed into :cs and :td for consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions