Ejemplo n.º 1
0
def test_pm_tnep_cigre_only_conversion():
    # get the grid
    net = cigre_grid()
    # add the possible new lines
    define_possible_new_lines(net)
    # check if max line loading percent is violated (should be)
    pp.runpp(net)
    print("Max line loading prior to optimization:")
    print(net.res_line.loading_percent.max())
    assert np.any(net["res_line"].loc[:, "loading_percent"] >
                  net["line"].loc[:, "max_loading_percent"])

    # run power models tnep optimization
    convert_pp_to_pm(net)
Ejemplo n.º 2
0
def test_pp_to_pm_conversion(net_3w_trafo_opf):
    # tests if the conversion to power models works
    net = net_3w_trafo_opf
    pm_S = convert_pp_to_pm(net)
    pm_I = convert_pp_to_pm(net, opf_flow_lim="I")
Ejemplo n.º 3
0
def test_pp_to_pm_conversion(net_3w_trafo_opf):
    # tests if the conversion to power models works
    net = net_3w_trafo_opf
    pm = convert_pp_to_pm(net)