Esempio n. 1
0
def _extract_single_results(net, ppc):
    reset_results(net, suffix="_sc")
    _get_single_bus_results(net, ppc)
    net["_options"]["ac"] = True
    net["_options"]["trafo_loading"] = "current"
    bus_lookup_aranged = _get_aranged_lookup(net)
    bus_pq = np.zeros(shape=(len(net["bus"].index), 2), dtype=np.float)
    _get_branch_results(net, ppc, bus_lookup_aranged, bus_pq, suffix="_sc")
Esempio n. 2
0
def _extract_single_results(net, ppc):
    for element in ["line", "trafo"]:
        net["res_%s_sc"%element] = pd.DataFrame(np.nan, index=net[element].index,
                                                columns=net["_empty_res_%s"%element].columns,
                                                dtype='float')
    _get_single_bus_results(net, ppc)
    net["_options"]["ac"] = True
    net["_options"]["trafo_loading"] = "current"
    bus_lookup_aranged = _get_aranged_lookup(net)
    bus_pq = np.zeros(shape=(len(net["bus"].index), 2), dtype=np.float)
    _get_branch_results(net, ppc, bus_lookup_aranged, bus_pq, suffix="_sc")
Esempio n. 3
0
def _extract_results_opf(net, ppc, is_elems, bus_lookup, trafo_loading,
                         return_voltage_angles):
    eg_is = is_elems['eg']
    gen_is = is_elems['gen']
    bus_is = is_elems['bus']

    _set_buses_out_of_service(ppc)
    bus_pq = _get_p_q_results_opf(net, ppc, bus_lookup,
                                  len(eg_is) + len(gen_is))
    _get_shunt_results(net, ppc, bus_lookup, bus_pq, bus_is)
    _get_branch_results(net, ppc, bus_lookup, bus_pq, trafo_loading)
    _get_gen_results(net, ppc, is_elems, bus_lookup, bus_pq,
                     return_voltage_angles)
    _get_bus_results(net, ppc, bus_lookup, bus_pq, return_voltage_angles)