← All Use Cases
🌊
Full Factorial Design

Fish Farm Stocking Density

Full factorial of stocking density, feeding rate, water exchange, and aeration to maximize growth and minimize mortality

Summary

This experiment investigates fish farm stocking density. Full factorial of stocking density, feeding rate, water exchange, and aeration to maximize growth and minimize mortality.

The design varies 4 factors: density kg m3 (kg/m3), ranging from 10 to 40, feed pct bw (%BW), ranging from 1 to 4, exchange pct (%/day), ranging from 10 to 50, and aeration, ranging from low to high. The goal is to optimize 2 responses: growth g day (g/day) (maximize) and mortality pct (%) (minimize). Fixed conditions held constant across all runs include species = atlantic_salmon, cage = 10m_pen.

A full factorial design was used to explore all 16 possible combinations of the 4 factors at two levels. This guarantees that every main effect and interaction can be estimated independently, at the cost of a larger experiment (16 runs).

Quadratic response surface models were fitted to capture potential curvature and factor interactions. The RSM contour plots below visualize how pairs of factors jointly affect each response.

Key Findings

For growth g day, the most influential factors were exchange pct (39.1%), feed pct bw (31.9%), aeration (17.4%). The best observed value was 11.1 (at density kg m3 = 10, feed pct bw = 4, exchange pct = 10).

For mortality pct, the most influential factors were density kg m3 (64.6%), feed pct bw (14.6%), aeration (13.8%). The best observed value was 0.4 (at density kg m3 = 40, feed pct bw = 1, exchange pct = 50).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
density_kg_m31040kg/m3
feed_pct_bw14%BW
exchange_pct1050%/day
aerationlowhigh

Fixed: species = atlantic_salmon, cage = 10m_pen

Responses

ResponseDirectionUnit
growth_g_day↑ maximizeg/day
mortality_pct↓ minimize%

Configuration

use_cases/254_fish_farm_stocking/config.json
{ "metadata": { "name": "Fish Farm Stocking Density", "description": "Full factorial of stocking density, feeding rate, water exchange, and aeration to maximize growth and minimize mortality" }, "factors": [ { "name": "density_kg_m3", "levels": [ "10", "40" ], "type": "continuous", "unit": "kg/m3" }, { "name": "feed_pct_bw", "levels": [ "1", "4" ], "type": "continuous", "unit": "%BW" }, { "name": "exchange_pct", "levels": [ "10", "50" ], "type": "continuous", "unit": "%/day" }, { "name": "aeration", "levels": [ "low", "high" ], "type": "categorical", "unit": "" } ], "fixed_factors": { "species": "atlantic_salmon", "cage": "10m_pen" }, "responses": [ { "name": "growth_g_day", "optimize": "maximize", "unit": "g/day" }, { "name": "mortality_pct", "optimize": "minimize", "unit": "%" } ], "settings": { "operation": "full_factorial", "test_script": "use_cases/254_fish_farm_stocking/sim.sh" } }

Experimental Matrix

The Full Factorial Design produces 16 runs. Each row is one experiment with specific factor settings.

Rundensity_kg_m3feed_pct_bwexchange_pctaeration
110450high
240110high
310410high
410450low
540450low
640150low
740410low
840110low
910110high
1010150low
1140410high
1240450high
1310410low
1440150high
1510110low
1610150high

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/254_fish_farm_stocking/config.json
2

Generate the runner script

Terminal
$ doe generate --config use_cases/254_fish_farm_stocking/config.json \ --output use_cases/254_fish_farm_stocking/results/run.sh --seed 42
3

Execute the experiments

Terminal
$ bash use_cases/254_fish_farm_stocking/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/254_fish_farm_stocking/config.json
5

Get optimization recommendations

Terminal
$ doe optimize --config use_cases/254_fish_farm_stocking/config.json
6

Multi-objective optimization

