Using the Is_Full Output of a Reservoir

The Is_Full output is only available if you specify an Upper Bound for a Reservoir A stock element that integrates and conserves flows of materials.. It is a condition (False if the Reservoir is below the Upper Bound, and True if it is at the Upper Bound.

This output is useful because it is a special type of output called a state variable The output of an element in GoldSim whose value is computed based on the historical value of the element’s inputs (as opposed to only being a function of the current value of the element’s inputs). State variables have well-defined initial conditions. Feedback loops can only be created if they contain at least one state variable. (the primary output For an element with multiple outputs, the output that has the same name as the element. of a Reservoir is also a state variable). This has the important implication that inputs to the Reservoir (e.g., the Additions/Rate of Change) can reference this output without causing a recursive error.

As an example, suppose that you wanted to add water to a Reservoir only if it was not overflowing; once it started to overflow, you wanted the flow rate to go to zero. To accomplish this, you could define an Expression for the inflow rate as follows:

Unfortunately, because the Overflow_Rate is not a state variable, if you then tried to link this Expression into the Additions/Rate of Change input for the Reservoir, you would get this error:

However, you can solve this problem by using the Is_Full output:

If the Expression was defined as above, then you could link to this Expression into the Additions/Rate of Change field without causing a recursive error.