Пример #1
0
def test_missing_gen():
    net = nw.case4gs()
    pp.rundcpp(net)
    res_gen = copy.deepcopy(net.res_gen.values)
    net.pop("res_gen")
    pp.rundcpp(net)
    assert np.allclose(net.res_gen.values, res_gen, equal_nan=True)
def test_case4gs():
    net = pn.case4gs()
    assert net.converged
    pp.runpp(net, trafo_model='pi')
    assert len(net.bus) == 4
    assert len(net.line) + len(net.trafo) == 4
    assert len(net.ext_grid) + len(net.gen) + len(net.sgen) == 2
    assert net.converged
def create_4GS_PV_Wind_Storage():
    """
    creates a simple 4 node network fitted for providing cranking power to 
    islanded areas i.e. storage units are treated as slack nodes
    
    Return
    -------
    4 node pp network
    """
    net = nw.case4gs()
    net["gen"].drop(0, inplace=True)

    pp.create_storage(net, 1, p_mw=-50, max_e_mwh=10)
    pp.create_gen(net, 1, p_mw=0, slack=True, type="bat")
    pp.create_sgen(net, 2, p_mw=500, type="solar")
    pp.create_sgen(net, 3, p_mw=500, type="wind")

    net.load.p_mw = 0.5 * net.load.p_mw

    return net
Пример #4
0
def test_case4gs():
    net = pn.case4gs()
    assert net.converged
    _ppc_element_test(net, 4, 4, 2, False)
Пример #5
0
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 16 00:41:38 2020

@author: mferr
"""


import pandapower.networks as pn
import pandapower as pp

net = pn.case4gs()

pp.runpp(net)

print(net.bus)
print(net)
print(net.res_bus)

#Result tables
print('==== External Grid ====')
print(net.res_ext_grid)
print('==== Lines info ====')
print(net.res_line)
print('==== Load info ====')
print(net.res_load)