https://9lib.org/document/y8gx8en2-efficient-calculation-of-sensitivities-for-optimization-problems.html