return_best_combination_details
site.SiteSolutionSet.return_best_combination_details(sort_by=None, top_n=1)Return details of the top-ranked solution(s).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| sort_by | str | Column name to rank the solutions by before selecting the top entries. If None, the existing order of solution_df, which is based on the objective selected, is used. |
None |
| top_n | int | Number of top solutions to return. | 1 |
Returns
| Name | Type | Description |
|---|---|---|
| pandas.DataFrame | DataFrame containing the top top_n solutions, including all available columns. The index is reset in the returned DataFrame. |
Notes
Sort direction is resolved from the metric, so “top” always means best: coverage proportions are ranked highest-first, and every other reported metric is a travel cost and is ranked lowest-first.