We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24fbe56 commit 68cc920Copy full SHA for 68cc920
pymmrouting/routeplanner.py
@@ -8,6 +8,7 @@
8
from .routingresult import RoutingResult, RawMultimodalPath, ModePath
9
from .orm_graphmodel import Session, Mode, SwitchType
10
from .settings import PGBOUNCER_CONF, LIB_MMSPA_CONF
11
+from operator import itemgetter
12
import time
13
import logging
14
@@ -157,6 +158,7 @@ def refine_results(self, results):
157
158
# is found in the result path. Such a path will be eliminated.
159
continue
160
refined_results.append(r)
161
+ refined_results.sort(key=itemgetter('duration'))
162
results['routes'] = refined_results
163
return results
164
0 commit comments