OutputConfig¶
- class passengersim.config.outputs.OutputConfig[source]¶
Bases:
PrettyModelAttributes:
Base directory for all output files.
Default stem for all output files.
Write basic reports directly to the run log.
Write excel outputs to this file after a run.
Reports to include.
Configuration for HTML outputs.
Write a pickle of the SimulationTables output to this file after a run.
Configuration for writing simulation dynamic state after each trial.
Write the SimulationTables output to this file after a run.
Methods:
get_output_filename(which[, timestamp, ...])serialize_reports(reports)- base_dir : Path | None¶
Base directory for all output files.
Whenever an output file is designated as a simple filename or a relative path, it will be relative to this directory.
If not provided, the current working directory will be used.
- filename_stem : str¶
Default stem for all output files.
If an output file is designated as True instead of giving an explicit filename, then this stem will be used with an appropriate file extension.
- log_reports : bool¶
Write basic reports directly to the run log.
- excel : bool | Path | None¶
Write excel outputs to this file after a run.
- reports : set[str | tuple[str, ...]]¶
Reports to include.
Database queries reports can be included here. This is important for multiprocessing runs with in-memory databases, as database results will not be available after the database connection is closed in each subprocess.
If this is a set containing only “*”, all reports will be included; this may be computationally expensive.
- html : HtmlOutputConfig¶
Configuration for HTML outputs.
- pickle : bool | Path | None¶
Write a pickle of the SimulationTables output to this file after a run.
- sim_state : StateOutputConfig¶
Configuration for writing simulation dynamic state after each trial.
In contrast with the static state, the dynamic state includes things that are created or change during a trial of the simulation, such as attribute counters, histories, and summaries. The dynamic state is the information needed to recreate the Simulation object (beyond the contents of the Config) to facilitate various debugging and introspection.
- disk : bool | Path | None¶
Write the SimulationTables output to this file after a run.
This will use pxsim format, an efficient binary file that allows “lazy” file loading. If set to True, the file will be named with the same name as the HTML output file, except with the extension .pxsim, unless there is no HTML output file, in which case no file will written.