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 the data cannot support a multiple comparison — fewer than two solver cases with complete data, unequal numbers of observations across the cases, or fewer than two observations per case.

fun mcbAnalyzer(expIds: Collection<Int>, problemName: String, useGaps: Boolean = false): MultipleComparisonAnalyzer?

A MultipleComparisonAnalyzer over one problem's final objectives pooled across the blocks of one study (see the pooled mcbDataMap); null when the data cannot support a multiple comparison — fewer than two solver cases with complete data, unequal numbers of observations across the cases, or fewer than two observations per case.

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.

fun mcbDataMap(expIds: Collection<Int>, problemName: String, useGaps: Boolean = false): Map<String, DoubleArray>

The multiple-comparison feed for one problem pooled across several experiments — the blocks of one study, run as separate experiments so that a long run can be checkpointed and resumed. Solver case label mapped to the final objective values (or gaps) across the completed, valid macro-replications of every supplied experiment, 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.

fun performanceProfile(expIds: Collection<Int>, tau: Double, numPoints: Int = 20): List<PerformanceProfilePoint>

Performance-profile data pooled across the blocks of one study (see the pooled mcbDataMap). The blocks must share a replication budget, since the profile's x-axis is the fraction of that budget; pooling experiments with different budgets would put incomparable cells on one axis.

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.