Active set and list of (NL) constraints in JuMP

Here is where getdual is defined for non-linear constraints:
https://github.com/JuliaOpt/JuMP.jl/blob/2cab520104c8742a30b99a48075d2d636d6acd64/src/nlp.jl#L55-L64
You could access .nlconstrDuals, but this is pretty fragile so we wouldn’t recommend it.

The proper way to do this would be either to access the constraints from the model dictionary like you’re doing, or to maintain your own datastructure that stores all of the constraint references.

1 Like