Discrete-time optimal control problems with general constraints (ACM transactions on mathematical software, 1992)