I’m using PowerModels.jl to run some power flow studies and I’m interested in comparing the results obtained from the JuMP solution to the Newton solution. In most cases, those results are the same; however, when I make modifications on the power system (e.g. deleting a transmission line) and run Newton’s method, the flow on one branch of my system results in a much higher value when compared to JuMP’s solution. I’m using version 0.18.1 of PowerModels and my system has 10 buses.
This is the code I’m using to run this power flow study:
using PowerModels using Ipopt network_data = parse_file("/teste_novo.raw") print_summary(network_data) # ========================= Changes in the system ========================= # Open line 8-9 (branch 6): delete!(network_data["branch"], "6") # ========================= Newton solution ========================= result = compute_ac_pf(network_data) # Check that the solver converged: update_data!(network_data, result["solution"]) flows = calc_branch_flow_ac(network_data) update_data!(network_data, flows) print_summary(network_data)
Am I doing something wrong in this code for Newton’s method?