Run TEA, uncertainty, sensitivity, and optimization
Keep one BioSTEAM result identity through baseline TEA, uncertainty, sensitivity, and optimization.
1. Build a stable reference process
list_biorefinery_models
→ build_system(model_name="cornstover")
→ get_stream_results(...)
→ get_unit_results(...)
→ get_tea_results(result_id=...)Do not run uncertainty or optimization until the reference process simulates cleanly and the baseline assumptions are understood.
2. Save the baseline TEA
The current TEA result includes FCI, FOC, VOC, NPV, and minimum selling price when the model has a product stream. Save the baseline before mutating the stored system.
3. Define economic uncertainty
[
{"name": "Feedstock price", "target": "feedstock_price", "dist": ["triangle", 0.8, 1.0, 1.2]},
{"name": "IRR", "target": "IRR", "dist": ["uniform", 0.08, 0.15]}
]Supported uncertainty targets are feedstock_price, electricity_price, and IRR. Numerical bounds are study inputs; document their meaning and source.
4. Run uncertainty and sensitivity
run_uncertainty(result_id=..., parameters=[...], N=200, seed=42)
→ run_sensitivity(result_id=...)Sensitivity uses Spearman rank correlations from the most recent uncertainty run on that stored result.
5. Optimize a unit variable
[{"unit_id": "F1", "attr": "V", "bounds": [0.35, 0.65]}]optimize(result_id=..., variables=[...], objective="MSP", maxiter=20)Supported objectives are MSP (minimize) and NPV (maximize).
Optimization changes the stored process
Warning
The optimizer leaves the stored process system at the optimum. Rebuild the reference process or keep a separate result if you need a clean baseline afterward.
Review variable bounds, unit constraints, thermodynamics, convergence, equipment sizing, utilities, cost correlations, and operational feasibility before accepting an optimum.