Example #1
0
def transform_sigma_max(expr):
    X = only_arg(expr)
    m, n = dims(X)
    S = epi_var(expr, "sigma_max_S", size=(m+n, m+n))
    t = epi_var(expr, "sigma_max")
    t_In = expression.diag_vec(expression.multiply(expression.ones(n, 1), t))
    t_Im = expression.diag_vec(expression.multiply(expression.ones(m, 1), t))

    return t, [
        expression.eq_constraint(expression.index(S, 0, n, 0, n), t_In),
        expression.eq_constraint(expression.index(S, n, n+m, 0, n), X),
        expression.eq_constraint(expression.index(S, n, n+m, n, n+m), t_Im),
        expression.semidefinite(S)]
Example #2
0
def transform_sigma_max(expr):
    X = only_arg(expr)
    m, n = dims(X)
    S = epi_var(expr, "sigma_max_S", size=(m + n, m + n))
    t = epi_var(expr, "sigma_max")
    t_In = expression.diag_vec(expression.multiply(expression.ones(n, 1), t))
    t_Im = expression.diag_vec(expression.multiply(expression.ones(m, 1), t))

    return t, [
        expression.eq_constraint(expression.index(S, 0, n, 0, n), t_In),
        expression.eq_constraint(expression.index(S, n, n + m, 0, n), X),
        expression.eq_constraint(expression.index(S, n, n + m, n, n + m),
                                 t_Im),
        expression.semidefinite(S)
    ]
Example #3
0
def transform_lambda_max(expr):
    t = epi_var(expr, "lambda_max", size=(1,1))
    X = only_arg(expr)
    n = dim(X, 0)
    tI = expression.diag_vec(expression.multiply(expression.ones(n, 1), t))
    return t, [expression.psd_constraint(tI, X)]
Example #4
0
def transform_lambda_max(expr):
    t = epi_var(expr, "lambda_max", size=(1, 1))
    X = only_arg(expr)
    n = dim(X, 0)
    tI = expression.diag_vec(expression.multiply(expression.ones(n, 1), t))
    return t, [expression.psd_constraint(tI, X)]