Text this: Optimal control of piecewise continuous stochastic processes /