Package-level declarations

Types

Link copied to clipboard
open class CentralCompositeDesign(twoLevelDesignItr: FactorialDesign.FactorialDesignIterator, val numFactorialReps: Int = 1, val numAxialReps: Int = 1, val numCenterReps: Int = 1, val axialSpacing: Double, name: String? = null) : Identity, ExperimentalDesignIfc

A central composite design represent a two-level factorial design that has been augmented with a center point and axial point to enable the modeling of quadratic response surface models.

Link copied to clipboard
class DesignedExperiment(name: String, model: Model, factorSettings: Map<Factor, String>, val design: ExperimentalDesignIfc, val kslDb: KSLDatabase = KSLDatabase("${name}.db".replace(" ", "_"), model.outputDirectory.dbDir)) : Identity

Facilitates the simulation of a model via an experimental design.

Link copied to clipboard

A design point is a specification of the settings for the factors of an experiment.

Link copied to clipboard
data class DesignPointInfo(val point: Int, val exp_name: String, val rep_id: Int)
Link copied to clipboard
Link copied to clipboard
object DurationSerializer : KSerializer<Duration>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class ExperimentRunParameters(var experimentName: String, val experimentId: Int, var numberOfReplications: Int, var numChunks: Int, var runName: String, var startingRepId: Int, var lengthOfReplication: Double, var lengthOfReplicationWarmUp: Double, var replicationInitializationOption: Boolean, var maximumAllowedExecutionTimePerReplication: Duration, var resetStartStreamOption: Boolean, var advanceNextSubStreamOption: Boolean, var antitheticOption: Boolean, var numberOfStreamAdvancesPriorToRunning: Int, var garbageCollectAfterReplicationFlag: Boolean) : ExperimentRunParametersIfc

Holds data about the run parameters of a simulation experiment.

Link copied to clipboard
open class Factor(name: String, values: DoubleArray = doubleArrayOf(-1.0, 1.0)) : Identity

This class represents an individual factor within a factorial design. The name of the factor must be provided and will be required to be unique when placed within a design. The supplied values of the levels must be strictly increasing. That is, they must be unique and increasing in value.

Link copied to clipboard
open class FactorialDesign(factors: Set<Factor>, name: String? = null) : Identity, ExperimentalDesignIfc

A factorial design represents a list of design points where every design point represents a possible row in the cartesian product of the levels for the factors. That is, all possible combinations of the levels for the factors are possible design points. A design point is individually generated when needed via the associated iterator for the design.

Link copied to clipboard
class LinearModel(val mainEffects: Set<String>, type: LinearModel.Type = Type.FirstOrder)

This class provides the ability to specify a linear model (for use in regression and design of experiments). This is only a string specification of the model. The terms are specified by the names of the factors.

Link copied to clipboard
class Scenario(val model: Model, inputs: Map<String, Double>, name: String, numberReplications: Int = model.numberOfReplications, lengthOfReplication: Double = model.lengthOfReplication, lengthOfReplicationWarmUp: Double = model.lengthOfReplicationWarmUp) : Identity, ExperimentIfc

A scenario represents the specification of a model to run, with some inputs. Each scenario will produce a simulation run. In the context of running multiple scenarios, it is important that the scenario names be unique to permit automated storage within a KSL database. The name of the scenario is used to assign the name of the model's experiment prior to simulating the model. In this manner, each experiment can have a unique name.

Link copied to clipboard
class ScenarioRunner(name: String, scenarioList: List<Scenario> = emptyList(), val pathToOutputDirectory: Path = KSL.createSubDirectory(name.replace(" ", "_") + "_OutputDir"), val kslDb: KSLDatabase = KSLDatabase("${name}.db".replace(" ", "_"), pathToOutputDirectory)) : Identity

Facilitates the running of many scenarios in a sequence. A KSLDatabase is used to capture the statistics for each scenario. Each scenario is treated like a different experiment. The scenarios can be based on the same or different models. The scenarios also capture the inputs and results via a SimulationRun.

Link copied to clipboard
fun interface ScenarioSetupIfc

Can be used to supply logic to configure a model prior to simulating a scenario.

Link copied to clipboard
@Serializable
class SimulationRun

A SimulationRun represents the execution of a simulation with inputs (controls and parameters), and output (results). A run consists of a number of replications that were executed with the same inputs and parameters, which cause the creation of results for each response within each replication. The main purpose of SimulationRun is to transfer data about the execution of a simulation. It acts as a data transfer class.

Link copied to clipboard
class SimulationRunner(model: Model)

The purpose of this class is to facilitate the running of a simulation model based on some inputs and experimental run parameters. The simulate() functions take in the inputs and the experimental run parameters and after execution return an instance of SimulationRun.

Link copied to clipboard
class TwoLevelFactor(name: String, low: Double = -1.0, high: Double = 1.0) : Factor

Creates a two level factor with provided low and high values.

Link copied to clipboard

Functions

Link copied to clipboard
fun main()
Link copied to clipboard
fun List<DesignPoint>.toDataFrame(coded: Boolean = false): AnyFrame

Turns the list of design points into a data frame. The columns of the data frame are the factor names and the rows are the design points values.