Time-optimal control in a single machine problem with resource constraints