Heuristic method for satisfying both deadlines and resource constraints