OutputConfig

@Serializable
data class OutputConfig(val enableKSLDatabase: Boolean = false, val enableReplicationCSV: Boolean = false, val enableExperimentCSV: Boolean = false, val reports: Set<ReportFormat> = setOf(ReportFormat.HTML), val outputDirectory: String? = null, val analysisName: String = "Untitled", val databasePolicy: DatabasePolicy = DatabasePolicy.OVERWRITE)(source)

Per-run output choices: which side-effects the framework wires before the run starts and which reports it materializes after the run completes.

Lives at document scope on ksl.app.config.RunConfiguration (not per-scenario) so that every scenario in a run shares one output-directory layout under the active workspace.

Substrate-prep only. The field is stored on RunConfiguration and round-trips through both codecs; the orchestrators / Single-framework controller do not yet consult it. Phase 6D wires the per-flag attachment assembly and the post-run report materialization that these flags govern.

Defaults: HTML report only; no database; no CSV. An analyst running with the defaults gets something openable without opting in to anything; a CI or production user can suppress all output by passing OutputConfig(reports = emptySet()).

Constructors

Link copied to clipboard
constructor(enableKSLDatabase: Boolean = false, enableReplicationCSV: Boolean = false, enableExperimentCSV: Boolean = false, reports: Set<ReportFormat> = setOf(ReportFormat.HTML), outputDirectory: String? = null, analysisName: String = "Untitled", databasePolicy: DatabasePolicy = DatabasePolicy.OVERWRITE)

Properties

Link copied to clipboard

Display name for this analysis — the user's label for the set of scenarios in this document. Used by hosts as:

Link copied to clipboard

Policy for what to do with <analysisName>.db when it already exists on disk at the start of a Simulate.

Link copied to clipboard

when true, the orchestrator sets ksl.simulation.Model.autoExperimentCSVReports = true so the across-replication summary CSV is written to the workspace's csvDir. Independent of enableReplicationCSV — analysts who want only summary data (and not the larger per-replication file) can opt in here without enabling enableReplicationCSV.

Link copied to clipboard

when true, the orchestrator wires a ksl.utilities.io.dbutil.KSLDatabaseObserver (SQLite backend) so the run's data lands in a KSLDatabase under the workspace's output directory.

Link copied to clipboard

when true, the orchestrator sets ksl.simulation.Model.autoReplicationCSVReports = true so the per-replication CSV (one row per response per replication) is written to the workspace's csvDir.

Link copied to clipboard

absolute path where the framework places the model's runtime output (the equivalent of ksl.simulation.Model.outputDirectory). When null (default), each Model keeps its constructor-supplied default — <programLaunchDirectory>/kslOutput/<modelName>_OutputDir/ — which for GUI consumers typically lands inside the JVM working directory and pollutes the launch tree. Hosts that own a workspace should set this to a workspace-relative path; the orchestrator replaces the model's outputDirectory with OutputDirectory(path, "kslOutput.txt") before the run starts so KSL framework files (kslOutput.txt, csvDir, dbDir, plotDir, etc.) land under the workspace instead of the launch directory.

Link copied to clipboard

the set of report formats to materialize after the run completes. Empty set means no reports.