Posted by Jason Lillywhite
Modeling sequential, time-dependent processes lies at the heart of many dynamic simulations. But what happens when the duration of each step is uncertain or changing during the simulation? Consider simulating crop growth stages based on the FAO Irrigation and Drainage paper 56 for modeling crop water demand. Accurately capturing the variability in crop stage durations is important, and ensuring stages trigger correctly using traditional conditional logic can become complex and error-prone under uncertain conditions. A previous version of the model described here that I built years ago relied heavily on nested IF statements to manage stage transitions. I was always bothered by this implementation, knowing that if the precise duration of each stage wasn't fixed at the simulation start, dynamically ensuring the correct sequence could become extremely difficult to implement reliably.
![]() |
Screen Capture of the Crop Growing Season Scheduler using Conditional Containers |
This post explores how GoldSim's Conditional Containers provide an improved solution. I'll walk through the new version where each growth stage resides in its own Container, dynamically triggered by the completion of the previous one (as shown in the model structure pictured). Discover how this approach not only simplifies the representation of sequential logic but also seamlessly integrates stochastic durations, leading to a more robust, understandable, and maintainable model for Monte Carlo analysis. Read on to see this powerful technique in action!