SimulationConfig#

class eclypse.simulation.config.SimulationConfig[source]#

Bases: object

Configuration object for a simulation runtime.

Methods

__init__([step_every_ms, timeout, ...])

prepare_runtime()

Apply runtime environment settings once for the current process.

runtime_env()

Return the runtime environment variables for this configuration.

to_dict()

Serialize the configuration into a JSON-friendly mapping.

Attributes

step_every_ms

Cadence of the driving event.

timeout

Maximum wall-clock duration of the simulation, in seconds.

max_steps

Maximum number of driving-event executions before the simulation stops.

reporters

Additional reporter classes keyed by their output format name.

events

User-defined events registered before default events and metrics are added.

include_default_metrics

Whether to append the built-in metrics to the configured event list.

seed

Random seed used by the simulation, generated automatically when omitted.

path

Base output directory for logs and reports.

log_to_file

Whether runtime logs should also be written to files under the output path.

log_level

Minimum logging level applied to the simulation runtime.

report_chunk_size

Maximum number of buffered report rows written per reporter flush.

report_format

Default output format used by metrics that do not override their report type.

report_backend

Backend used later to load generated reports through Report.

remote

Whether to run in remote emulation mode, or the bootstrap to use for it.

default_strategy

Default placement strategy used when Simulation.register gets none.

callbacks

Configured post-event callbacks and metrics.

logger

Logger bound to the config component.

step_every_ms: Literal['manual', 'auto'] | float | None#

Cadence of the driving event.

"auto" continuously advances local simulations and resolves to manual mode for remote simulations. Use None or "manual" for explicit manual stepping, or pass a number for a millisecond cadence.

timeout: float | None#

Maximum wall-clock duration of the simulation, in seconds.

max_steps: int | None#

Maximum number of driving-event executions before the simulation stops.

reporters: dict[str, type[Reporter]] | None#

Additional reporter classes keyed by their output format name.

events: list[EclypseEvent] | None#

User-defined events registered before default events and metrics are added.

include_default_metrics: bool#

Whether to append the built-in metrics to the configured event list.

seed: int | None#

Random seed used by the simulation, generated automatically when omitted.

path: str | Path | None#

Base output directory for logs and reports.

log_to_file: bool#

Whether runtime logs should also be written to files under the output path.

log_level: LogLevel#

Minimum logging level applied to the simulation runtime.

report_chunk_size: int#

Maximum number of buffered report rows written per reporter flush.

report_format: ReportFormat | None#

Default output format used by metrics that do not override their report type.

report_backend: ReportBackend | FrameBackend | None#

Backend used later to load generated reports through Report.

remote: bool | RemoteBootstrap#

Whether to run in remote emulation mode, or the bootstrap to use for it.

default_strategy: PlacementStrategy | None#

Default placement strategy used when Simulation.register gets none.

__init__(step_every_ms='auto', timeout=None, max_steps=None, reporters=None, events=None, include_default_metrics=False, seed=None, path=None, log_to_file=False, log_level='ECLYPSE', report_chunk_size=100, report_format=None, report_backend=None, remote=False, default_strategy=None)#
Parameters:
  • step_every_ms (Literal['manual', 'auto'] | float | None)

  • timeout (float | None)

  • max_steps (int | None)

  • reporters (dict[str, type[Reporter]] | None)

  • events (list[EclypseEvent] | None)

  • include_default_metrics (bool)

  • seed (int | None)

  • path (str | Path | None)

  • log_to_file (bool)

  • log_level (LogLevel)

  • report_chunk_size (int)

  • report_format (ReportFormat | None)

  • report_backend (ReportBackend | FrameBackend | None)

  • remote (bool | RemoteBootstrap)

  • default_strategy (PlacementStrategy | None)

Return type:

None

property callbacks: list[EclypseEvent]#

Configured post-event callbacks and metrics.

property logger: Logger#

Logger bound to the config component.

runtime_env()[source]#

Return the runtime environment variables for this configuration.

Return type:

dict[str, str]

prepare_runtime()[source]#

Apply runtime environment settings once for the current process.

to_dict()[source]#

Serialize the configuration into a JSON-friendly mapping.

Return type:

dict[str, Any]