Text this: Calculus of Variations and Nonlinear Optimization Based Algorithm for Optimal Control of Hybrid Systems with Controlled Switching