How to use the pandapower.from_json function in pandapower

To help you get started, we’ve selected a few pandapower examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
def case_ieee30():
    """
    This function calls the json file case_ieee30.json which data origin is \
    `MATPOWER `_. The MATPOWER data are derived from
    `Washington IEEE 30 bus Case `_.
    Additional information about this network are available at `Illinois University case 30 `_.

    OUTPUT:
         **net** - Returns the required ieee network case30

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case_ieee30()
    """
    case_ieee30 = pp.from_json(_get_cases_path("case_ieee30.json"))
    return case_ieee30
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
"""
    Calls the json file case300.json which data origin is \
    `PYPOWER `_.
    Some more information about this network are given by \
    `Washington case 300 `_ \
    and `Illinois University case 300 `_.

    OUTPUT:
         **net** - Returns the required ieee network case300

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case300()
    """
    case300 = pp.from_json(_get_cases_path("case300.json"))
    return case300
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
"""
    Calls the json file GBreducednetwork.json which data is provided by `W. A. Bukhsh, Ken \
    McKinnon, Network data of real transmission networks, April 2013  \
    `_.
    This data is a representative model of electricity transmission network in Great Britain (GB). \
    It was originally developed at the University of Strathclyde in 2010.

    OUTPUT:
         **net** - Returns the required ieee network GBreducednetwork

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.GBreducednetwork()
    """
    GBreducednetwork = pp.from_json(_get_cases_path("GBreducednetwork.json"))
    return GBreducednetwork
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
**ref_bus_idx** - Since the MATPOWER case provides a reference bus without connected \
            generator, because a distributed slack is assumed, to convert the data to pandapower, \
            another bus has been assumed as reference bus. Via 'ref_bus_idx' the User can choose a \
            reference bus, which should have a generator connected to. Please be aware that by \
            changing the reference bus to another bus than the proposed default value, maybe a \
            powerflow does not converge anymore!

    OUTPUT:
         **net** - Returns the required ieee network case2848rte

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case2848rte()
    """
    case2848rte = pp.from_json(_get_cases_path("case2848rte.json"))
    if ref_bus_idx != 271:  # change reference bus
        _change_ref_bus(case2848rte, ref_bus_idx, ext_grid_p=[-44.01e3])
    return case2848rte
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
def case4gs():
    """
    This is the 4 bus example from J. J. Grainger and W. D. Stevenson, Power system analysis. \
    McGraw-Hill, 1994. pp. 337-338. Its data origin is \
    `PYPOWER `_.

    OUTPUT:
         **net** - Returns the required ieee network case4gs

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case4gs()
    """
    case4gs = pp.from_json(_get_cases_path("case4gs.json"))
    return case4gs
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
def case5():
    """
    This is the 5 bus example from F.Li and R.Bo, "Small Test Systems for Power System Economic \
    Studies" Its data origin is `MATPOWER `_.

    OUTPUT:
         **net** - Returns the required ieee network case4gs

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case5()
    """
    case5 = pp.from_json(_get_cases_path("case5.json"))
    return case5
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
def case_illinois200():
    """
    This function calls the json file case_illinois200.json which data origin is \
    `MATPOWER `_. This network was published in \
    A.B. Birchfield, T. Xu, K.M. Gegner, K.S. Shetye, T.J. Overbye, "Grid Structural Characteristics as Validation Criteria for Synthetic Networks," IEEE Transactions on Power Systems, 2017.
    Some additional information about this network are available at `Illinois University Illinois 200 `_.

    OUTPUT:
         **net** - Returns the required ieee network case30

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case_illinois200()
    """
    case_illinois200 = pp.from_json(_get_cases_path("case_illinois200.json"))
    return case_illinois200
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
**ref_bus_idx** - Since the MATPOWER case provides a reference bus without connected \
            generator, because a distributed slack is assumed, to convert the data to pandapower, \
            another bus has been assumed as reference bus. Via 'ref_bus_idx' the User can choose a \
            reference bus, which should have a generator connected to. Please be aware that by \
            changing the reference bus to another bus than the proposed default value, maybe a \
            powerflow does not converge anymore!

    OUTPUT:
         **net** - Returns the required ieee network case6515rte

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case6515rte()
    """
    case6515rte = pp.from_json(_get_cases_path("case6515rte.json"))
    if ref_bus_idx != 6171:  # change reference bus
        _change_ref_bus(case6515rte, ref_bus_idx, ext_grid_p=-2850.78e3)
    return case6515rte
github e2nIEE / pandapower / pandapower / networks / power_system_test_cases.py View on Github external
The data origin i the paper `C. Josz, S. Fliscounakis, J. Maenght, P. Panciatici, AC power \
    flow data in MATPOWER and QCQP format: iTesla, RTE snapshots, and PEGASE \
    `_, 2016 and S. Fliscounakis, P. Panciatici, F. Capitanescu, \
    and L. Wehenkel, Contingency ranking with respect to overloads in very large power systems \
    taking into account uncertainty, preventive, and corrective actions, IEEE Transactions on \
    Power Systems, vol. 28, no. 4, pp. 4909-4917, Nov 2013..

    OUTPUT:
         **net** - Returns the required ieee network case2869pegase

    EXAMPLE:
         import pandapower.networks as pn

         net = pn.case2869pegase()
    """
    case2869pegase = pp.from_json(_get_cases_path("case2869pegase.json"))
    return case2869pegase
github e2nIEE / pandapower / pandapower / networks / mv_oberrhein.py View on Github external
**include_substations** - (bool, False): if True, the transformers of the MV/LV level are
        modelled, otherwise the loads representing the LV networks are connected directly to the
        MV node

    OUTPUT:
         **net** - pandapower network

    EXAMPLE:

    import pandapower.networks
    net = pandapower.networks.mv_oberrhein("generation")
    """
    if include_substations:
        net = pp.from_json(os.path.join(pp_dir, "networks", "mv_oberrhein_substations.json"))
    else:
        net = pp.from_json(os.path.join(pp_dir, "networks", "mv_oberrhein.json"))
    net.load.q_mvar = np.tan(np.arccos(cosphi_load)) * net.load.p_mw
    net.sgen.q_mvar = np.tan(np.arccos(cosphi_pv)) * net.sgen.p_mw

    hv_trafos = net.trafo[net.trafo.sn_mva > 1].index
    if scenario == "load":
        net.load.scaling = 0.6
        net.sgen.scaling = 0.0
        net.trafo.tap_pos.loc[hv_trafos] = [-2, -3]
    elif scenario == "generation":
        net.load.scaling = 0.1
        net.sgen.scaling = 0.8
        net.trafo.tap_pos.loc[hv_trafos] = [0, 0]
    else:
        raise ValueError("Unknown scenario %s - chose 'load' or 'generation'" % scenario)

    pp.runpp(net)