def test_case6515rte():
    net = pn.case6515rte()
    assert net.converged
    pp.runpp(net, trafo_model='pi')
    assert len(net.bus) == 6515
    assert len(net.line) + len(net.trafo) == 9037
    assert len(net.ext_grid) + len(net.gen) + len(net.sgen) == 1651
    assert net.converged
Exemple #2
0
def test_case6515rte():
    net = pn.case6515rte()
    assert net.converged
    _ppc_element_test(net, 6515, 9037, 1651, 1388)
        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")
            pp.to_json(pn_net, case_name)

            real_init_file = pp.from_json(case_name)
            backend = LightSimBackend()
            with warnings.catch_warnings():