Repository: e2nIEE/pandapower

Issue:
fixed rundcpp with single bus network
csr_matrix dimesions has to be specified explicitly.

Issue #288 


Discussion:
# [Codecov](https://codecov.io/gh/e2nIEE/pandapower/pull/290?src=pr&el=h1) Report
> Merging [#290](https://codecov.io/gh/e2nIEE/pandapower/pull/290?src=pr&el=desc) into [develop](https://codecov.io/gh/e2nIEE/pandapower/commit/9a7046ccfb4d46ce724d7fc41fcd57dc53048b25?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/e2nIEE/pandapower/pull/290/graphs/tree.svg?width=650&token=BtSKQH12ry&height=150&src=pr)](https://codecov.io/gh/e2nIEE/pandapower/pull/290?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##           develop     #290      +/-   ##
===========================================
- Coverage    84.99%   84.98%   -0.01%     
===========================================
  Files           93       93              
  Lines        11242    11242              
===========================================
- Hits          9555     9554       -1     
- Misses        1687     1688       +1
```


| [Impacted Files](https://codecov.io/gh/e2nIEE/pandapower/pull/290?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandapower/pf/makeBdc.py](https://codecov.io/gh/e2nIEE/pandapower/pull/290/diff?src=pr&el=tree#diff-cGFuZGFwb3dlci9wZi9tYWtlQmRjLnB5) | `96.66% <100%> (ø)` | :arrow_up: |
| [pandapower/std\_types.py](https://codecov.io/gh/e2nIEE/pandapower/pull/290/diff?src=pr&el=tree#diff-cGFuZGFwb3dlci9zdGRfdHlwZXMucHk=) | `85.14% <0%> (-1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/e2nIEE/pandapower/pull/290?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/e2nIEE/pandapower/pull/290?src=pr&el=footer). Last update [9a7046c...e969024](https://codecov.io/gh/e2nIEE/pandapower/pull/290?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Thanks for investigating, your fix looks fine! Can you please also add a test for this? Simply add a new function that runs a DC PF for a single bus network and asserts convergence here: https://github.com/e2nIEE/pandapower/blob/develop/pandapower/test/loadflow/test_rundcpp.py

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@
     author_email='leon.thurner@uni-kassel.de, alexander.scheidler@iee.fraunhofer.de',
     description='Convenient Power System Modelling and Analysis based on PYPOWER and pandas',
     long_description=long_description,
-    url='www.pandapower.org',
+    url='http://www.pandapower.org',
     license='BSD',
     install_requires=["pypower>=5.0.1",
                       "pandas>=0.17.0",


Test patch:
diff --git a/pandapower/test/loadflow/test_rundcpp.py b/pandapower/test/loadflow/test_rundcpp.py
--- a/pandapower/test/loadflow/test_rundcpp.py
+++ b/pandapower/test/loadflow/test_rundcpp.py
@@ -88,5 +88,16 @@ def test_test_sn_kva():
             raise UserWarning("Result difference due to sn_kva after adding %s" % net1.last_added_case)
 
 
+def test_single_bus_network():
+    net = pp.create_empty_network()
+    b = pp.create_bus(net, vn_kv=20.)
+    pp.create_ext_grid(net, b)
+    
+    pp.runpp(net)
+    assert net.converged
+    
+    pp.rundcpp(net)
+    assert net.converged
+
 if __name__ == "__main__":
     pytest.main(["test_rundcpp.py", "-xs"])