You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to solve power flow on attached model using PSSE but not using PowerModels (shows invalid model). Below is the code to run the attached example model. The model is reduced to only 3 bus system for easy reference. Can someone help me to figure out the issue?
using PowerModels
import InfrastructureModels
import Ipopt
import JuMP
import JSON
if !isdefined(JuMP, :num_nonlinear_constraints)
num_nonlinear_constraints = JuMP.num_nl_constraints
else
num_nonlinear_constraints = JuMP.num_nonlinear_constraints
end
nlp_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "tol"=>1e-6, "print_level"=>2)
Pglib_file = "yourpath/example.raw"
#setting generator scheduled voltage as bus voltage
source_data = parse_file(Pglib_file)
for (g,gen) in source_data["gen"]
genbus = gen["gen_bus"]
source_data["bus"]["$genbus"]["vm"] = gen["vg"]
end
Pglib_solution = PowerModels.run_pf(source_data, ACPPowerModel, nlp_solver, setting = Dict("output" => Dict("branch_flows" => true, "duals" => true)))
I think this is somewhat related to issue #737. when I changed the CZ and CW to 1, the branch reactance takes nonzero value and it works. However, it was not working for CZ = 3 and CW = 2.
On a closer look, it seems that pti assumes transformer base kV = Bus base kV when NOM1, NOM2 (or NOM3 for three winding transformers) =0. However, transformer base kV is taken as zero in data processing in PM. Hence, the branch reactance becomes zero during pu conversion and causes model to be invalid.
This issue is mostly addressed in pull request #917, but the case in this issue is still problematic due to transformer sbase values. With the PR in place, I could solve this example with Sbase>70, but Sbase=60 still does not solve. Note that one of the unit tests as part of this PR is the example in this issue with Sbase=100.
I am able to solve power flow on attached model using PSSE but not using PowerModels (shows invalid model). Below is the code to run the attached example model. The model is reduced to only 3 bus system for easy reference. Can someone help me to figure out the issue?
using PowerModels
import InfrastructureModels
import Ipopt
import JuMP
import JSON
if !isdefined(JuMP, :num_nonlinear_constraints)
num_nonlinear_constraints = JuMP.num_nl_constraints
else
num_nonlinear_constraints = JuMP.num_nonlinear_constraints
end
nlp_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "tol"=>1e-6, "print_level"=>2)
Pglib_file = "yourpath/example.raw"
#setting generator scheduled voltage as bus voltage
source_data = parse_file(Pglib_file)
for (g,gen) in source_data["gen"]
genbus = gen["gen_bus"]
source_data["bus"]["$genbus"]["vm"] = gen["vg"]
end
Pglib_solution = PowerModels.run_pf(source_data, ACPPowerModel, nlp_solver, setting = Dict("output" => Dict("branch_flows" => true, "duals" => true)))
PTIcase-main.zip
The text was updated successfully, but these errors were encountered: