CosimWatcher

class ospx.watch.watchCosim.CosimWatcher(csv_file_names: MutableSequence[str], skip_values: int, latest_values: int, scale_factor: float, *, timeline_data: bool)

Bases: object

Watcher to monitor a running simulation.

CosimWatcher allows to monitor a running simulation, plot trends and dump simulation results into a resultDict file.

__init__(csv_file_names: MutableSequence[str], skip_values: int, latest_values: int, scale_factor: float, *, timeline_data: bool) None

Methods

__init__(csv_file_names, skip_values, ...)

dump()

Write dataframe to dump.

plot(*[, converge])

Plot trends.

read_watch_dict(watch_dict_file)

Read watchDict file.

dump() None

Write dataframe to dump.

plot(*, converge: bool = False) None

Plot trends.

Plotting + convergence checker (future task)

Parameters:

converge (bool, optional) – if True, convergence is checked, by default False

read_watch_dict(watch_dict_file: str | PathLike[str]) None

Read watchDict file.

The watchDict file contains the parameters to be plotted.

Parameters:

watch_dict_file (Union[str, os.PathLike[str]]) – watchDict file. Contains the parameters to be plotted.

Raises:

FileNotFoundError – if watch_dict_file does not exist