Optimal resource allocation for single machine scheduling problems with time and resource dependent processing times.