DesignSpec

@Serializable
sealed class DesignSpec(source)

Specifies how the engine should enumerate design points from the document's factors. Four families that mirror the construction APIs in ksl.controls.experiments:

  • FullFactorialFactorialDesign(factors)

  • TwoLevelFactorial(fraction)TwoLevelFactorialDesign + either designIterator() (full), halfFractionIterator(sign), or fractionalIterator(relation, sign)

  • CentralComposite(...)CentralCompositeDesign(twoLevelItr, numFactorialReps, numAxialReps, numCenterReps, axialSpacing)

  • Manual(points)ExperimentalDesign(factors) + one addDesignPoint(values, numReps) per row.

Sealed so the codec emits a type discriminator + variant- specific keys. ExperimentConfigurationBuilder (Phase E2 engine glue) maps each variant to the matching substrate construction per the bullets above.

Replications interaction. For FullFactorial, TwoLevelFactorial, and Manual the document-level ReplicationSpec drives the per-point replication count. For CentralComposite, the spec's three rep knobs (numFactorialReps, numAxialReps, numCenterReps) override ReplicationSpec entirely — they are the substrate's native surface for CCD replications, and ReplicationSpec.Uniform would collapse them. The hosting GUI surfaces this asymmetry by hiding the document uniform-reps field when CCD is selected.

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
@Serializable
@SerialName(value = "centralComposite")
data class CentralComposite(val axialSpacing: AxialSpacing = AxialSpacing.Rotatable, val numFactorialReps: Int = 1, val numAxialReps: Int = 1, val numCenterReps: Int = 1) : DesignSpec

Central composite design — full 2^k factorial core + 2k axial points + 1 centre point. Used to fit second-order response surface models (RSM). Requires every factor to be two-level (the factorial core); the substrate then adds 2k axial points at ± axialSpacing and one centre point replicated numCenterReps times.

Link copied to clipboard
@Serializable
@SerialName(value = "fullFactorial")
data object FullFactorial : DesignSpec

Full factorial — every combination of factor levels. The number of design points is the product of the factors' level counts. Heterogeneous level counts are allowed. No options; per-point replications are controlled by the document-level ReplicationSpec.

Link copied to clipboard
@Serializable
@SerialName(value = "manual")
data class Manual(val points: List<ManualPointSpec>) : DesignSpec

Hand-authored list of design points. Used to augment a generated design (e.g. add a specific factor combination to a CCD) or to specify a design that doesn't fit the other variants. Each entry pins one factor-setting map; per-point replications may override the document-level ReplicationSpec.

Link copied to clipboard
@Serializable
@SerialName(value = "twoLevelFactorial")
data class TwoLevelFactorial(val fraction: Fraction = Fraction.Full) : DesignSpec

Two-level factorial — every factor must have exactly 2 levels. fraction selects which subset of the full 2^k design the substrate enumerates: full, half-fraction (with sign), or a custom fractional design with explicit defining relations.