You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running an optimization problem on some simulated data:
using LinearAlgebra, JuMP, Ipopt
d =10
n =1000
A = I +0.5*(rand(d,d)-0.5*ones(d,d))
A =Symmetric(A)
J =sqrt(A)
eps =randn(d,n)
z = J*eps
m =Model(with_optimizer(Ipopt.Optimizer))
@variable(m, theta >=0, start =1.0)
@variable(m, beta[1:d-1], start =0.0)
@NLobjective(m, Min, theta/n*sum( (z[1,j] +sum(beta[i-1] * z[i,j] for i=2:d))^2for j=1:n) -log(theta))
optimize!(m)
This code runs great when d=10, but change to d=100, and I get the following:
InexactError: Float64(0.3362800773416026 + 0.03631914074869952im)
Stacktrace:
[1] Type at .\complex.jl:37 [inlined]
[2] convert at .\number.jl:7 [inlined]
[3] push!(::Array{Float64,1}, ::Complex{Float64}) at .\array.jl:853
[4] _parse_NL_expr_runtime(::Model, ::Complex{Float64}, ::Array{JuMP._Derivatives.NodeData,1}, ::Int64, ::Array{Float64,1}) at C:\Users\<Username>\.julia\packages\JuMP\tyMag\src\parse_nlp.jl:171
[5] top-level scope at C:\Users\<Username>\.julia\packages\JuMP\tyMag\src\parse_expr.jl:358
Not sure what is going on here.
The text was updated successfully, but these errors were encountered:
I'm running an optimization problem on some simulated data:
This code runs great when d=10, but change to d=100, and I get the following:
Not sure what is going on here.
The text was updated successfully, but these errors were encountered: