Vertical Farm Crop Racks: Optimizer Example | Vose Software

ModelRisk Optimizer example · Agriculture and food

Vertical Farm: Crop Rack Allocation

How many grow-racks should each crop get to maximise expected profit within the light and water budgets?

  • Complexity: ★★★★★
  • Free Excel workbook
  • Needs ModelRisk with the Optimizer

The optimisation problem

Highest mean profit

Decide
Grow-racks for 4 crops
Goal
Highest mean profit
Limit
Light no more than 4,000 kWh and water no more than 2,600 L
Engine
Projected Gradient

What the Optimizer found

Starting planOptimizer’s plan
Micro-greens40120
Leafy salad50139
Culinary herbs2059
Vine tomato258
Goal: Expected profit ($/cycle)15,50137,355
Limit: Lighting use (kWh), at most 4,0001,730 met3,999 met
Limit: Water use (L), at most 2,6001,135 met2,588 met

ModelRisk Optimizer run on 13 Oct 2026: the Projected Gradient engine, with Turbo simulation, tried 309 plans, each simulated with 10,000 samples, in 3 seconds. Both plans above were then simulated again with the same 10,000 samples.

What the workbook models

An indoor vertical farm has a fixed stack of grow-racks and must split them among 4 crops each cycle. Each crop earns a known price per rack but its growing (energy + nutrient) cost per rack is uncertain (lognormal). Racks also draw lighting energy and irrigation water, both capped per cycle.

Decision, objective and constraint

Decision variables
4 integer rack counts (Model!B11:B14), each within its Min/Max
Objective
Maximise the Mean profit = Σ racks × (price − uncertain cost), Model!C17
Hard constraints
lighting use ≤ 4,000 kWh (C18) and water use ≤ 2,600 L (C19)

The engine: why Projected Gradient

Expected profit is linear in the rack counts (the mean margin is a constant per crop) and both resource limits are linear. Every statistic is a point statistic (Mean / Value).

Method = Auto proves the model affine with its central-values probe and routes it to Projected Gradient — ModelRisk's equivalent of Excel Solver's GRG — which walks the binding resource constraints straight to the optimal rack mix.

The model

Choose how many grow-racks to devote to each crop to maximise expected profit within light and water budgets.

InputDecision (the Optimizer changes it)Calculated or uncertain (sampled each iteration)Objective

Facility resource budgets

Lighting energy budget (kWh/cycle)4,000
Irrigation water budget (L/cycle)2,600

Crops (decision = integer racks per crop)

CropRacks (dec.)MinMaxPrice/rack $Unit cost $ (uncertain)Margin $Light kWh/rackWater L/rack
Micro-greens4010120190uncertaincalculated12.07.0
Leafy salad5020140150uncertaincalculated9.06.0
Culinary herbs20560320uncertaincalculated20.014.0
Vine tomato25890240uncertaincalculated16.011.0

Results

Expected profit ($/cycle): objectivecalculated
Lighting use (kWh): constraintcalculated
Water use (L): constraintcalculated

Decision cells hold starting values: the workbook opens at the starting plan above, and the Optimizer finds its plan when you run it. The figures are illustrative.

Run it yourself. Open the workbook with ModelRisk, open the Optimizer from the ribbon (the saved task opens with it) and press Start.

How to run it

  1. Optimizer opens the saved task.
  2. Start Optimization.
  3. Optimal rack counts in B11:B14.
  4. Simulation: 1000 Monte-Carlo iterations per trial (the objective is the Mean of an uncertain margin).

Glossary

Grow-rack
a vertically stacked shelf of hydroponic trays under LED lighting
Margin
price per rack minus the uncertain per-rack growing cost
Point statistic
a single-number summary (Mean or deterministic Value) — no tail/percentile

Find similar models