Text this: On Optimization Techniques for a Class of Hybrid Mechanical Systems