add_additional_data
site.SiteProblem.add_additional_data(
df,
column_of_interest,
common_col,
label,
direction,
)Append a user-defined dataset to be tracked during optimization.
Allows analysts to register secondary spatial or tabular datasets (e.g., additional travel matrices, mileage, CO2, additional demand) to evaluate trade-offs alongside the primary optimization metrics.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| df | pandas.DataFrame or geopandas.GeoDataFrame | The input dataset containing the secondary metric attributes. This dataframe may contain multiple columns, but only a single column can be added at a time, which is specified as column_of_interest. | required |
| column_of_interest | str | The name of the column containing the required metric. This is the only column that will be included. | required |
| common_col | str | The name of the column in the dataset used to join or map the data back to the demand regions or candidate facility sites. | required |
| label | str | A unique human-readable identifier for the dataset (e.g., ‘distance_matrix’), which will serve as the column header in the final wide results matrix. | required |
| direction | (higher_better, lower_better) | The optimization objective direction. Determines whether the library should maximize (‘higher_better’) or minimize (‘lower_better’) this metric during downstream trade-off calculations or Pareto sorting. | 'higher_better' |
Returns
| Name | Type | Description |
|---|---|---|
| None |