In [ ]:
using DataFrames, HDF5, JLD, Makeps, ACPowerFlow, ACSIMSEP, Optim

# user input to the code
verbose = true
PartFactFlag = false
PolarFlag = true
ps = load("data/case6ww_ps_2.jld")["ps"]
ps.shunt[[4:6],[:P,:Q]] = 210.
ps.branch[23,:status] = false

not_converged = ACPowerFlow.acpf!(ps, PartFactFlag = PartFactFlag)

beta, beta_P, beta_Q, beta_S, beta_C = ACSIMSEP.find_sens_fact(ps, PartFactFlag, not_converged);


Iter   Max(|g|)   |g|_2      max(Jac'*g)      alpha
   1  0.5060672  0.9462937 12.6881918  1.0047814 
   2  0.0154004  0.0267479  0.1729836  1.0018776 
   3  0.0000094  0.0000122  0.0001057  0.9999999 
Solution found.
Iter   Max(|g|)   |g|_2      max(Jac'*g)      alpha
   1  1.9060672  4.0005466 28.4673935  1.3142463 
   2  0.4751459  0.7475127  8.5153861  1.3248368 
   3  0.1278692  0.2006868  1.5223427  0.0123590 
   4  0.1272233  0.1994478  1.4983327  0.0000388 
   5  0.1272213  0.1994439  1.4972657  0.0000001 
 Did not find a solution to g(x) = 0.
Power flow did not converge on island 2 of 2.
Iter   Max(|g|)   |g|_2      max(Jac'*g)      alpha

In [ ]: