Open ballesm opened 3 years ago
I am facing the same problem. I tried to run opf for a custom system and got a converge error. Then I tried the example opf_dcline to check if the error was on my side, but I got converge error.
This is really strange, as it was running before. I don't have the time to check this myself. But I suggest to run the code with an older version of pandapower, where it was still working. And then extract the net._ppc and compare it to the net._ppc you are getting with the actual version. What are the differences there? I guess we introduced a change in pd2ppc, that we didn't test with dc_line and OPF...
I tried the DC Line dispatch with pandapower OPF example with versions 2.5.0 and 2.7.0 and got the same convergence error:
OPFNotConverged: Optimal Power Flow did not converge!
---------------------------------------------------------------------------
OPFNotConverged Traceback (most recent call last)
<ipython-input-6-1fde0be86c4f> in <module>
----> 1 pp.runopp(net)
C:\ProgramData\Anaconda3\lib\site-packages\pandapower\run.py in runopp(net, verbose, calculate_voltage_angles, check_connectivity, suppress_warnings, switch_rx_ratio, delta, init, numba, trafo3w_losses, consider_line_temperature, **kwargs)
355 _check_bus_index_and_print_warning_if_high(net)
356 _check_gen_index_and_print_warning_if_high(net)
--> 357 _optimal_powerflow(net, verbose, suppress_warnings, **kwargs)
358
359
C:\ProgramData\Anaconda3\lib\site-packages\pandapower\optimal_powerflow.py in _optimal_powerflow(net, verbose, suppress_warnings, **kwargs)
68
69 if not result["success"]:
---> 70 raise OPFNotConverged("Optimal Power Flow did not converge!")
71
72 # ppci doesn't contain out of service elements, but ppc does -> copy results accordingly
OPFNotConverged: Optimal Power Flow did not converge!
As sugested by @friederikemeier, I ran the code with an older version (2.0.0) and it worked. Then, I extracted the net._ppc
I got with the older version (2.0.0) and compared with the net._ppc
from the actual version (2.7.0). There are some major differences, e.g., 'bus'
, 'gen'
, 'branch'
and some other fields are repeted in the 2.7.0 case. Moreover, when compared to the net._ppc
from version 2.5.0 there are some other differences. Check it out:
net._ppc
with pandapower 2.7.0{'baseMVA': 1,
'version': 2,
'bus': array([[ 0.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.02000000e+00, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 1.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01000000e+00, -4.85950424e-01,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 2.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01200000e+00, -7.25627293e-01,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 3.00000000e+00, 1.00000000e+00, 8.00000000e+02,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01283464e+00, -1.14418392e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 4.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.02000000e+00, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]),
'branch': array([[ 0.00000000e+00+0.j, 1.00000000e+00+0.j, 1.22576177e-05+0.j,
5.25623269e-05+0.j, 1.49703173e+01+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 2.00732612e+02+0.j, 1.40161556e+02+0.j,
-2.00000000e+02+0.j, -1.52443185e+02+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 2.00000000e+00+0.j, 3.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 1.97500000e+02+0.j, -7.44917589e+01+0.j,
-1.97150356e+02+0.j, 6.57614729e+01+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 3.00000000e+00+0.j, 4.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, -6.02849644e+02+0.j, -6.57614729e+01+0.j,
6.05773987e+02+0.j, 6.79907246e+01+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j]]),
'gen': array([[ 0.00000000e+00, 2.00732612e+02, 1.40161556e+02,
0.00000000e+00, 0.00000000e+00, 1.02000000e+00,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e+09, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 4.00000000e+00, 6.05773987e+02, 6.79907246e+01,
0.00000000e+00, 0.00000000e+00, 1.02000000e+00,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e+09, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 2.00000000e+00, 1.97500000e+02, -7.44917589e+01,
1.00000000e+09, -1.00000000e+09, 1.01200000e+00,
nan, 1.00000000e+00, 1.00000000e+03,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 1.00000000e+00, -2.00000000e+02, -1.52443185e+02,
1.00000000e+09, -1.00000000e+09, 1.01000000e+00,
nan, 1.00000000e+00, 0.00000000e+00,
-1.00000000e+03, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]),
'internal': {'Ybus': <5x5 sparse matrix of type '<class 'numpy.complex128'>'
with 11 stored elements in Compressed Sparse Row format>,
'Yf': <3x5 sparse matrix of type '<class 'numpy.complex128'>'
with 6 stored elements in Compressed Sparse Row format>,
'Yt': <3x5 sparse matrix of type '<class 'numpy.complex128'>'
with 6 stored elements in Compressed Sparse Row format>,
'branch_is': array([ True, True, True]),
'gen_is': array([ True, True, True, True]),
'DLF': array([], dtype=complex128),
'buses_ord_bfs_nets': array([], dtype=float64),
'ref_gens': array([0, 1]),
'Bbus': <5x5 sparse matrix of type '<class 'numpy.complex128'>'
with 11 stored elements in Compressed Sparse Column format>,
'J': <4x4 sparse matrix of type '<class 'numpy.float64'>'
with 10 stored elements in Compressed Sparse Row format>,
'Vm_it': None,
'Va_it': None,
'bus': array([[ 0.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.02000000e+00, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 1.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01000000e+00, -4.85950424e-01,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 2.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01200000e+00, -7.25627293e-01,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 3.00000000e+00, 1.00000000e+00, 8.00000000e+02,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01283464e+00, -1.14418392e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 4.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.02000000e+00, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]),
'gen': array([[ 0.00000000e+00, 2.00732612e+02, 1.40161556e+02,
0.00000000e+00, 0.00000000e+00, 1.02000000e+00,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e+09, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 4.00000000e+00, 6.05773987e+02, 6.79907246e+01,
0.00000000e+00, 0.00000000e+00, 1.02000000e+00,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e+09, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 2.00000000e+00, 1.97500000e+02, -7.44917589e+01,
1.00000000e+09, -1.00000000e+09, 1.01200000e+00,
nan, 1.00000000e+00, 1.00000000e+03,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 1.00000000e+00, -2.00000000e+02, -1.52443185e+02,
1.00000000e+09, -1.00000000e+09, 1.01000000e+00,
nan, 1.00000000e+00, 0.00000000e+00,
-1.00000000e+03, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]),
'branch': array([[ 0.00000000e+00+0.j, 1.00000000e+00+0.j, 1.22576177e-05+0.j,
5.25623269e-05+0.j, 1.49703173e+01+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 2.00732612e+02+0.j, 1.40161556e+02+0.j,
-2.00000000e+02+0.j, -1.52443185e+02+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 2.00000000e+00+0.j, 3.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 1.97500000e+02+0.j, -7.44917589e+01+0.j,
-1.97150356e+02+0.j, 6.57614729e+01+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 3.00000000e+00+0.j, 4.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, -6.02849644e+02+0.j, -6.57614729e+01+0.j,
6.05773987e+02+0.j, 6.79907246e+01+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j]]),
'baseMVA': 1,
'V': array([1.02 +0.j , 1.00996367-0.00856615j,
1.01191884-0.01281622j, 1.01263269-0.02022474j,
1.02 +0.j ]),
'pv': array([1, 2], dtype=int64),
'pq': array([3], dtype=int64),
'ref': array([0, 4], dtype=int64),
'Sbus': array([ 200. +0.j, -200. +0.j, 197.5+0.j, -800. +0.j, 602.5+0.j])},
'success': True,
'et': 1.6326789855957031,
'iterations': 3}
net._ppc
with pandapower 2.0.0{'baseMVA': 1,
'version': 2,
'bus': array([[ 0.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.02000000e+00, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 1.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01000000e+00, -4.85950424e-01,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 2.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01200000e+00, -7.25627293e-01,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 3.00000000e+00, 1.00000000e+00, 8.00000000e+02,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.01283464e+00, -1.14418392e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 4.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.02000000e+00, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 2.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]),
'branch': array([[ 0.00000000e+00+0.j, 1.00000000e+00+0.j, 1.22576177e-05+0.j,
5.25623269e-05+0.j, 1.49703173e+01+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 2.00732612e+02+0.j, 1.40161556e+02+0.j,
-2.00000000e+02+0.j, -1.52443185e+02+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 2.00000000e+00+0.j, 3.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 1.97500000e+02+0.j, -7.44917589e+01+0.j,
-1.97150356e+02+0.j, 6.57614729e+01+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 3.00000000e+00+0.j, 4.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 2.50000000e+02+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, -6.02849644e+02+0.j, -6.57614729e+01+0.j,
6.05773987e+02+0.j, 6.79907246e+01+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j]]),
'gen': array([[ 0.00000000e+00, 2.00732612e+02, 1.40161556e+02,
0.00000000e+00, 0.00000000e+00, 1.02000000e+00,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e+09, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 4.00000000e+00, 6.05773987e+02, 6.79907246e+01,
0.00000000e+00, 0.00000000e+00, 1.02000000e+00,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e+09, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 2.00000000e+00, 1.97500000e+02, -7.44917589e+01,
1.00000000e+09, -1.00000000e+09, 1.01200000e+00,
nan, 1.00000000e+00, 1.00000000e+03,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[ 1.00000000e+00, -2.00000000e+02, -1.52443185e+02,
1.00000000e+09, -1.00000000e+09, 1.01000000e+00,
nan, 1.00000000e+00, 0.00000000e+00,
-1.00000000e+03, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]),
'internal': {'Ybus': <5x5 sparse matrix of type '<class 'numpy.complex128'>'
with 11 stored elements in Compressed Sparse Row format>,
'Yf': <3x5 sparse matrix of type '<class 'numpy.complex128'>'
with 6 stored elements in Compressed Sparse Row format>,
'Yt': <3x5 sparse matrix of type '<class 'numpy.complex128'>'
with 6 stored elements in Compressed Sparse Row format>,
'branch_is': array([ True, True, True]),
'gen_is': array([ True, True, True, True]),
'DLF': array([], dtype=complex128),
'buses_ord_bfs_nets': array([], dtype=float64),
'ref_gens': array([0, 1]),
'J': <4x4 sparse matrix of type '<class 'numpy.float64'>'
with 10 stored elements in Compressed Sparse Row format>,
'Vm_it': None,
'Va_it': None},
'success': True,
'et': 1.6336281299591064,
'iterations': 3}
net._ppc
with pandapower 2.5.0{'baseMVA': 1,
'version': 2,
'bus': array([[ 0.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.31388242e+00, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 1.02000000e+00,
1.02000000e+00, -5.02224630e+03, 1.06682515e-01,
9.85474186e+10, 9.79347804e+10],
[ 1.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 1.08703858e+00, 5.53828691e+00,
3.80000000e+02, 1.00000000e+00, 1.50000000e+00,
0.00000000e+00, 2.66312920e+07, -1.06737160e-01,
8.19400890e+10, 7.80971425e+10],
[ 2.00000000e+00, 2.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, -1.70105830e-01, 2.45229110e+02,
3.80000000e+02, 1.00000000e+00, 1.50000000e+00,
0.00000000e+00, 4.23112766e+07, -1.00801904e-01,
5.14623575e+10, 1.27085367e+13],
[ 3.00000000e+00, 1.00000000e+00, 8.00000000e+02,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, -3.31932204e-02, -6.64099767e+01,
3.80000000e+02, 1.00000000e+00, 1.50000000e+00,
0.00000000e+00, -8.25272677e+15, -1.30159136e+16,
6.05328201e+10, 3.85739092e+11],
[ 4.00000000e+00, 3.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.00000000e+00, 3.13754278e-01, 0.00000000e+00,
3.80000000e+02, 1.00000000e+00, 1.02000000e+00,
1.02000000e+00, -5.02304078e+03, 1.91202698e-01,
7.82997692e+10, 4.83869882e+20]]),
'branch': array([[ 0.00000000e+00+0.j, 1.00000000e+00+0.j, 1.22576177e-05+0.j,
5.25623269e-05+0.j, 1.49703173e+01+0.j, 6.31852135e+03+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, -1.20498354e+03+0.j, 6.06526247e+03+0.j,
1.47761911e+03+0.j, -4.91793058e+03+0.j, 1.03766523e+08+0.j,
1.04701391e+08+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 2.00000000e+00+0.j, 3.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 6.31852135e+03+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 4.47462806e+01+0.j, 7.08120253e+02+0.j,
9.74857895e+01+0.j, -9.83597424e+01+0.j, 5.12300663e+10+0.j,
2.16842202e+14+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j],
[ 3.00000000e+00+0.j, 4.00000000e+00+0.j, 8.17174515e-06+0.j,
3.50415512e-05+0.j, 9.98021154e+00+0.j, 6.31852135e+03+0.j,
2.50000000e+02+0.j, 2.50000000e+02+0.j, 1.00000000e+00+0.j,
0.00000000e+00+0.j, 1.00000000e+00+0.j, -3.60000000e+02+0.j,
3.60000000e+02+0.j, 2.91580054e+02+0.j, 8.23781584e+01+0.j,
3.89325814e+02+0.j, 2.83694180e+03+0.j, 7.35352911e+09+0.j,
2.35302643e+15+0.j, 0.00000000e+00+0.j, 0.00000000e+00+0.j,
0.00000000e+00+0.j, 0.00000000e+00+0.j]]),
'gen': array([[ 0.00000000e+00, 3.53122506e+08, 2.34719406e+03,
1.00000000e+09, -1.00000000e+09, 1.31388242e+00,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e-10, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
5.25424948e+03, 1.02797953e+04, 6.79172630e+03,
6.79161962e+03],
[ 4.00000000e+00, 3.53123867e+08, -3.87342276e+03,
1.00000000e+09, -1.00000000e+09, 3.13754278e-01,
1.00000000e+00, 1.00000000e+00, 1.00000000e+09,
-1.00000000e-10, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
5.25420475e+03, 1.02798852e+04, 6.79176856e+03,
6.79157736e+03],
[ 2.00000000e+00, 3.39074858e+00, 5.73116479e+03,
1.00000000e+09, -1.00000000e+09, -1.70105830e-01,
nan, 1.00000000e+00, 1.00000000e+03,
-1.00000000e-10, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
2.12931643e+06, 9.83899833e+05, 6.79162256e+03,
6.79172336e+03],
[ 1.00000000e+00, -4.03045990e-02, -2.35609481e+03,
1.00000000e+09, -1.00000000e+09, 1.08703858e+00,
nan, 1.00000000e+00, 1.00000000e-10,
-1.00000000e+03, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
1.14205827e+04, 1.41384059e+07, 6.79161959e+03,
6.79172633e+03]]),
'internal': {'Ybus': array([], dtype=complex128),
'Yf': array([], dtype=complex128),
'Yt': array([], dtype=complex128),
'branch_is': array([ True, True, True]),
'gen_is': array([ True, True, True, True]),
'DLF': array([], dtype=complex128),
'buses_ord_bfs_nets': array([], dtype=float64),
'ref_gens': array([0, 1])},
'gencost': array([[ 2., 0., 0., 2., 10., 0.],
[ 2., 0., 0., 2., 8., 0.],
[ 2., 0., 0., 0., 0., 0.],
[ 2., 0., 0., 0., 0., 0.]]),
'dcline': array([[0.5, 1. ]]),
'userfcn': {'formulation': [{'fcn': <function pandapower.optimal_powerflow._add_dcline_constraints(om, net)>,
'args': This pandapower network includes the following parameter tables:
- bus (5 elements)
- load (1 element)
- gen (2 elements)
- ext_grid (2 elements)
- line (3 elements)
- dcline (1 element)
- poly_cost (2 elements)
and the following results tables:
- res_bus (5 elements)
- res_line (3 elements)
- res_ext_grid (2 elements)
- res_load (1 element)
- res_gen (2 elements)
- res_dcline (1 element)}]},
'om':
VARIABLES name i1 iN N
========= ------ ----- ----- ------
0: Va 0 5 5
1: Vm 5 10 5
2: Pg 10 14 4
3: Qg 14 18 4
var['NS'] = 4 var['N'] = 18
NON-LINEAR CONSTRAINTS name i1 iN N
====================== ------ ----- ----- ------
0: Pmis 0 5 5
1: Qmis 5 10 5
2: Sf 10 13 3
3: St 13 16 3
nln.NS = 4 nln.N = 16
LINEAR CONSTRAINTS name i1 iN N
================== ------ ----- ----- ------
0: PQh 0 0 0
1: PQl 0 0 0
2: vl 0 0 0
3: ang 0 0 0
4: dcline 0 1 1
lin.NS = 5 lin.N = 1
COSTS : <none>
userdata =
{'Apqdata': {'h': array([], dtype=float64), 'l': array([], dtype=float64), 'ipql': array([], dtype=int64), 'ipqh': array([], dtype=int64)}, 'iang': array([], dtype=int64)},
'x': array([ 0.00000000e+00, 9.66613415e-02, 4.28005538e+00, -1.15907275e+00,
0.00000000e+00, 1.31388242e+00, 1.08703858e+00, -1.70105830e-01,
-3.31932204e-02, 3.13754278e-01, 3.53122506e+08, 3.53123867e+08,
3.39074858e+00, -4.03045990e-02, 2.34719406e+03, -3.87342276e+03,
5.73116479e+03, -2.35609481e+03]),
'mu': {'var': {'l': array([2.08469606e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
3.47758050e+18, 9.79347804e+10, 7.80971425e+10, 1.27085367e+13,
3.85739092e+11, 4.83869882e+20, 1.02797953e+04, 1.02798852e+04,
9.83899833e+05, 1.41384059e+07, 6.79161962e+03, 6.79157736e+03,
6.79172336e+03, 6.79172633e+03]),
'u': array([0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 9.85474186e+10, 8.19400890e+10, 5.14623575e+10,
6.05328201e+10, 7.82997692e+10, 5.25424948e+03, 5.25420475e+03,
2.12931643e+06, 1.14205827e+04, 6.79172630e+03, 6.79176856e+03,
6.79162256e+03, 6.79161959e+03])},
'nln': {'l': array([5.02224630e+03, 0.00000000e+00, 0.00000000e+00, 8.25272677e+15,
5.02304078e+03, 0.00000000e+00, 1.06737160e-01, 1.00801904e-01,
1.30159136e+16, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]),
'u': array([0.00000000e+00, 2.66312920e+07, 4.23112766e+07, 0.00000000e+00,
0.00000000e+00, 1.06682515e-01, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 1.91202698e-01, 1.03766523e+08, 5.12300663e+10,
7.35352911e+09, 1.04701391e+08, 2.16842202e+14, 2.35302643e+15])},
'lin': {'l': array([0.]), 'u': array([40758277.25647715])}},
'f': 6356216001.098068,
'var': {'val': {'Va': array([ 0. , 0.09666134, 4.28005538, -1.15907275, 0. ]),
'Vm': array([ 1.31388242, 1.08703858, -0.17010583, -0.03319322, 0.31375428]),
'Pg': array([ 3.53122506e+08, 3.53123867e+08, 3.39074858e+00, -4.03045990e-02]),
'Qg': array([ 2347.19405661, -3873.42275984, 5731.16478521, -2356.09481101])},
'mu': {'l': {'Va': array([2.08469606e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00,
3.47758050e+18]),
'Vm': array([9.79347804e+10, 7.80971425e+10, 1.27085367e+13, 3.85739092e+11,
4.83869882e+20]),
'Pg': array([1.02797953e+04, 1.02798852e+04, 9.83899833e+05, 1.41384059e+07]),
'Qg': array([6791.61961533, 6791.57735624, 6791.72335827, 6791.72632516])},
'u': {'Va': array([0., 0., 0., 0., 0.]),
'Vm': array([9.85474186e+10, 8.19400890e+10, 5.14623575e+10, 6.05328201e+10,
7.82997692e+10]),
'Pg': array([ 5254.24947742, 5254.20475499, 2129316.42587851,
11420.58270769]),
'Qg': array([6791.72629785, 6791.76855893, 6791.62255636, 6791.619588 ])}}},
'lin': {'mu': {'l': {'dcline': array([0.])},
'u': {'dcline': array([40758277.25647715])}}},
'nln': {'mu': {'l': {'Pmis': array([5.02224630e+03, 0.00000000e+00, 0.00000000e+00, 8.25272677e+15,
5.02304078e+03]),
'Qmis': array([0.00000000e+00, 1.06737160e-01, 1.00801904e-01, 1.30159136e+16,
0.00000000e+00]),
'Sf': array([0., 0., 0.]),
'St': array([0., 0., 0.])},
'u': {'Pmis': array([ 0. , 26631291.98680441, 42311276.62225478,
0. , 0. ]),
'Qmis': array([0.10668251, 0. , 0. , 0. , 0.1912027 ]),
'Sf': array([1.03766523e+08, 5.12300663e+10, 7.35352911e+09]),
'St': array([1.04701391e+08, 2.16842202e+14, 2.35302643e+15])}}},
'et': 0.43579602241516113,
'success': False,
'raw': {'xr': array([ 0.00000000e+00, 9.66613415e-02, 4.28005538e+00, -1.15907275e+00,
0.00000000e+00, 1.31388242e+00, 1.08703858e+00, -1.70105830e-01,
-3.31932204e-02, 3.13754278e-01, 3.53122506e+08, 3.53123867e+08,
3.39074858e+00, -4.03045990e-02, 2.34719406e+03, -3.87342276e+03,
5.73116479e+03, -2.35609481e+03]),
'pimul': array([ 5.02224630e+03, -2.66312920e+07, -4.23112766e+07, 8.25272677e+15,
5.02304078e+03, -1.06682515e-01, 1.06737160e-01, 1.00801904e-01,
1.30159136e+16, -1.91202698e-01, -1.03766523e+08, -5.12300663e+10,
-7.35352911e+09, -1.04701391e+08, -2.16842202e+14, -2.35302643e+15,
-4.07582773e+07, 2.08469606e+00, 0.00000000e+00, 0.00000000e+00,
0.00000000e+00, 3.47758050e+18, -6.12638178e+08, -3.84294654e+09,
1.26570743e+13, 3.25206271e+11, 4.83869882e+20, 5.02554586e+03,
5.02568044e+03, -1.14541659e+06, 1.41269853e+07, -1.06682515e-01,
-1.91202698e-01, 1.00801904e-01, 1.06737160e-01]),
'info': False,
'output': {'iterations': 14,
'hist': [{'feascond': 0.49999884066272154,
'gradcond': 417016083.7431096,
'compcond': 20.21933146970322,
'costcond': 0.0,
'gamma': 1,
'stepsize': 0,
'obj': 9000000000.0,
'alphap': 0,
'alphad': 0},
{'feascond': 0.4981502365268503,
'gradcond': 44456492.365925916,
'compcond': 20.219773380976193,
'costcond': 0.003697196295855314,
'gamma': 31476588.858320918,
'stepsize': 707105764.7299194,
'obj': 8966725196.36534,
'alphap': 0.0036972057076065648,
'alphad': 0.003672738719070787},
{'feascond': 0.49808785961003094,
'gradcond': 37704006.62833323,
'compcond': 20.222844195114146,
'costcond': 0.00012201163106607171,
'gamma': 31477563.046548188,
'stepsize': 707581473.4642133,
'obj': 8965631150.378693,
'alphap': 0.00012189530942332611,
'alphad': 1.2728721568511263e-07},
{'feascond': 0.4980860637843843,
'gradcond': 51682.95198931866,
'compcond': 20.24590094710802,
'costcond': 3.3123920870571332e-06,
'gamma': 31513341.06281615,
'stepsize': 734262960.3664153,
'obj': 8965601452.659891,
'alphap': 3.334727345199211e-06,
'alphad': 9.592639444352299e-05},
{'feascond': 0.41804302328797477,
'gradcond': 1112.452459418419,
'compcond': 24.06892429423366,
'costcond': 0.1607043076237469,
'gamma': 31443332.149790704,
'stepsize': 704403689.568567,
'obj': 7524789071.736648,
'alphap': 0.1607046988113518,
'alphad': 0.0054582143376218605},
{'feascond': 0.4164976861647349,
'gradcond': 1.3901589930451215,
'compcond': 24.21531356565491,
'costcond': 0.0036948851904617967,
'gamma': 31517700.280398306,
'stepsize': 591132825.9056278,
'obj': 7496985803.085287,
'alphap': 0.0036953838601206253,
'alphad': 0.005083230007783751},
{'feascond': 0.3675805435216759,
'gradcond': 1.14094298264662,
'compcond': 24.871270338747955,
'costcond': 0.11744846244398084,
'gamma': 28569481.4179212,
'stepsize': 589018084.2870417,
'obj': 6616475173.063943,
'alphap': 0.11744875252692424,
'alphad': 0.10117001009091242},
{'feascond': 0.36425313281503713,
'gradcond': 0.5892958140186203,
'compcond': 23.28520911486554,
'costcond': 0.009052158677915546,
'gamma': 26505456.81214866,
'stepsize': 519834555.429385,
'obj': 6556581699.387292,
'alphap': 0.009052247982621862,
'alphad': 0.09662887820189886},
{'feascond': 0.3571076414307114,
'gradcond': 0.4916365224590762,
'compcond': 23.427868217417252,
'costcond': 0.019616893958526643,
'gamma': 26144708.118719358,
'stepsize': 515132748.0521711,
'obj': 6427961735.291056,
'alphap': 0.01961697896894117,
'alphad': 0.0017025522515677798},
{'feascond': 0.3558091479520083,
'gradcond': 0.6448490990733495,
'compcond': 21.405500209433285,
'costcond': 0.0036361199457281804,
'gamma': 23800954.2635546,
'stepsize': 505025686.1824267,
'obj': 6404588859.053787,
'alphap': 0.0036361420553403883,
'alphad': 0.13032520576806103},
{'feascond': 0.3537305529240343,
'gradcond': 0.06119755918246213,
'compcond': 21.33285613318015,
'costcond': 0.005841898892060759,
'gamma': 23581607.051987942,
'stepsize': 503190010.90870523,
'obj': 6367173840.074987,
'alphap': 0.005841917627028036,
'alphad': 0.022698173577036126},
{'feascond': 0.35312281427854414,
'gradcond': 0.011816401962116514,
'compcond': 21.742300099315848,
'costcond': 0.0017180972298262685,
'gamma': 23992916.230558954,
'stepsize': 500251225.24712765,
'obj': 6356234399.157559,
'alphap': 0.0017180928091453669,
'alphad': 0.009843407421965754},
{'feascond': 0.35312220256391585,
'gradcond': 6.596764689454879e-05,
'compcond': 22.308606216653242,
'costcond': 1.7322965486866073e-06,
'gamma': 24617799.87184564,
'stepsize': 499387446.49214774,
'obj': 6356223388.257324,
'alphap': 1.7322331813766426e-06,
'alphad': 0.0018730618756014436},
{'feascond': 0.3531221841102401,
'gradcond': 1.308041830371412e-05,
'compcond': 20.15310136794319,
'costcond': 5.225313118962011e-08,
'gamma': 22239174.673701026,
'stepsize': 499390758.7873118,
'obj': 6356223056.124228,
'alphap': 5.226121929662763e-08,
'alphad': 0.0017166505167831134},
{'feascond': 0.3531216872959542,
'gradcond': 0.8256367313986872,
'compcond': 20.271600865961194,
'costcond': 1.1099382443388807e-06,
'gamma': 22369956.59218215,
'stepsize': 2136406537.1561425,
'obj': 6356216001.098068,
'alphap': 8.566796152739512e-07,
'alphad': 2.1574623271892913e-11}],
'message': 'Numerically failed',
'alg': 560}}}
Greetings, I downloaded pandapower 2.5.0 with Python 3.8.6. I am running tutorial opf_dcline.ipynb. When I run lines
the following error arises.
I do not change any lines of code from the published tutorial. All other tutorials work, just dc lines do not converge. Do you have any idea of the reason? I did not find any solutions and pp.diagnostic(net) find no issue Thank you