use indexing syntax to extract variables from JuMP.model

This commit is contained in:
kalmar 2017-06-09 11:57:56 +02:00
parent 01fbd037c3
commit c98e853268

View File

@ -113,7 +113,7 @@ function constrLHS(m::JuMP.Model, data::OrbitData, t)
end
function addconstraints!(m::JuMP.Model, data::OrbitData, l::Int=length(data.cnstr); var::Symbol = )
λ = getvariable(m, var)
λ = m[var]
for t in 1:l
d, = data.laplacian[t], data.laplacianSq[t]
lhs = constrLHS(m, data, t)
@ -153,7 +153,7 @@ end
function λandP(m::JuMP.Model, data::OrbitData)
info(PropertyT.logger, "Solving SDP problem...")
varλ = JuMP.getvariable(m, )
varλ = m[]
varP = data.Ps
λ, P = PropertyT.λandP(data.name, m, varλ, varP)