src.eddie.digitaltwin.check_cache_results

This script checks the cache for a matching model output for given input parameters, and retrieves the model_id if a match is found.

Attributes

log

Functions

main(→ int | None)

Search the cache for model input generated with identical scenario_options and a selected polygon which contains

Module Contents

src.eddie.digitaltwin.check_cache_results.log
src.eddie.digitaltwin.check_cache_results.main(selected_polygon: geopandas.GeoDataFrame, scenario_options: dict) int | None

Search the cache for model input generated with identical scenario_options and a selected polygon which contains this function’s selected_polygon.

Parameters:
  • selected_polygon (gpd.GeoDataFrame) – The area of interest to search the cache for. Positive results if the cached polygon contains this polygon.

  • scenario_options (dict) – The model input parameters, which must match exactly with the cached results for a positive match.

Returns:

Returns the matching model_id if a match is found. Otherwise, None.

Return type:

int | None