BenchmarkResultsDb

class BenchmarkResultsDb @JvmOverloads constructor(dbName: String, dbDirectory: Path = KSL.dbDir, deleteIfExists: Boolean = false) : SQLiteDb(source)

The results database for benchmark experiments: SQLite by default (via the SQLiteDb base), holding the tables described by the table-data classes of this package.

Append semantics: by default the database is NOT deleted if it exists, and only missing tables are created — so successive experiments (including a later trace-enabled rerun of a problem) accumulate in one file under fresh experiment and run ids. Set deleteIfExists true to start clean.

Capture is post-run and bulk: run the ksl.simopt.benchmark.BenchmarkExperiment, then hand its summary to saveSummary. The returned experiment id keys every table.

Post-processing helpers pull typed rows back out (one function per table), feed a MultipleComparisonAnalyzer with per-problem final objectives via mcbDataMap, and compute performance-profile data from captured traces via performanceProfile.

Parameters

dbName

the database file name

dbDirectory

the directory holding the database file

deleteIfExists

true deletes an existing file first; the default (false) appends to it

Constructors

Link copied to clipboard
constructor(dbName: String, dbDirectory: Path = KSL.dbDir, deleteIfExists: Boolean = false)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Confirmation rows, optionally restricted to one experiment.

Link copied to clipboard

All experiment rows.

Link copied to clipboard
fun mcbAnalyzer(expId: Int, problemName: String, useGaps: Boolean = false): MultipleComparisonAnalyzer?

A MultipleComparisonAnalyzer over one problem's final objectives (see mcbDataMap); null when fewer than two solver cases have complete data.

Link copied to clipboard
fun mcbDataMap(expId: Int, problemName: String, useGaps: Boolean = false): Map<String, DoubleArray>

The multiple-comparison feed for one problem of one experiment: solver case label mapped to the final objective values (or gaps) across the completed, valid macro-replications, ordered by replication number.

Link copied to clipboard
fun performanceProfile(expId: Int, tau: Double, numPoints: Int = 20): List<PerformanceProfilePoint>

Performance-profile data across an experiment's traced runs: for each solver case and each budget fraction on a grid, the fraction of (problem, macro-rep) cells whose best penalized objective reached the problem's gap basis plus tau within that fraction of the replication budget.

Link copied to clipboard
fun problems(expId: Int? = null): List<ProblemTableData>

Problem rows, optionally restricted to one experiment.

Link copied to clipboard
fun runs(expId: Int? = null): List<RunTableData>

Run rows, optionally restricted to one experiment.

Link copied to clipboard
fun saveSummary(summary: BenchmarkSummary, kslVersion: String? = null): Int

Persists a benchmark summary: the experiment row, its problems, solver cases and their captured parameters, every cell run, confirmation finalists, verification estimates, and (when captured) iteration traces keyed by run id.

Link copied to clipboard

Solver case parameter rows, optionally restricted to one experiment.

Link copied to clipboard
fun solverCases(expId: Int? = null): List<SolverCaseTableData>

Solver case rows, optionally restricted to one experiment.

Link copied to clipboard
fun traces(expId: Int? = null): List<IterationTraceTableData>

Iteration-trace rows, optionally restricted to one experiment's runs.

Link copied to clipboard

Verification rows, optionally restricted to one experiment.