Text this: Variable Time Step Algorithm for Transient Response Analysis for Control and Optimization