See How can you get the Lagrange/KKT multipliers out of JuMP when using Ipopt? - #3 by stevengj and Lagrangian Function - #19 by stevengj