Nonlinear programs Introduction Simple examples Portfolio optimization Rocket Control Optimal control for a Space Shuttle reentry trajectory Tips and tricks User-defined Hessians Nested optimization problems Computing Hessians Mixed complementarity problems Classifiers Automatic differentiation of user-defined operators