Text this: On the optimal control of systems evolving with state suprema