With 2 competing responses, use --multi to find the best compromise via Derringer–Suich desirability.

Terminal
$ doe optimize --config use_cases/254_fish_farm_stocking/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/254_fish_farm_stocking/config.json \ --output use_cases/254_fish_farm_stocking/results/report.html

Features Exercised

FeatureValue
Design typefull_factorial
Factor typescontinuous (3), categorical (1)
Arg styledouble-dash
Responses2 (growth_g_day ↑, mortality_pct ↓)
Total runs16

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: growth_g_day

Top factors: exchange_pct (39.1%), feed_pct_bw (31.9%), aeration (17.4%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
density_kg_m310.76560.76560.1550.7099
feed_pct_bw15.88065.88061.1920.3247
exchange_pct18.85068.85061.7940.2381
aeration11.75561.75560.3560.5768
density_kg_m3*feed_pct_bw11.05061.05060.2130.6638
density_kg_m3*exchange_pct11.89061.89060.3830.5630
density_kg_m3*aeration15.88065.88061.1920.3247
feed_pct_bw*exchange_pct112.780612.78062.5910.1684
feed_pct_bw*aeration135.105635.10567.1160.0445
exchange_pct*aeration12.64062.64060.5350.4972
Error524.66814.9336
Total15101.26946.7513

Pareto Chart

Pareto chart for growth_g_day

Main Effects Plot

Main effects plot for growth_g_day

Normal Probability Plot of Effects

Normal probability plot for growth_g_day

Half-Normal Plot of Effects

Half-normal plot for growth_g_day

Model Diagnostics

Model diagnostics for growth_g_day

Response: mortality_pct

Top factors: density_kg_m3 (64.6%), feed_pct_bw (14.6%), aeration (13.8%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
density_kg_m3115.015615.015632.5980.0023
feed_pct_bw10.76560.76561.6620.2537
exchange_pct10.18060.18060.3920.5587
aeration10.68060.68061.4780.2784
density_kg_m3*feed_pct_bw12.17562.17564.7230.0818
density_kg_m3*exchange_pct141.280641.280689.6190.0002
density_kg_m3*aeration10.39060.39060.8480.3994
feed_pct_bw*exchange_pct10.00060.00060.0010.9720
feed_pct_bw*aeration10.52560.52561.1410.3343
exchange_pct*aeration10.18060.18060.3920.5587
Error52.30310.4606
Total1563.49944.2333

Pareto Chart

Pareto chart for mortality_pct

Main Effects Plot

Main effects plot for mortality_pct

Normal Probability Plot of Effects

Normal probability plot for mortality_pct

Half-Normal Plot of Effects

Half-normal plot for mortality_pct

Model Diagnostics

Model diagnostics for mortality_pct

Response Surface Plots

3D surfaces fitted with quadratic RSM. Red dots are observed data points.

growth g day density kg m3 vs exchange pct

RSM surface: growth g day density kg m3 vs exchange pct

growth g day density kg m3 vs feed pct bw

RSM surface: growth g day density kg m3 vs feed pct bw

growth g day feed pct bw vs exchange pct

RSM surface: growth g day feed pct bw vs exchange pct

mortality pct density kg m3 vs exchange pct

RSM surface: mortality pct density kg m3 vs exchange pct

mortality pct density kg m3 vs feed pct bw

RSM surface: mortality pct density kg m3 vs feed pct bw

mortality pct feed pct bw vs exchange pct

RSM surface: mortality pct feed pct bw vs exchange pct

Multi-Objective Optimization

When responses compete, Derringer–Suich desirability finds the best compromise. Each response is scaled to a 0–1 desirability, then combined via a weighted geometric mean.

Overall Desirability
D = 0.8228

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
growth_g_day 1.5
0.7727
9.40 0.7727 9.40 g/day
mortality_pct 1.0
0.9040
0.80 0.9040 0.80 %

Recommended Settings

FactorValue
density_kg_m340 kg/m3
feed_pct_bw4 %BW
exchange_pct10 %/day
aerationlow

Source: from observed run #1

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
mortality_pct0.800.40+0.40

Top 3 Runs by Desirability

RunDFactor Settings
#120.7141density_kg_m3=40, feed_pct_bw=1, exchange_pct=10, aeration=low
#40.6623density_kg_m3=10, feed_pct_bw=4, exchange_pct=50, aeration=low

Model Quality

ResponseType
mortality_pct0.0254linear

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.8228 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- growth_g_day 1.5 0.7727 9.40 g/day ↑ mortality_pct 1.0 0.9040 0.80 % ↓ Recommended settings: density_kg_m3 = 40 kg/m3 feed_pct_bw = 4 %BW exchange_pct = 10 %/day aeration = low (from observed run #1) Trade-off summary: growth_g_day: 9.40 (best observed: 11.10, sacrifice: +1.70) mortality_pct: 0.80 (best observed: 0.40, sacrifice: +0.40) Model quality: growth_g_day: R² = 0.0379 (linear) mortality_pct: R² = 0.0254 (linear) Top 3 observed runs by overall desirability: 1. Run #1 (D=0.8228): density_kg_m3=40, feed_pct_bw=4, exchange_pct=10, aeration=low 2. Run #12 (D=0.7141): density_kg_m3=40, feed_pct_bw=1, exchange_pct=10, aeration=low 3. Run #4 (D=0.6623): density_kg_m3=10, feed_pct_bw=4, exchange_pct=50, aeration=low

Full Analysis Output

doe analyze
=== Main Effects: growth_g_day === Factor Effect Std Error % Contribution -------------------------------------------------------------- exchange_pct 1.4875 0.6496 39.1% feed_pct_bw -1.2125 0.6496 31.9% aeration 0.6625 0.6496 17.4% density_kg_m3 0.4375 0.6496 11.5% === ANOVA Table: growth_g_day === Source DF SS MS F p-value ----------------------------------------------------------------------------- density_kg_m3 1 0.7656 0.7656 0.155 0.7099 feed_pct_bw 1 5.8806 5.8806 1.192 0.3247 exchange_pct 1 8.8506 8.8506 1.794 0.2381 aeration 1 1.7556 1.7556 0.356 0.5768 density_kg_m3*feed_pct_bw 1 1.0506 1.0506 0.213 0.6638 density_kg_m3*exchange_pct 1 1.8906 1.8906 0.383 0.5630 density_kg_m3*aeration 1 5.8806 5.8806 1.192 0.3247 feed_pct_bw*exchange_pct 1 12.7806 12.7806 2.591 0.1684 feed_pct_bw*aeration 1 35.1056 35.1056 7.116 0.0445 exchange_pct*aeration 1 2.6406 2.6406 0.535 0.4972 Error 5 24.6681 4.9336 Total 15 101.2694 6.7513 === Interaction Effects: growth_g_day === Factor A Factor B Interaction % Contribution ------------------------------------------------------------------------ feed_pct_bw aeration 2.9625 37.1% feed_pct_bw exchange_pct 1.7875 22.4% density_kg_m3 aeration 1.2125 15.2% exchange_pct aeration 0.8125 10.2% density_kg_m3 exchange_pct 0.6875 8.6% density_kg_m3 feed_pct_bw -0.5125 6.4% === Summary Statistics: growth_g_day === density_kg_m3: Level N Mean Std Min Max ------------------------------------------------------------ 10 8 6.5750 2.7254 2.6000 11.1000 40 8 7.0125 2.6325 3.5000 10.6000 feed_pct_bw: Level N Mean Std Min Max ------------------------------------------------------------ 1 8 7.4000 2.2207 4.8000 11.1000 4 8 6.1875 2.9488 2.6000 10.6000 exchange_pct: Level N Mean Std Min Max ------------------------------------------------------------ 10 8 6.0500 2.5740 2.6000 11.1000 50 8 7.5375 2.5646 3.5000 10.6000 aeration: Level N Mean Std Min Max ------------------------------------------------------------ high 8 6.4625 3.1296 2.6000 11.1000 low 8 7.1250 2.1029 4.8000 10.6000 === Main Effects: mortality_pct === Factor Effect Std Error % Contribution -------------------------------------------------------------- density_kg_m3 1.9375 0.5144 64.6% feed_pct_bw -0.4375 0.5144 14.6% aeration 0.4125 0.5144 13.8% exchange_pct 0.2125 0.5144 7.1% === ANOVA Table: mortality_pct === Source DF SS MS F p-value ----------------------------------------------------------------------------- density_kg_m3 1 15.0156 15.0156 32.598 0.0023 feed_pct_bw 1 0.7656 0.7656 1.662 0.2537 exchange_pct 1 0.1806 0.1806 0.392 0.5587 aeration 1 0.6806 0.6806 1.478 0.2784 density_kg_m3*feed_pct_bw 1 2.1756 2.1756 4.723 0.0818 density_kg_m3*exchange_pct 1 41.2806 41.2806 89.619 0.0002 density_kg_m3*aeration 1 0.3906 0.3906 0.848 0.3994 feed_pct_bw*exchange_pct 1 0.0006 0.0006 0.001 0.9720 feed_pct_bw*aeration 1 0.5256 0.5256 1.141 0.3343 exchange_pct*aeration 1 0.1806 0.1806 0.392 0.5587 Error 5 2.3031 0.4606 Total 15 63.4994 4.2333 === Interaction Effects: mortality_pct === Factor A Factor B Interaction % Contribution ------------------------------------------------------------------------ density_kg_m3 exchange_pct 3.2125 66.2% density_kg_m3 feed_pct_bw -0.7375 15.2% feed_pct_bw aeration -0.3625 7.5% density_kg_m3 aeration 0.3125 6.4% exchange_pct aeration -0.2125 4.4% feed_pct_bw exchange_pct -0.0125 0.3% === Summary Statistics: mortality_pct === density_kg_m3: Level N Mean Std Min Max ------------------------------------------------------------ 10 8 2.5750 1.6935 0.4000 4.7000 40 8 4.5125 2.0145 2.2000 7.6000 feed_pct_bw: Level N Mean Std Min Max ------------------------------------------------------------ 1 8 3.7625 2.4195 0.4000 7.6000 4 8 3.3250 1.7629 0.8000 5.6000 exchange_pct: Level N Mean Std Min Max ------------------------------------------------------------ 10 8 3.4375 0.9319 2.2000 4.7000 50 8 3.6500 2.8596 0.4000 7.6000 aeration: Level N Mean Std Min Max ------------------------------------------------------------ high 8 3.3375 1.9835 0.4000 6.3000 low 8 3.7500 2.2450 0.8000 7.6000

Optimization Recommendations

doe optimize
=== Optimization: growth_g_day === Direction: maximize Best observed run: #12 density_kg_m3 = 10 feed_pct_bw = 4 exchange_pct = 10 aeration = high Value: 11.1 RSM Model (linear, R² = 0.5904, Adj R² = 0.4414): Coefficients: intercept +6.7938 density_kg_m3 -0.0188 feed_pct_bw -0.0688 exchange_pct -0.8313 aeration -1.7437 RSM Model (quadratic, R² = 0.9359, Adj R² = 0.0390): Coefficients: intercept +1.3588 density_kg_m3 -0.0187 feed_pct_bw -0.0688 exchange_pct -0.8313 aeration -1.7438 density_kg_m3*feed_pct_bw +0.4188 density_kg_m3*exchange_pct +0.9063 density_kg_m3*aeration -0.5062 feed_pct_bw*exchange_pct -0.2437 feed_pct_bw*aeration -0.2313 exchange_pct*aeration +0.9063 density_kg_m3^2 +1.3588 feed_pct_bw^2 +1.3588 exchange_pct^2 +1.3588 aeration^2 +1.3588 Curvature analysis: aeration coef=+1.3588 convex (has a minimum) density_kg_m3 coef=+1.3588 convex (has a minimum) feed_pct_bw coef=+1.3588 convex (has a minimum) exchange_pct coef=+1.3588 convex (has a minimum) Notable interactions: density_kg_m3*exchange_pct coef=+0.9063 (synergistic) exchange_pct*aeration coef=+0.9063 (synergistic) density_kg_m3*aeration coef=-0.5062 (antagonistic) density_kg_m3*feed_pct_bw coef=+0.4188 (synergistic) Predicted optimum (from linear model, at observed points): density_kg_m3 = 10 feed_pct_bw = 1 exchange_pct = 10 aeration = high Predicted value: 9.4563 Surface optimum (via L-BFGS-B, linear model): density_kg_m3 = 10 feed_pct_bw = 1 exchange_pct = 10 aeration = low Predicted value: 9.4563 Model quality: Moderate fit — use predictions directionally, not precisely. Factor importance: 1. aeration (effect: -3.5, contribution: 65.5%) 2. exchange_pct (effect: -1.7, contribution: 31.2%) 3. feed_pct_bw (effect: -0.1, contribution: 2.6%) 4. density_kg_m3 (effect: -0.0, contribution: 0.7%) === Optimization: mortality_pct === Direction: minimize Best observed run: #16 density_kg_m3 = 40 feed_pct_bw = 1 exchange_pct = 50 aeration = low Value: 0.4 RSM Model (linear, R² = 0.1998, Adj R² = -0.0912): Coefficients: intercept +3.5438 density_kg_m3 +0.4437 feed_pct_bw +0.7187 exchange_pct +0.0187 aeration -0.2813 RSM Model (quadratic, R² = 0.6566, Adj R² = -4.1516): Coefficients: intercept +0.7088 density_kg_m3 +0.4438 feed_pct_bw +0.7187 exchange_pct +0.0188 aeration -0.2812 density_kg_m3*feed_pct_bw +0.0937 density_kg_m3*exchange_pct -0.3812 density_kg_m3*aeration -1.1812 feed_pct_bw*exchange_pct +0.3187 feed_pct_bw*aeration -0.0813 exchange_pct*aeration +0.3937 density_kg_m3^2 +0.7088 feed_pct_bw^2 +0.7088 exchange_pct^2 +0.7088 aeration^2 +0.7088 Curvature analysis: aeration coef=+0.7088 convex (has a minimum) density_kg_m3 coef=+0.7088 convex (has a minimum) exchange_pct coef=+0.7088 convex (has a minimum) feed_pct_bw coef=+0.7088 convex (has a minimum) Notable interactions: density_kg_m3*aeration coef=-1.1812 (antagonistic) exchange_pct*aeration coef=+0.3937 (synergistic) density_kg_m3*exchange_pct coef=-0.3812 (antagonistic) feed_pct_bw*exchange_pct coef=+0.3187 (synergistic) Predicted optimum (from linear model, at observed points): density_kg_m3 = 40 feed_pct_bw = 4 exchange_pct = 50 aeration = high Predicted value: 5.0063 Surface optimum (via L-BFGS-B, linear model): density_kg_m3 = 10 feed_pct_bw = 1 exchange_pct = 10 aeration = high Predicted value: 2.0813 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. feed_pct_bw (effect: 1.4, contribution: 49.1%) 2. density_kg_m3 (effect: 0.9, contribution: 30.3%) 3. aeration (effect: -0.6, contribution: 19.2%) 4. exchange_pct (effect: 0.0, contribution: 1.3%)
← Previous: Tidal Turbine Placement All Use Cases →