Driver arrival and detention

We can compare shipping rates, but the cheapest carrier misses our delivery window. How should the software choose?