Exemple #1
0
def solve(casefile):
    """ given a matpower casefile, solves the power flow using the Jabr method
        and returns a dictionary mapping bus number to
        (voltage magnitude, voltage angle) tuples. angles are in radians
    """
    case = load_case(casefile)
    u, R, I = build_gurobi_model(case)
    V, theta = recover_original_variables(u, I)
    i2e = case.i2e
    answer = {i2e[i]: (v, t) for (i, (v, t)) in enumerate(zip(V, theta))}
    return answer
Exemple #2
0
def solve(casefile):
    """ given a matpower casefile, solves the power flow using the Jabr method
        and returns a dictionary mapping bus number to
        (voltage magnitude, voltage angle) tuples. angles are in radians
    """
    case = load_case(casefile)
    u, R, I = build_gurobi_model(case)
    V, theta = recover_original_variables(u, I)
    i2e = case.i2e
    answer = {i2e[i]: (v, t) for (i, (v, t)) in enumerate(zip(V, theta))}
    return answer
def case118():
    c = CASE_DIRECTORY + 'case118_v2.m'
    return load_case(c)
def case14():
    c = CASE_DIRECTORY + 'case14_tree.m'
    return load_case(c)
def case5q():
    c = CASE_DIRECTORY + 'case5_with_q.m'
    return load_case(c)
def case5():
    c = CASE_DIRECTORY + 'case5_renumber_tree.m'
    return load_case(c)