Example #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
Example #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
Example #3
0
def case118():
    c = CASE_DIRECTORY + 'case118_v2.m'
    return load_case(c)
Example #4
0
def case14():
    c = CASE_DIRECTORY + 'case14_tree.m'
    return load_case(c)
Example #5
0
def case5q():
    c = CASE_DIRECTORY + 'case5_with_q.m'
    return load_case(c)
Example #6
0
def case5():
    c = CASE_DIRECTORY + 'case5_renumber_tree.m'
    return load_case(c)