Discrete approximations to optimal trajectories using direct transcription and nonlinear programming | Synapse