If you have some flow of material or a transaction and need to divide it up or allocate it, likely you will use the Allocator or Splitter element in GoldSim. While these elements are very powerful and make the job a lot easier, there is one condition for which it was not specifically built: handling an array of input amounts. To address this, we have added some nice examples to our library that allow you to simulate allocations and splits on arrays of data. These examples provide an easy way to build powerful models that might have otherwise been quite difficult to build and maintain. I tested the array splitter example model using a real-world example that simulates rainfall runoff in a new stormwater management system, and this is described in this post.
Array Splitter and Allocator
The Splitter and Allocator elements don't support non-scalar data types. This means for an array of inputs, you would have to create one Splitter element for each item of the array of inputs to handle this in the traditional way. The new array Splitter and Allocator model examples provide alternative methods to support vector data types without having to maintain multiple Splitter elements. You can simply plug this example into your project without significant configuration work. To demonstrate how these examples might be used in the real world, I have created a model that uses the vector type Splitter element example. I found I was able to plug it in and rapidly build the model, which turned out to be much easier than I expected.
Using the Array Splitter Example in a Real-World Project
A few years ago, I created a rainfall-runoff model to support a Letter of Map Revision (LOMR) for a large subdivision being built in northern Utah. This model was originally built in HEC-HMS to simulate runoff from 7 subbasins within a watershed. Because of residential and commercial development being planned in this watershed, a LOMR was to be submitted, showing that there would be no adverse impact to existing flood zones downstream of this new development. Four new detention ponds were designed to attenuate and regulate stormwater runoff after the development was built. These ponds were designed using the HEC-HMS model by simulating the rainfall, runoff, and routing of flows through the watershed and new ponds for pre and post-development scenarios. A screen capture of the HEC-HMS model is shown on the right.
Since the area of this project is semi-arid, I felt it would be appropriate to use the Australian Water Balance Model (AWBM) implemented in GoldSim to replicate the HEC-HMS model. This model uses a Splitter element to distribute rainfall excess to surface runoff and baseflow. Since the watershed was divided into 7 subbasins, it would mean that I need to copy and paste the AWBM model 7 times. This would be a lot of work to maintain so instead, I plugged in the Vector Type Splitter example to "vectorize" the AWBM model, which allowed me to calculate the subbasin outflows as an array. This significantly reduces the amount of elements used and simplifies future maintenance of the model. Below is a screen capture showing the vector Splitter container plugged into the AWBM model.
Once the runoff was calculated for each item of the array of subbasins, it was a simple matter of referring to each item of the array using Expression elements, as seen in the screen capture below (i.e., "Subbasin_1", etc.). I used our Detention Pond model example from our library to simulate the 5 new ponds that would regulate the runoff within the watershed (represented using containers "DP1", "DP2", etc.).
I used GoldSim's optimization to calibrate the model by adjusting the surface store depths to achieve a closeness of fit at the discharge point of each node in the model. A time history plot of the overall discharge from the watershed is shown in the plot below along with a comparison to the discharge calculated using HEC-HMS. A copy of the GoldSim model can be downloaded from our library, here.
I remember a challenge of the original HEC-HMS project was in developing and comparing results of various scenarios as the client was considering different development options. Many of the scenarios had to be stored in different project files instead of just storing the scenario data, which is how GoldSim works. With this model in GoldSim, it would be very simple to add scenarios, define scenario data, and plot comparisons of output. In addition, stochastic inputs could be added to look more closely at risk factors and probabilities of flooding downstream.