-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Description
In https://lanl-ansi.github.io/PowerModels.jl/stable/power-flow/#Branch-Flow-Values, there are calc_branch_flow_ac
and calc_branch_flow_dc
, but not for calc_branch_flow_nfa
. But, this will not help I think, except calc_branch_flow_nfa
just:
function calc_branch_flow_nfa(data::Dict{String,<:Any})
pm_data = get_pm_data(data)
return Dict(
"branch" => Dict(
i => Dict(
"pf" => branch["pf"],
"qf" => branch["qf"],
"pt" => branch["pt"],
"qt" => branch["qt"]
) for (i, branch) in data["branch"]
),
"per_unit" => pm_data["per_unit"],
"baseMVA" => pm_data["baseMVA"]
)
end
Usage is the same with the other:
update_data!(network, result["solution"])
flows = calc_branch_flow_nfa(network)
Metadata
Metadata
Assignees
Labels
No labels