Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
618 B
1
Indexable
Never
def get_gabarito_anual(eesd: EESD.EESD, total_horas: int) -> dict:
    gabarito_dict = {}
    for h in range(total_horas):
        ang = np.array([])
        tensoes = np.array([])
        for barra in eesd.DSSCircuit.AllBusNames:
            eesd.DSSCircuit.Solution.Solve()
            eesd.DSSCircuit.SetActiveBus(barra)
            ang = np.concatenate([ang, eesd.DSSCircuit.Buses.puVmagAngle[1::2]*2*np.pi / 360])
            tensoes = np.concatenate([tensoes, eesd.DSSCircuit.Buses.puVmagAngle[::2]])
        gabarito_dict[f"hora_{h}"] = np.concatenate([ang[3:], tensoes[3:]])
    return gabarito_dict
Leave a Comment