Run simulator routines

async AsyncCogniteClient.simulators.routines.run(
routine_external_id: str | None = None,
routine_revision_external_id: str | None = None,
model_revision_external_id: str | None = None,
inputs: Sequence[SimulationInputOverride] | None = None,
run_time: int | None = None,
queue: bool | None = None,
log_severity: Literal['Debug', 'Information', 'Warning', 'Error'] | None = None,
wait: bool = True,
timeout: float = 60,
) SimulationRun

Run a simulation

Run a simulation for a given simulator routine. Supports two modes: 1. By routine external ID only 2. By routine revision external ID + model revision external ID

Parameters:
  • routine_external_id (str | None) – External id of the simulator routine to run. Cannot be specified together with routine_revision_external_id and model_revision_external_id.

  • routine_revision_external_id (str | None) – External id of the simulator routine revision to run. Must be specified together with model_revision_external_id.

  • model_revision_external_id (str | None) – External id of the simulator model revision. Must be specified together with routine_revision_external_id.

  • inputs (Sequence[SimulationInputOverride] | None) – List of input overrides

  • run_time (int | None) – Run time in milliseconds. Reference timestamp used for data pre-processing and data sampling.

  • queue (bool | None) – Queue the simulation run when connector is down.

  • log_severity (Literal['Debug', 'Information', 'Warning', 'Error'] | None) – Override the minimum severity level for the simulation run logs. If not provided, the minimum severity is read from the connector logger configuration.

  • wait (bool) – Wait until the simulation run is finished. Defaults to True.

  • timeout (float) – Timeout in seconds for waiting for the simulation run to finish. Defaults to 60 seconds.

Returns:

Created simulation run

Return type:

SimulationRun

Examples

Create new simulation run using routine external ID:
>>> from cognite.client import CogniteClient, AsyncCogniteClient
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> run = client.simulators.routines.run(
...     routine_external_id="routine1", log_severity="Debug"
... )
Create new simulation run using routine and model revision external IDs:
>>> run = client.simulators.routines.run(
...     routine_revision_external_id="routine_revision1",
...     model_revision_external_id="model_revision1",
... )