def test_case6495rte():
    net = pn.case6495rte()
    assert net.converged
    pp.runpp(net, trafo_model='pi')
    assert len(net.bus) == 6495
    assert len(net.line) + len(net.trafo) == 9019
    assert len(net.ext_grid) + len(net.gen) + len(net.sgen) == 1650
    assert net.converged
Exemple #2
0
def test_case6495rte():
    net = pn.case6495rte()
    assert net.converged
    _ppc_element_test(net, 6495, 9019, 1650, 1372)
    # TODO make it work
    #     case = pn.case9241pegase()
    #     self._aux_test(case)

    def test_case2848rte(self):
        case = pn.case2848rte()
        self.tol = 0.1  # yeah this one is a bit tough... # TODO
        self._aux_test(case)

    def test_case6470rte(self):
        case = pn.case6470rte()
        self.tol = 1e-2
        self._aux_test(case)

    def test_case6495rte(self):
        case = pn.case6495rte()
        self.tol = 1e-2
        self._aux_test(case)

    def test_case6515rte(self):
        case = pn.case6515rte()
        self.tol = 1e-2
        self._aux_test(case)

    def test_case_illinois200(self):
        case = pn.case_illinois200()
        self._aux_test(case)

    def _aux_test(self, pn_net):
        with tempfile.TemporaryDirectory() as path:
            case_name = os.path.join(path, "this_case.json")