Added a gate-aware route calculation