Skip to content

chained

ChainedOfflineEnvironments(environments)

Bases: IncrementalEnvironment

Chained offline environments.

This environment chains multiple offline environments together. The environment will first observe the data from the first environment and then the data from the other environments.

Initialize the chained offline environments.

Parameters:

Name Type Description Default
environments Iterable[OfflineEnvironment]

The offline environments to chain.

required
Source code in src/flowcean/core/environment/chained.py
22
23
24
25
26
27
28
29
30
def __init__(self, environments: Iterable[OfflineEnvironment]) -> None:
    """Initialize the chained offline environments.

    Args:
        environments: The offline environments to chain.
    """
    self._environments = iter(environments)
    self._element = next(self._environments)
    super().__init__()