Designed Experiment App

July 15, 2026 · View on GitHub

The Experiment app runs a designed experiment: it varies two or more model inputs (called factors) over a planned grid of values, runs every combination, and fits a regression model so you can see how each factor affects a response.

You will need: Java 21 and a model bundle. This guide uses the LK (s,S) inventory model from the KSL Book Examples bundle. New here? Read Common UI & concepts and the Single-Model guide first.

What you'll be able to do

  • Choose a model and pick the inputs to study as factors, each with low/high levels.
  • Build a full-factorial design and preview its design points.
  • Run all design points at once.
  • Read a regression that quantifies each factor's effect on a response.

1. At a glance

Experiment app — Factors tab

You move left-to-right through the tabs — Model → Factors → Design → Simulate → Regression — building the study, then reading the fitted model.

Use this app when…Use a sibling app when…
You want to measure the effect of inputs over a grid.You have a few hand-picked configs → Scenario app
You want a regression / response surface.You want the best inputs found automatically → Simopt app

2. Before you begin

Load the model from a bundle (see Common UI → Models and bundles). Results are written under your working directory. Enabling the database persists the run to SQLite for later analysis (e.g. in the Results app); the in-app Comparison Analyzer and regression work on the most recent run's results in memory and don't require it.


3. A guided tour of the window

Guided tour of the Experiment window

  1. Menu barFile, Bundles, View.
  2. Tabs — the workflow, left to right: Model, Factors, Design, Simulate, Regression, Comparison Analyzer, Reports. A summary banner under the toolbar always shows the current model, factor count, design, replications, and total runs.
  3. Simulate — runs every design point (on the Simulate tab).
  4. Console drawer — the run log.

4. Tutorial — a 2×2 factorial on the inventory model

Step 1 — Pick the model (Model tab)

On the Model tab, select the LK (s,S) Inventory model. The tab shows its controls (inputs you can study) and responses (outputs you can measure).

Step 2 — Define the factors (Factors tab)

Click Add Factor for each input to vary. Bind each factor to a model control and give it two levels:

FactorBound controlLevels
Reorder PointInventory.reorderPoint20, 40
Order QuantityInventory.orderQuantity40, 80

The factor editor (lower half of the screenshot in §1) lets you pick the control from a drop-down and type comma-separated levels. The banner updates to "2 factors · …".

Step 3 — Choose the design (Design tab)

Experiment app — Design tab

Pick Full factorial. With two factors at two levels each, that's 2×2 = 4 design points. Set Replications → Uniform, 10 so each point runs 10 times (40 runs total). Click View design points… to preview the exact combinations before running.

Step 4 — Run (Simulate tab)

On the Simulate tab, choose an execution mode and click Simulate. A status table shows each design point advancing to Completed.

Reading the results — the regression

The headline output is on the Regression tab: a model of a response as a function of the factors. Below is the fit of Total Cost for this experiment (coded factors, −1/+1).

The four design points and their average total cost:

PointReorder PointOrder QuantityAvg Total Cost
12040120.34
22080127.87
34040125.49
44080139.94

The fitted first-order model (R² = 0.82) and its coefficients:

PredictorEstimateStd Errortp-valueSig.
Intercept128.410.37344.90.0000***
Reorder Point4.310.3711.60.0000***
Order Quantity5.490.3714.80.0000***

How to read it. Both coefficients are positive and highly significant (p < 0.001), so over the studied range, raising either the reorder point or the order quantity increases total cost — order quantity slightly more (5.49 vs 4.31 per coded unit). The model explains 82% of the variation (R² = 0.82). The residual diagnostic plots check that the fit's assumptions hold:

Residuals vs fitted values


5. Reference — every tab explained

TabWhat it's for
ModelChoose the model; view its controls and responses.
FactorsDefine factors, bind each to a control (or RV parameter), set levels.
DesignChoose a design family (Full / Two-level factorial, Central composite, or Custom points) and set replications. View design points… previews the grid.
SimulateRun all design points; watch the per-point status table.
RegressionFit a linear model to a chosen response; open/save the report.
Comparison AnalyzerCompare responses across design points (box plots, CIs, MCB). Shared with the Results app.
ReportsGenerated batch reports (HTML / Markdown / CSV).

6. Common tasks

TaskHow
Study a third inputAdd Factor and bind it; the design grows automatically
Reduce runs for many factorsUse a Two-level factorial (or fractional) design
See the exact runs before simulatingDesign → View design points…
Add the interaction term to the fitChoose an all-terms model on the Regression tab
Save / reopen the studyFile → Save / Open (a .toml document)

7. Troubleshooting & gotchas

SymptomCauseFix
Banner shows a validation warningA factor's control isn't resolvable, or it has < 2 levels.Re-bind the control; give each factor at least two distinct levels.
Two-level design rejectedA factor has more than two levels.Two-level designs need exactly two levels per factor.
Regression looks "perfect" (R² = 1)A saturated model (as many terms as points).Add replications, or fit a smaller (first-order) model.
Comparison Analyzer is emptyNo run yet this session (it reads the last run's in-memory results).Simulate the design points first.

8. See also