User defined operator in JuMP when one of the arguments is data

Hi there,

I need to solve for a MLE problem where the likelihood function I defined reads in an Array{Obs{Float64}} where Obs{Float64} is an immutable struct containing a bunch of numbers.

Since my problem involves a constraint, I am trying to solve it via JuMP but its seems like non-linear user defined operators can only be defined with the args being the optimizing variables.

ll(x)  = ll(x, data)

Causes type-instability and therefore makes the function evaluation much slower. Is there an easy way around this? It seems like user defined functions in general might have the same issue.

1 Like

Cann you provide a reproducible example of what you are doing?