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
- Consider whether any fixed factors should be varied in a future study.
Experimental Setup
Factors
| Factor | Low | High | Unit |
density_kg_m3 | 10 | 40 | kg/m3 |
feed_pct_bw | 1 | 4 | %BW |
exchange_pct | 10 | 50 | %/day |
aeration | low | high | |
Fixed: species = atlantic_salmon, cage = 10m_pen
Responses
| Response | Direction | Unit |
growth_g_day | ↑ maximize | g/day |
mortality_pct | ↓ minimize | % |
Configuration
{
"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.
| Run | density_kg_m3 | feed_pct_bw | exchange_pct | aeration |
| 1 | 10 | 4 | 50 | high |
| 2 | 40 | 1 | 10 | high |
| 3 | 10 | 4 | 10 | high |
| 4 | 10 | 4 | 50 | low |
| 5 | 40 | 4 | 50 | low |
| 6 | 40 | 1 | 50 | low |
| 7 | 40 | 4 | 10 | low |
| 8 | 40 | 1 | 10 | low |
| 9 | 10 | 1 | 10 | high |
| 10 | 10 | 1 | 50 | low |
| 11 | 40 | 4 | 10 | high |
| 12 | 40 | 4 | 50 | high |
| 13 | 10 | 4 | 10 | low |
| 14 | 40 | 1 | 50 | high |
| 15 | 10 | 1 | 10 | low |
| 16 | 10 | 1 | 50 | high |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/254_fish_farm_stocking/config.json
2
Generate the runner script
$ 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
$ bash use_cases/254_fish_farm_stocking/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/254_fish_farm_stocking/config.json
5
Get optimization recommendations
$ 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.
$ doe optimize --config use_cases/254_fish_farm_stocking/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/254_fish_farm_stocking/config.json \
--output use_cases/254_fish_farm_stocking/results/report.html
Features Exercised
| Feature | Value |
| Design type | full_factorial |
| Factor types | continuous (3), categorical (1) |
| Arg style | double-dash |
| Responses | 2 (growth_g_day ↑, mortality_pct ↓) |
| Total runs | 16 |
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
| Source | DF | SS | MS | F | p-value |
| 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 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: mortality_pct
Top factors: density_kg_m3 (64.6%), feed_pct_bw (14.6%), aeration (13.8%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| 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 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response Surface Plots
3D surfaces fitted with quadratic RSM. Red dots are observed data points.
growth g day density kg m3 vs exchange pct
growth g day density kg m3 vs feed pct bw
growth g day feed pct bw vs exchange pct
mortality pct density kg m3 vs exchange pct
mortality pct density kg m3 vs feed pct bw
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
| Response | Weight | Desirability | Predicted | Dir |
growth_g_day |
1.5 |
|
9.40 0.7727 9.40 g/day |
↑ |
mortality_pct |
1.0 |
|
0.80 0.9040 0.80 % |
↓ |
Recommended Settings
| Factor | Value |
density_kg_m3 | 40 kg/m3 |
feed_pct_bw | 4 %BW |
exchange_pct | 10 %/day |
aeration | low |
Source: from observed run #1
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
mortality_pct | 0.80 | 0.40 | +0.40 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #12 | 0.7141 | density_kg_m3=40, feed_pct_bw=1, exchange_pct=10, aeration=low |
| #4 | 0.6623 | density_kg_m3=10, feed_pct_bw=4, exchange_pct=50, aeration=low |
Model Quality
| Response | R² | Type |
mortality_pct | 0.0254 | linear |
Full Multi-Objective Output
============================================================
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
=== 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
=== 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%)