ciw.trial_logger_from_ciw_recs

ciw.trial_logger_from_ciw_recs(
    ciw_recs_list,
    node_name_list,
    *,
    run_numbers=None,
    scenario=None,
    label=None,
)

Build a vidigi TrialLogger from several ciw runs’ records.

Each entry in ciw_recs_list is one run’s Simulation.get_all_records() output - the shape returned by a multiple_replications-style helper that collects a get_all_records() per replication. Every run becomes an :class:vidigi.logging.EventLogger (via :func:event_logger_from_ciw_recs, stamped with a run_number), and the collection is wrapped in a :class:vidigi.logging.TrialLogger for cross-run analysis: get_event_duration_stat, get_resource_utilisation, plot_queue_size, plot_replication_analysis, plot_warm_up_diagnostic, and so on.

Parameters

Name Type Description Default
ciw_recs_list Sequence[Iterable[CiwRecord]] One ciw.data_record object per run. required
node_name_list Sequence[str] User-defined list of node names, applied to every run. See :func:event_log_from_ciw_recs. required
run_numbers Sequence[int] Run number to stamp onto each run’s events, in the same order as ciw_recs_list. Default None uses 1, 2, ..., len(ciw_recs_list). If given, its length must match ciw_recs_list. None
scenario object or dict Parameters object / resource-count container to attach to the trial. When set, the resource-utilisation helpers use it automatically. See :class:vidigi.logging.TrialLogger. None
label str Human-readable name to attach to the trial. None

Returns

Name Type Description
vidigi.logging.TrialLogger

Raises

Name Type Description
ValueError If ciw_recs_list is empty, if run_numbers is given with a mismatched length, or if any run’s records are empty (a ciw run that recorded nothing has no arrival time to build events from).

See Also

event_logger_from_ciw_recs : The single-run version. event_log_from_ciw_recs : The bare-DataFrame version.

Examples

from vidigi.ciw import trial_logger_from_ciw_recs

logs is a list where each entry is one run’s Q.get_all_records()

trial = trial_logger_from_ciw_recs(logs, node_name_list=[“operator”, “nurse”]) trial.get_event_duration_stat(“arrival”, “depart”, what=“mean”)

Back to top