site.EvaluatedCombination
site.EvaluatedCombination(
solution_type,
site_names,
site_indices,
evaluated_combination_df,
site_problem,
coverage_threshold=None,
)Container for results and summary metrics of an evaluated site combination.
This class stores the outcome of evaluating a candidate solution (i.e., a set of selected sites) against a demand dataset, and computes a range of summary statistics based on the minimum cost (e.g., travel time or distance) from demand locations to the selected sites.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| solution_type | str | Label describing the type of solution (e.g., optimisation method or scenario). | required |
| site_names | list of str | Names of the selected sites in the solution. | required |
| site_indices | list of int | Indices of the selected sites corresponding to the original site list. | required |
| evaluated_combination_df | pandas.DataFrame | DataFrame containing evaluation results for each demand point. Must include: - “min_cost”: Minimum cost from each demand point to the selected sites. - “within_threshold”: Boolean indicator of whether the demand point is within the specified coverage threshold. - A demand column specified by site_problem._demand_data_demand_col. |
required |
| site_problem | object | Object containing problem configuration and metadata, including the name of the demand column via _demand_data_demand_col. |
required |
| coverage_threshold | float | Threshold used to determine whether a demand point is considered covered. If provided, used to compute the proportion of demand points within coverage. | None |
Attributes
| Name | Type | Description |
|---|---|---|
| solution_type | str | Type or label of the solution. |
| site_names | list of str | Names of the selected sites. |
| site_indices | list of int | Indices of the selected sites. |
| evaluated_combination_df | pandas.DataFrame | DataFrame containing per-demand-point evaluation results. |
| site_problem | object | Problem definition object. |
| coverage_threshold | float or None | Coverage threshold used in evaluation. |
| weighted_average | float | Demand-weighted average of the minimum cost. |
| unweighted_average | float | Simple (unweighted) average of the minimum cost. |
| percentile_90th | float | 90th percentile of the minimum cost distribution. |
| max | float | Maximum minimum cost across all demand points. |
| proportion_within_coverage_threshold | float | Proportion of demand points that fall within the coverage threshold. |
Notes
The weighted average is computed using demand values as weights.