Skip to content

innovate.execute_scenario_grid

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

def execute_scenario_grid(data: pl.DataFrame | pl.LazyFrame, **payload: Any) -> dict[str, Any]: ...

Execute a native scenario grid using one shared table-derived time grid.

  • data: Polars table with a nonempty, finite, strictly increasing numeric time column without nulls. Lazy input is collected and IPC copies buffers. Other table columns are not injected into scenario payloads.
  • payload: Native scenario-grid fields, including a scenarios list. Each scenario needs a simulation mapping. Its inputs mapping must omit time and t because this wrapper supplies the grid.

Complete native grid envelope with execution and comparison results. Inspect individual execution errors even when the outer request succeeds.

  • NativeError: If the native grid request returns an outer error.
  • ValueError: If the grid, scenario schema, IPC or JSON values are invalid.
  • TypeError: If input is not a Polars frame or payload serialization fails.
  • polars.exceptions.PolarsError: If collection or serialization fails.