From 6247f97a56c984c23c149089eded1eddba1c2c99 Mon Sep 17 00:00:00 2001 From: kalmar Date: Sat, 11 Feb 2017 13:38:02 +0100 Subject: [PATCH] use JuMP explicitly in model generation --- property(T).jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/property(T).jl b/property(T).jl index 95f43ab..1fce2f1 100644 --- a/property(T).jl +++ b/property(T).jl @@ -57,14 +57,14 @@ function create_SDP_problem(matrix_constraints, Δ::GroupAlgebraElement) N = size(Δ.product_matrix,1) const Δ² = Δ*Δ @assert length(Δ) == length(matrix_constraints) - m = Model(); - @variable(m, A[1:N, 1:N], SDP) - @SDconstraint(m, A >= zeros(size(A))) - @variable(m, κ >= 0.0) - @objective(m, Max, κ) + m = JuMP.Model(); + JuMP.@variable(m, A[1:N, 1:N], SDP) + JuMP.@SDconstraint(m, A >= zeros(size(A))) + JuMP.@variable(m, κ >= 0.0) + JuMP.@objective(m, Max, κ) for (pairs, δ², δ) in zip(matrix_constraints, Δ².coefficients, Δ.coefficients) - @constraint(m, sum(A[i,j] for (i,j) in pairs) == δ² - κ*δ) + JuMP.@constraint(m, sum(A[i,j] for (i,j) in pairs) == δ² - κ*δ) end return m end