Simulators
SimulatorsAPI
|
Simulator Integrations
Simulator Models
Simulator Model Revisions
|
|
|
Simulator Routines
Simulator Routine Revisions
|
|
|
|
|
Simulation Runs
Simulator Logs
Data classes
- class cognite.client.data_classes.simulators.SimulationInput(
- reference_id: str,
- value: str | int | float | list[str] | list[int] | list[float],
- value_type: Literal['STRING', 'DOUBLE', 'STRING_ARRAY', 'DOUBLE_ARRAY'],
- unit: SimulationValueUnitName | None = None,
- simulator_object_reference: dict[str, str] | None = None,
- timeseries_external_id: str | None = None,
- overridden: bool | None = None,
Bases:
SimulationValueBaseThis class is used to define the value and its type. The value can be a string, double, array of strings or array of doubles.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulationInputOverride(
- reference_id: 'str',
- value: 'str | int | float | list[str] | list[int] | list[float]',
- unit: 'SimulationValueUnitName | None' = None,
Bases:
CogniteResource- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulationOutput(
- reference_id: str,
- value: str | int | float | list[str] | list[int] | list[float],
- value_type: Literal['STRING', 'DOUBLE', 'STRING_ARRAY', 'DOUBLE_ARRAY'],
- unit: SimulationValueUnitName | None = None,
- simulator_object_reference: dict[str, str] | None = None,
- timeseries_external_id: str | None = None,
Bases:
SimulationValueBaseThis class is used to return the outputs generated during the simulation. The value can be a string, double, array of strings or array of doubles.
- class cognite.client.data_classes.simulators.SimulationRun(
- id: int,
- simulator_external_id: str,
- simulator_integration_external_id: str | None,
- model_external_id: str,
- model_revision_external_id: str,
- routine_revision_external_id: str,
- routine_external_id: str,
- run_type: Literal['external', 'manual', 'scheduled'],
- status: Literal['ready', 'running', 'success', 'failure'],
- data_set_id: int,
- user_id: str,
- log_id: int,
- created_time: int,
- last_updated_time: int,
- status_message: str | None = None,
- simulation_time: int | None = None,
- run_time: int | None = None,
Bases:
WriteableCogniteResourceWithClientRef[SimulationRunWrite]Every time a simulation routine executes, a simulation run object is created.
This object ensures that each execution of a routine is documented and traceable. Each run has an associated simulation data resource, which stores the inputs and outputs of a simulation run, capturing the values set into and read from the simulator model to ensure the traceability and integrity of the simulation data.
Simulation runs provide a historical record of the simulations performed, allowing users to analyze and compare different runs, track changes over time, and make informed decisions based on the simulation results.
This is the read/response format of a simulation run.
- Parameters:
id (int) – The id of the simulation run
simulator_external_id (str) – External id of the associated simulator
simulator_integration_external_id (str | None) – External id of the associated simulator integration
model_external_id (str) – External id of the associated simulator model
model_revision_external_id (str) – External id of the associated simulator model revision
routine_revision_external_id (str) – External id of the associated simulator routine revision
routine_external_id (str) – External id of the associated simulator routine
run_type (Literal['external', 'manual', 'scheduled']) – The type of the simulation run
status (Literal['ready', 'running', 'success', 'failure']) – The status of the simulation run
data_set_id (int) – The id of the dataset associated with the simulation run
user_id (str) – The id of the user who executed the simulation run
log_id (int) – The id of the log associated with the simulation run
created_time (int) – The number of milliseconds since epoch
last_updated_time (int) – The number of milliseconds since epoch
status_message (str | None) – The status message of the simulation run
simulation_time (int | None) – Simulation time in milliseconds. Timestamp when the input data was sampled. Used for indexing input and output time series.
run_time (int | None) – Run time in milliseconds. Reference timestamp used for data pre-processing and data sampling.
- get_data() SimulationRunDataItem | None
Retrieve data associated with this simulation run.
- Returns:
Data for the simulation run.
- Return type:
SimulationRunDataItem | None
- async get_data_async() SimulationRunDataItem | None
Retrieve data associated with this simulation run.
- Returns:
Data for the simulation run.
- Return type:
SimulationRunDataItem | None
- get_logs() SimulatorLog | None
Retrieve logs for this simulation run.
- Returns:
Log for the simulation run.
- Return type:
SimulatorLog | None
- async get_logs_async() SimulatorLog | None
Retrieve logs for this simulation run.
- Returns:
Log for the simulation run.
- Return type:
SimulatorLog | None
- update() None
Update the simulation run object to the latest state. Useful if the run was created with wait=False.
- async update_async() None
Update the simulation run object to the latest state. Useful if the run was created with wait=False.
- wait(timeout: float = 60) None
Waits for simulation status to become either success or failure. This is generally not needed to call directly, as client.simulators.routines.run(…) will wait for the simulation to finish by default.
- Parameters:
timeout (float) – Time out after this many seconds. Defaults to 60 seconds.
- async wait_async(timeout: float = 60) None
Waits for simulation status to become either success or failure. This is generally not needed to call directly, as client.simulators.routines.run(…) will wait for the simulation to finish by default.
- Parameters:
timeout (float) – Time out after this many seconds. Defaults to 60 seconds.
- class cognite.client.data_classes.simulators.SimulationRunDataItem(
- run_id: int,
- inputs: list[SimulationInput],
- outputs: list[SimulationOutput],
Bases:
CogniteResource- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- to_pandas() pandas.DataFrame
Convert the simulation run data to a pandas DataFrame.
- Returns:
The dataframe.
- Return type:
pandas.DataFrame
- class cognite.client.data_classes.simulators.SimulationRunDataList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulationRunDataItem],IdTransformerMixin- to_pandas() pandas.DataFrame
Convert the simulation run data list to a pandas DataFrame.
- Returns:
The dataframe.
- Return type:
pandas.DataFrame
- class cognite.client.data_classes.simulators.SimulationRunList(
- resources: Sequence[T_CogniteResource],
Bases:
WriteableCogniteResourceList[SimulationRunWrite,SimulationRun],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulationRunWrite(
- routine_external_id: str | None = None,
- routine_revision_external_id: str | None = None,
- model_revision_external_id: str | None = None,
- run_type: str | None = None,
- run_time: int | None = None,
- queue: bool | None = None,
- log_severity: str | None = None,
- inputs: list[SimulationInputOverride] | None = None,
Bases:
WriteableCogniteResource[SimulationRunWrite]Request to run a simulator routine asynchronously.
This class supports two modes of running simulations: 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 associated simulator routine. Cannot be specified together with routine_revision_external_id and model_revision_external_id.
routine_revision_external_id (str | None) – External id of the associated simulator routine revision. Must be specified together with model_revision_external_id.
model_revision_external_id (str | None) – External id of the associated simulator model revision. Must be specified together with routine_revision_external_id.
run_type (str | None) – The type of the simulation run
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 (str | None) – Override the minimum severity level for the simulation run logs. If not provided, the minimum severity is read from the connector logger configuration.
inputs (list[SimulationInputOverride] | None) – List of input overrides
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulationRunWriteList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulationRunWrite],ExternalIDTransformerMixin
- class cognite.client.data_classes.simulators.SimulationValueUnit(name: 'str | None' = None, external_id: 'str | None' = None)
Bases:
SimulationValueUnitName
- class cognite.client.data_classes.simulators.SimulationValueUnitInput(name: str, quantity: str | None = None)
Bases:
CogniteResourceThe unit of the simulation value.
- Parameters:
name (str) – The name of the unit.
quantity (str | None) – The quantity of the unit.
- class cognite.client.data_classes.simulators.SimulationValueUnitName(name: 'str | None' = None)
Bases:
CogniteResource
- class cognite.client.data_classes.simulators.Simulator(
- external_id: str,
- id: int,
- name: str,
- file_extension_types: Sequence[str],
- model_types: Sequence[SimulatorModelType] | None = None,
- model_dependencies: Sequence[SimulatorModelDependency] | None = None,
- step_fields: Sequence[SimulatorStep] | None = None,
- unit_quantities: Sequence[SimulatorQuantity] | None = None,
Bases:
CogniteResourceThe simulator resource contains the definitions necessary for Cognite Data Fusion (CDF) to interact with a given simulator.
It serves as a central contract that allows APIs, UIs, and integrations (connectors) to utilize the same definitions when dealing with a specific simulator. Each simulator is uniquely identified and can be associated with various file extension types, model types, step fields, and unit quantities. Simulators are essential for managing data flows between CDF and external simulation tools, ensuring consistency and reliability in data handling.
This is the read/response format of the simulator.
- Parameters:
external_id (str) – External id of the simulator
id (int) – Id of the simulator.
name (str) – Name of the simulator
file_extension_types (Sequence[str]) – File extension types supported by the simulator
model_types (Sequence[SimulatorModelType] | None) – Model types supported by the simulator
model_dependencies (Sequence[SimulatorModelDependency] | None) – Model dependencies supported by the simulator
step_fields (Sequence[SimulatorStep] | None) – Step types supported by the simulator when creating routines
unit_quantities (Sequence[SimulatorQuantity] | None) – Quantities and their units supported by the simulator
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- get_quantities() list[str]
Get a list of quantity names available for this simulator.
- Returns:
List of quantity names from the simulator’s unit_quantities.
- Return type:
list[str]
- get_units(quantity: str) list[str]
Get a list of unit names for a specific quantity.
- Parameters:
quantity (str) – The name of the quantity to get units for.
- Returns:
List of unit names for the specified quantity.
- Return type:
list[str]
- Raises:
ValueError – If the specified quantity does not exist for this simulator.
- class cognite.client.data_classes.simulators.SimulatorFlowsheet(
- simulator_object_nodes: 'list[SimulatorFlowsheetObjectNode]',
- simulator_object_edges: 'list[SimulatorFlowsheetObjectEdge]',
- thermodynamics: 'SimulatorFlowsheetThermodynamic',
Bases:
CogniteResource- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorFlowsheetGraphicalObject(
- position: 'SimulatorFlowsheetPosition | None',
- height: 'float | None',
- width: 'float | None',
- scale_x: 'float | int | None',
- scale_y: 'float | int | None',
- angle: 'float | None',
- active: 'bool | None',
Bases:
CogniteResource- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorFlowsheetObjectEdge(
- id: 'str',
- name: 'str | None',
- source_id: 'str',
- target_id: 'str',
- connection_type: "Literal['Material', 'Energy', 'Information']",
Bases:
CogniteResource
- class cognite.client.data_classes.simulators.SimulatorFlowsheetObjectNode(
- id: 'str',
- name: 'str | None',
- type: 'str',
- graphical_object: 'SimulatorFlowsheetGraphicalObject | None',
- properties: 'list[SimulatorFlowsheetProperty]',
Bases:
CogniteResource- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorFlowsheetPosition(x: 'float', y: 'float')
Bases:
CogniteResource
- class cognite.client.data_classes.simulators.SimulatorFlowsheetProperty(
- name: 'str',
- reference_object: 'dict[str, str]',
- value_type: "Literal['STRING', 'DOUBLE', 'STRING_ARRAY', 'DOUBLE_ARRAY']",
- value: 'str | float | list[str] | list[float]',
- unit: 'SimulationValueUnitReference | None',
- read_only: 'bool | None',
Bases:
CogniteResource- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorFlowsheetThermodynamic(
- property_packages: 'list[str]',
- components: 'list[str]',
Bases:
CogniteResource
- class cognite.client.data_classes.simulators.SimulatorIntegration(
- id: int,
- external_id: str,
- simulator_external_id: str,
- heartbeat: int,
- data_set_id: int,
- connector_version: str,
- log_id: int,
- active: bool,
- created_time: int,
- last_updated_time: int,
- license_status: str | None = None,
- simulator_version: str | None = None,
- license_last_checked_time: int | None = None,
- connector_status: str | None = None,
- connector_status_updated_time: int | None = None,
Bases:
CogniteResourceThe simulator integration resource represents a simulator connector in Cognite Data Fusion (CDF).
It provides information about the configured connectors for a given simulator, including their status and additional details such as dataset, name, license status, connector version, simulator version, and more. This resource is essential for monitoring and managing the interactions between CDF and external simulators, ensuring proper data flow and integration.
This is the read/response format of the simulator integration.
- Parameters:
id (int) – Id of the simulator integration.
external_id (str) – External id of the simulator integration
simulator_external_id (str) – External id of the associated simulator
heartbeat (int) – The interval in seconds between the last heartbeat and the current time
data_set_id (int) – The id of the dataset associated with the simulator integration
connector_version (str) – The version of the connector
log_id (int) – Id of the log associated with this simulator integration.
active (bool) – Indicates if the simulator integration is active (i.e., a connector is linked to CDF for this integration).
created_time (int) – The time when this simulator integration resource was created.
last_updated_time (int) – The last time the simulator integration resource was updated.
license_status (str | None) – The status of the license
simulator_version (str | None) – The version of the simulator
license_last_checked_time (int | None) – The time when the license was last checked
connector_status (str | None) – The status of the connector
connector_status_updated_time (int | None) – The time when the connector status was last updated
- class cognite.client.data_classes.simulators.SimulatorIntegrationList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulatorIntegration],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[Simulator],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorLog(
- id: int,
- data: Sequence[SimulatorLogData],
- created_time: int,
- last_updated_time: int,
- data_set_id: int,
- severity: Literal['Debug', 'Information', 'Warning', 'Error'] | None,
Bases:
CogniteResourceSimulator logs track what happens during simulation runs, model parsing, and generic connector logic. They provide valuable information for monitoring, debugging, and auditing.
Simulator logs capture important events, messages, and exceptions that occur during the execution of simulations, model parsing, and connector operations. They help users identify issues, diagnose problems, and gain insights into the behavior of the simulator integrations.
- Parameters:
id (int) – A unique id of a simulator resource log.
data (Sequence[SimulatorLogData]) – Log data of the simulator resource.
created_time (int) – The number of milliseconds since epoch.
last_updated_time (int) – The number of milliseconds since epoch.
data_set_id (int) – Dataset id of the resource.
severity (Severity | None) – Minimum severity level of the log data. This overrides connector configuration minimum severity level and can be used for more granular control.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorLogData(
- timestamp: int,
- message: str,
- severity: Literal['Debug', 'Information', 'Warning', 'Error'],
Bases:
CogniteResourceSimulator log data represents a single log entry in a simulator log.
- Parameters:
timestamp (int) – Timestamp of the log message.
message (str) – Log message.
severity (Severity) – Log severity level.
- class cognite.client.data_classes.simulators.SimulatorLogList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulatorLog],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorModel(
- id: int,
- external_id: str,
- simulator_external_id: str,
- data_set_id: int,
- name: str,
- type: str,
- created_time: int,
- last_updated_time: int,
- description: str | None = None,
Bases:
SimulatorModelCoreThe simulator model resource represents an asset modeled in a simulator.
This asset could range from a pump or well to a complete processing facility or refinery. The simulator model is the root of its associated revisions, routines, runs, and results. The dataset assigned to a model is inherited by its children. Deleting a model also deletes all its children, thereby maintaining the integrity and hierarchy of the simulation data. Simulator model revisions track changes and updates to a simulator model over time. Each revision ensures that modifications to models are traceable and allows users to understand the evolution of a given model.
This is the read/response format of a simulator model.
- Parameters:
id (int) – A unique id of a simulator model
external_id (str) – External id of the simulator model
simulator_external_id (str) – External id of the associated simulator
data_set_id (int) – The id of the dataset associated with the simulator model
name (str) – The name of the simulator model
type (str) – The type key of the simulator model
created_time (int) – The time when the simulator model was created
last_updated_time (int) – The time when the simulator model was last updated
description (str | None) – The description of the simulator model
- as_write() SimulatorModelWrite
Returns this SimulatorModel in its write version.
- class cognite.client.data_classes.simulators.SimulatorModelDependencyFileId(id: 'int')
- class cognite.client.data_classes.simulators.SimulatorModelDependencyFileReference
Bases:
CogniteResource,ABC
- class cognite.client.data_classes.simulators.SimulatorModelList(
- resources: Sequence[T_CogniteResource],
Bases:
WriteableCogniteResourceList[SimulatorModelWrite,SimulatorModel],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorModelRevision(
- id: int,
- external_id: str,
- model_external_id: str,
- file_id: int,
- created_time: int,
- last_updated_time: int,
- simulator_external_id: str,
- data_set_id: int,
- created_by_user_id: str,
- status: str,
- version_number: int,
- log_id: int,
- description: str | None = None,
- status_message: str | None = None,
- external_dependencies: list[SimulatorModelRevisionDependency] | None = None,
Bases:
WriteableCogniteResourceWithClientRef[SimulatorModelRevisionWrite]Simulator model revisions track changes and updates to a simulator model over time.
Each revision ensures that modifications to models are traceable and allows users to understand the evolution of a given model.
- Parameters:
id (int) – Internal id of the simulator model revision
external_id (str) – External id of the simulator model revision
model_external_id (str) – External id of the associated simulator model
file_id (int) – The id of the file associated with the simulator model revision
created_time (int) – The time when the simulator model revision was created
last_updated_time (int) – The time when the simulator model revision was last updated
simulator_external_id (str) – External id of the simulator associated with the simulator model revision
data_set_id (int) – The id of the dataset associated with the simulator model revision
created_by_user_id (str) – The id of the user who created the simulator model revision
status (str) – The status of the simulator model revision
version_number (int) – The version number of the simulator model revision
log_id (int) – The id of the log associated with the simulator model revision
description (str | None) – The description of the simulator model revision
status_message (str | None) – The current status message of the simulator model revision
external_dependencies (list[SimulatorModelRevisionDependency] | None) – A list of external dependencies for the simulator model revision
- as_write() SimulatorModelRevisionWrite
Returns this SimulatorModelRevision in its write version.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- get_data() SimulatorModelRevisionData | None
Retrieve data associated with this simulator model revision.
- Returns:
Data for the simulator model revision.
- Return type:
SimulatorModelRevisionData | None
- async get_data_async() SimulatorModelRevisionData | None
Retrieve data associated with this simulator model revision.
- Returns:
Data for the simulator model revision.
- Return type:
SimulatorModelRevisionData | None
- class cognite.client.data_classes.simulators.SimulatorModelRevisionData(
- model_revision_external_id: str,
- created_time: int,
- last_updated_time: int,
- data_set_id: int,
- flowsheets: list[SimulatorFlowsheet] | None,
- info: dict[str, str] | None,
Bases:
CogniteResourceExtracted metadata from a simulator model file associated with a model revision.
When a model revision is created, connectors can optionally parse the simulator file to extract structured information about the model’s internal structure and configuration. This data resource stores the parsed information, which may include flowsheet details, process equipment, operating parameters, connections between blocks, and visualization data.
Note: The availability and extent of this data depends entirely on the connector implementation and simulator type. Some connectors may: - Not implement this feature at all (no data extraction) - Partially implement it (e.g., only populate ‘info’ or only ‘flowsheets’) - Fully implement it with comprehensive model details
- Parameters:
model_revision_external_id (str) – External id of the associated model revision
created_time (int) – The time when the simulator model revision data was created
last_updated_time (int) – The time when the simulator model revision data was last updated
data_set_id (int) – The id of the dataset associated with the simulator model revision data
flowsheets (list[SimulatorFlowsheet] | None) – Extracted flowsheet information, if supported by the connector. May include blocks, equipment, properties, and connections
info (dict[str, str] | None) – Additional metadata extracted from the simulator file, if supported by the connector
- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorModelRevisionDataList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulatorModelRevisionData],ExternalIDTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorModelRevisionDependency(
- file: SimulatorModelDependencyFileReference,
- arguments: dict[str, str],
Bases:
CogniteResourceRepresents an external dependency for a simulator model revision. :param file: The file ID associated with the external dependency. :type file: SimulatorModelDependencyFileReference :param arguments: A dictionary that contains the key-value pairs (fields) for the external dependency. :type arguments: dict[str, str]
- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorModelRevisionList(
- resources: Sequence[T_CogniteResource],
Bases:
WriteableCogniteResourceList[SimulatorModelRevisionWrite,SimulatorModelRevision],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorModelRevisionWrite(
- external_id: str,
- model_external_id: str,
- file_id: int,
- description: str | None = None,
- external_dependencies: list[SimulatorModelRevisionDependency] | None = None,
Bases:
WriteableCogniteResource[SimulatorModelRevisionWrite]- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorModelRevisionWriteList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulatorModelRevisionWrite],ExternalIDTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorModelWrite(
- external_id: str,
- simulator_external_id: str,
- data_set_id: int,
- name: str,
- type: str,
- description: str | None = None,
Bases:
SimulatorModelCore
- class cognite.client.data_classes.simulators.SimulatorModelWriteList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulatorModelWrite],ExternalIDTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorRoutine(
- id: int,
- external_id: str,
- model_external_id: str,
- simulator_integration_external_id: str | None,
- name: str,
- data_set_id: int,
- simulator_external_id: str,
- created_time: int,
- last_updated_time: int,
- description: str | None = None,
- kind: Literal['long'] | None = None,
Bases:
SimulatorRoutineCoreThe simulator routine resource defines instructions on interacting with a simulator model.
Simulator routines can have multiple revisions, enabling users to track changes and evolve the routine over time. Each model can have multiple routines, each performing different objectives such as calculating optimal operation setpoints, forecasting production, benchmarking asset performance, and more.
This is the read/response format of a simulator routine.
- Parameters:
id (int) – A unique id of a simulator routine
external_id (str) – External id of the simulator routine
model_external_id (str) – External id of the associated simulator model
simulator_integration_external_id (str | None) – External id of the associated simulator integration
name (str) – The name of the simulator routine
data_set_id (int) – The id of the dataset associated with the simulator routine
simulator_external_id (str) – External id of the associated simulator
created_time (int) – The time when the simulator routine was created
last_updated_time (int) – The time when the simulator routine was last updated
description (str | None) – The description of the simulator routine
kind (Literal['long'] | None) – The kind of simulator routine. Routines with kind ‘long’ may have more inputs/outputs, steps, and longer runtime.
- as_write() SimulatorRoutineWrite
Returns a writeable version of this resource
- class cognite.client.data_classes.simulators.SimulatorRoutineConfiguration(
- inputs: SimulatorRoutineInputList | Sequence[SimulatorRoutineInput] | None,
- outputs: SimulatorRoutineOutputList | Sequence[SimulatorRoutineOutput] | None,
- logical_check: Sequence[SimulatorRoutineLogicalCheck] | None = None,
- steady_state_detection: Sequence[SimulatorRoutineSteadyStateDetection] | None = None,
- schedule: SimulatorRoutineSchedule | None = None,
- data_sampling: SimulatorRoutineDataSampling | None = None,
Bases:
CogniteResourceThe simulator routine configuration defines the configuration of a simulator routine revision.
Learn more about simulator routine configuration <https://docs.cognite.com/cdf/integration/guides/simulators/simulator_routines>.
- Parameters:
inputs (SimulatorRoutineInputList | Sequence[SimulatorRoutineInput] | None) – The inputs of the simulator routine revision. Each element can be either a constant or a timeseries input.
outputs (SimulatorRoutineOutputList | Sequence[SimulatorRoutineOutput] | None) – The outputs of the simulator routine revision.
logical_check (Sequence[SimulatorRoutineLogicalCheck] | None) – Logical check configuration.
steady_state_detection (Sequence[SimulatorRoutineSteadyStateDetection] | None) – Steady state detection configuration.
schedule (SimulatorRoutineSchedule | None) – Schedule configuration.
data_sampling (SimulatorRoutineDataSampling | None) – Data sampling configuration. Learn more about data sampling <https://docs.cognite.com/cdf/integration/guides/simulators/about_data_sampling>.
- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorRoutineDataSampling(
- sampling_window: int,
- granularity: int,
- validation_window: int | None = None,
Bases:
CogniteResourceThe data sampling configuration of the simulator routine revision.
Learn more about data sampling <https://docs.cognite.com/cdf/integration/guides/simulators/about_data_sampling>.
- Parameters:
sampling_window (int) – Sampling window of the data sampling. Represented in minutes
granularity (int) – The granularity of the data sampling in minutes.
validation_window (int | None) – Validation window of the data sampling. Represented in minutes. Used when either logical check or steady state detection is enabled.
- class cognite.client.data_classes.simulators.SimulatorRoutineInput(
- name: str,
- reference_id: str,
- save_timeseries_external_id: str | None = None,
- unit: SimulationValueUnitInput | None = None,
Bases:
CogniteResource,ABCThe input of the simulator routine revision.
- Parameters:
name (str) – The name of the input.
reference_id (str) – The reference ID of the input.
save_timeseries_external_id (str | None) – The external ID of the timeseries to save the input. If not provided, the input is not saved to a timeseries.
unit (SimulationValueUnitInput | None) – The unit of the input.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorRoutineInputConstant(
- name: str,
- reference_id: str,
- value: str | int | float | list[str] | list[int] | list[float],
- value_type: Literal['STRING', 'DOUBLE', 'STRING_ARRAY', 'DOUBLE_ARRAY'],
- unit: SimulationValueUnitInput | None = None,
- save_timeseries_external_id: str | None = None,
Bases:
SimulatorRoutineInputThe constant input of the simulator routine revision.
- Parameters:
name (str) – The name of the input.
reference_id (str) – The reference ID of the input.
value (str | int | float | list[str] | list[int] | list[float]) – The value of the input.
value_type (Literal['STRING', 'DOUBLE', 'STRING_ARRAY', 'DOUBLE_ARRAY']) – The value type of the input.
unit (SimulationValueUnitInput | None) – The unit of the input.
save_timeseries_external_id (str | None) – The external ID of the timeseries to save the input. If not provided, the input is not saved to a timeseries.
- class cognite.client.data_classes.simulators.SimulatorRoutineInputList(
- initlist: Sequence[SimulatorRoutineInput] | None = None,
Bases:
UserList[SimulatorRoutineInput]List of simulator routine inputs with pandas conversion capabilities.
- to_pandas() pandas.DataFrame
Convert the list of inputs to a pandas DataFrame.
- Returns:
DataFrame with input information.
- Return type:
pandas.DataFrame
- class cognite.client.data_classes.simulators.SimulatorRoutineInputTimeseries(
- name: str,
- reference_id: str,
- source_external_id: str,
- aggregate: Literal['average', 'interpolation', 'stepInterpolation'] | None = None,
- save_timeseries_external_id: str | None = None,
- unit: SimulationValueUnitInput | None = None,
Bases:
SimulatorRoutineInputThe timeseries input of the simulator routine revision.
- Parameters:
name (str) – The name of the input.
reference_id (str) – The reference ID of the input.
source_external_id (str) – The external ID of the source timeseries.
aggregate (Literal['average', 'interpolation', 'stepInterpolation'] | None) – The aggregation method to use for the timeseries.
save_timeseries_external_id (str | None) – The external ID of the timeseries to save the input. If not provided, the input is not saved to a timeseries.
unit (SimulationValueUnitInput | None) – The unit of the input.
- class cognite.client.data_classes.simulators.SimulatorRoutineList(
- resources: Sequence[T_CogniteResource],
Bases:
WriteableCogniteResourceList[SimulatorRoutineWrite,SimulatorRoutine],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorRoutineLogicalCheck(
- aggregate: Literal['average', 'interpolation', 'stepInterpolation'],
- operator: Literal['eq', 'ne', 'gt', 'ge', 'lt', 'le'],
- value: float,
- timeseries_external_id: str | None = None,
Bases:
CogniteResourceThe logical check configuration of the simulator routine revision.
Learn more about logical checks <https://docs.cognite.com/cdf/integration/guides/simulators/about_data_sampling/#data-validation-methods>.
- Parameters:
aggregate (Literal['average', 'interpolation', 'stepInterpolation']) – The aggregation method to use for the time series.
operator (Literal['eq', 'ne', 'gt', 'ge', 'lt', 'le']) – The operator to use for the logical check.
value (float) – The value to use for the logical check.
timeseries_external_id (str | None) – The external ID of the time series to check.
- class cognite.client.data_classes.simulators.SimulatorRoutineOutput(
- name: str,
- reference_id: str,
- value_type: str,
- unit: SimulationValueUnitInput | None = None,
- save_timeseries_external_id: str | None = None,
Bases:
CogniteResourceThe output of the simulator routine revision.
- Parameters:
name (str) – The name of the output.
reference_id (str) – The reference ID of the output.
value_type (str) – The value type of the output.
unit (SimulationValueUnitInput | None) – The unit of the output.
save_timeseries_external_id (str | None) – The external ID of the timeseries to save the output. If not provided, the output is not saved to a timeseries.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorRoutineOutputList(
- initlist: Sequence[SimulatorRoutineOutput] | None = None,
Bases:
UserList[SimulatorRoutineOutput]List of simulator routine outputs with pandas conversion capabilities.
- to_pandas() pandas.DataFrame
Convert the list of outputs to a pandas DataFrame.
- Returns:
DataFrame with output information.
- Return type:
pandas.DataFrame
- class cognite.client.data_classes.simulators.SimulatorRoutineRevision(
- id: int,
- external_id: str,
- simulator_external_id: str,
- simulator_integration_external_id: str | None,
- routine_external_id: str,
- model_external_id: str,
- version_number: int,
- created_time: int,
- data_set_id: int,
- created_by_user_id: str,
- configuration: SimulatorRoutineConfiguration | None = None,
- script: SimulatorRoutineStageList | Sequence[SimulatorRoutineStage] | None = None,
- kind: Literal['long'] | None = None,
Bases:
SimulatorRoutineRevisionCoreThe simulator routine resource defines instructions on interacting with a simulator model.
A simulator routine includes:
Inputs (values set into the simulator model) Commands (actions to be performed by the simulator) Outputs (values read from the simulator model)
Simulator routines can have multiple revisions, enabling users to track changes and evolve the routine over time. Each model can have multiple routines, each performing different objectives such as calculating optimal operation setpoints, forecasting production, benchmarking asset performance, and more.
- Parameters:
id (int) – The unique identifier of the simulator routine revision.
external_id (str) – The external ID provided by the client. Must be unique for the resource type.
simulator_external_id (str) – The external ID of the simulator.
simulator_integration_external_id (str | None) – The external ID of the simulator integration.
routine_external_id (str) – The external ID of the simulator routine.
model_external_id (str) – The external ID of the simulator model.
version_number (int) – The version number of the simulator routine revision. Unique for each simulator routine.
created_time (int) – The timestamp of when the simulator routine revision was created.
data_set_id (int) – The ID of the data set associated with the simulator routine revision.
created_by_user_id (str) – The ID of the user who created the simulator routine revision.
configuration (SimulatorRoutineConfiguration | None) – The configuration of the simulator routine revision.
script (SimulatorRoutineStageList | Sequence[SimulatorRoutineStage] | None) – The script of the simulator routine revision.
kind (Literal['long'] | None) – The kind of simulator routine. Routines with kind ‘long’ may have more inputs/outputs, steps, and longer runtime.
- as_write() SimulatorRoutineRevisionWrite
Returns a writeable version of this resource
- class cognite.client.data_classes.simulators.SimulatorRoutineRevisionList(
- resources: Sequence[T_CogniteResource],
Bases:
WriteableCogniteResourceList[SimulatorRoutineRevisionWrite,SimulatorRoutineRevision],IdTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorRoutineRevisionWrite(
- external_id: str,
- routine_external_id: str,
- configuration: SimulatorRoutineConfiguration | None = None,
- script: SimulatorRoutineStageList | Sequence[SimulatorRoutineStage] | None = None,
Bases:
SimulatorRoutineRevisionCoreThe simulator routine resource defines instructions on interacting with a simulator model. This is a writeable version of a simulator routine revision, it is used when creating simulator routine revisions.
- Parameters:
external_id (str) – The external ID provided by the client. Must be unique for the resource type.
routine_external_id (str) – The external ID of the simulator routine.
configuration (SimulatorRoutineConfiguration | None) – The configuration of the simulator routine revision.
script (SimulatorRoutineStageList | Sequence[SimulatorRoutineStage] | None) – The script of the simulator routine revision.
- as_write() SimulatorRoutineRevisionWrite
Returns a writeable version of this resource
- class cognite.client.data_classes.simulators.SimulatorRoutineRevisionWriteList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulatorRoutineRevisionWrite],ExternalIDTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorRoutineSchedule(cron_expression: str)
Bases:
CogniteResourceThe schedule configuration of the simulator routine revision.
- Parameters:
cron_expression (str) – The cron expression of the schedule.
- class cognite.client.data_classes.simulators.SimulatorRoutineStage(
- order: int,
- steps: list[SimulatorRoutineStep],
- description: str | None,
Bases:
CogniteResourceThe stage of the simulator routine revision. This is a way to organize the steps of the simulator routine revision.
- Parameters:
order (int) – Represents the order in which the stage is executed compared to other stages in the script.
steps (list[SimulatorRoutineStep]) – The steps of the stage.
description (str | None) – The description of the stage.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorRoutineStageList(
- initlist: Sequence[SimulatorRoutineStage] | None = None,
Bases:
UserList[SimulatorRoutineStage]List of simulator routine stages with pandas conversion capabilities.
- to_pandas() pandas.DataFrame
Convert the list of stages to a pandas DataFrame.
- Returns:
DataFrame with stage and step information.
- Return type:
pandas.DataFrame
- class cognite.client.data_classes.simulators.SimulatorRoutineSteadyStateDetection(
- aggregate: Literal['average', 'interpolation', 'stepInterpolation'],
- min_section_size: int,
- var_threshold: float,
- slope_threshold: float,
- timeseries_external_id: str | None = None,
Bases:
CogniteResourceThe steady state detection configuration of the simulator routine revision.
Learn more about steady state detection <https://docs.cognite.com/cdf/integration/guides/simulators/about_data_sampling/#data-validation-methods>.
- Parameters:
aggregate (Literal['average', 'interpolation', 'stepInterpolation']) – The aggregation method to use for the time series.
min_section_size (int) – The minimum number of consecutive data points that must meet the steady state criteria.
var_threshold (float) – The maximum variance allowed for the steady state region.
slope_threshold (float) – The maximum slope allowed for the steady state region.
timeseries_external_id (str | None) – The external ID of the time series to check.
- class cognite.client.data_classes.simulators.SimulatorRoutineStep(
- step_type: Literal['Get', 'Set', 'Command'],
- arguments: SimulatorRoutineStepArguments,
- order: int,
- description: str | None = None,
Bases:
CogniteResourceThe step of the simulator routine revision.
- Parameters:
step_type (Literal['Get', 'Set', 'Command']) – The type of the step. Can be “Get”, “Set”, or “Command”.
arguments (SimulatorRoutineStepArguments) – The arguments of the step.
order (int) – Represents the order in which the step is executed compared to other steps in the stage.
description (str | None) – The description of the step.
- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorRoutineStepArguments(data: dict[str, str])
Bases:
CogniteResource,dict,MutableMapping[str,str]The arguments of the simulator routine step.
Depending on the step type and simulator, the arguments can be different. For “Get” and “Set” step type the reference ID is required.
- Parameters:
data (dict[str, str]) – The step arguments.
- dump(
- camel_case: bool = True,
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorRoutineWrite(
- external_id: str,
- model_external_id: str,
- simulator_integration_external_id: str | None,
- name: str,
- description: str | None = None,
- kind: Literal['long'] | None = None,
Bases:
SimulatorRoutineCoreThe simulator routine resource defines instructions on interacting with a simulator model.
Simulator routines can have multiple revisions, enabling users to track changes and evolve the routine over time. Each model can have multiple routines, each performing different objectives such as calculating optimal operation setpoints, forecasting production, benchmarking asset performance, and more.
This is the read/response format of a simulator routine.
- Parameters:
external_id (str) – External id of the simulator routine
model_external_id (str) – External id of the associated simulator model
simulator_integration_external_id (str) – External id of the associated simulator integration
name (str) – The name of the simulator routine
description (str | None) – The description of the simulator routine
kind (Literal['long'] | None) – The kind of simulator routine. Routines with kind ‘long’ may have more inputs/outputs, steps, and longer runtime.
- as_write() SimulatorRoutineWrite
Returns a writeable version of this resource
- class cognite.client.data_classes.simulators.SimulatorRoutineWriteList(
- resources: Sequence[T_CogniteResource],
Bases:
CogniteResourceList[SimulatorRoutineWrite],ExternalIDTransformerMixin
- class cognite.client.data_classes.simulators.SimulatorStep(step_type: 'str', fields: 'Sequence[SimulatorStepField]')
Bases:
CogniteResource- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorStepField(
- name: 'str',
- label: 'str',
- info: 'str',
- options: 'Sequence[SimulatorStepOption] | None' = None,
Bases:
CogniteResource- dump(camel_case: bool = True) dict[str, Any]
Dump the instance into a json serializable Python data type.
- Parameters:
camel_case (bool) – Use camelCase for attribute names. Defaults to True.
- Returns:
A dictionary representation of the instance.
- Return type:
dict[str, Any]
- class cognite.client.data_classes.simulators.SimulatorStepOption(label: 'str', value: 'str')
Bases:
CogniteResource
- class cognite.client.data_classes.simulators.SimulatorUnitEntry(label: 'str', name: 'str')
Bases:
CogniteResource