The SD Model in Depth
Transformers
A transformer is a new basic system dynamics function that eliminates a significant source of modeling errors and simplifies many models for the user. Transformers perform a “transformation” function to change one or more different goods in the model into a new good. The outflow is related to one or more dissimilar inflows by a simple “exchange rate” relationship or a ratio.
A Transformer is analogous to a “macro”. A transformer can be modeled from a collection of conventional stocks, flows, converters and variables. Transformers present the appearance of a stock to an inflow and behave like a flow to deliver the resulting good to stocks, other transformers or factories in the model.
Three transformer types are defined for the Model Builder process:
•Unconstrained Transformer changes all of an incoming good sent from a modeled flow into a different good according to a configured “exchange rate”.
•Adjusted Transformer changes a calculated amount of an incoming good sent from a modeled flow into a specified amount of different good according to a configured “exchange rate”.
•Custom Transformer incorporates the combined characteristics of both adjusted and delayed transformers, and adds refinements to their models such as multiple inflows, transformer wastage, inflow accumulation thresholding for any inflow that the user configures, and outflow constraint.
Unconstrained Transformers
The transformer symbol is a stylized right-pointing isosceles triangle. The following is an unconstrained transformer symbol:
An unconstrained transformer may be modeled with conventional system dynamics functions in the following manner:
Modeled Transformers
The following is an adjusted transformer symbol:
An adjusted transformer may be modeled in the following manner:
The following is a Custom Transformer symbol:
A customized transformer is an expandable model component with an core structure, and a generic structure. Expanding a customized transformer requires an additional generic structure in the underlying model of the transformer.
A customized transformer may be modeled in the following manner:
The customized transformer model above does not reflect several elements that may be added in the future. In particular, transformers may need to consume incoming flows or produce outgoing flows in integer increments. While the outflow case is reasonable handled as long as inflow capacity is sufficient, integer outflows less than the required outflow is not accommodated.
Attributes configured by the Model Builder user for any transformer:
•GOOD - the good for each transformer inflow and outflow
•UNIT - the unit of measure for the good in each transformer inflow and outflow
•ANIMATE - a value of “NO” (default) or “YES”
•GRAPH - display a high quality formatted graph of OUTFLOW; a value of “NO” (default) or “YES”
•TABLE - display a high quality formatted table of OUTFLOW; a value of “NO” (default) or “YES”
•ABSTRACT - publish OUTFLOW to abstraction layers; a value of “NO” (default) or “YES”
•COST - publish COST attributes to abstraction layers; a value of “NO” (default) or “YES”
Attributes optionally configured by the Model Builder user for any transformer to describe the corresponding Cost Abstraction Layer basis:
•COST ACCUM PERIODIC` - accumulate cost for the period described in the simulation specification; a value of “NO” (default) or “YES”
•COST FIRST - a one-time “first cost” assessed only in the first interval
•COST TIME - a cost per time interval
•COST GOOD - a cost per unit of good outflowed
Attributes configured by the Model Builder user for an adjusted modeled transformer:
•OUTFLOW FORMULA - the formula to calculate the transformer’s target outflow rate “V” from the inflow exchange rate constants “ki”
•OUTFLOW THRESHOLDS - “NONE” (default) or values for MN range, MJ range, CR range
The attributes of the customized transformer are a “superset” of attributes including those of the adjusted transformer and the delayed transformer defined above. In addition, the following attributes are configured by the Model Builder user for a customized transformer:
•DELAY INITIAL - the transformer outflow’s initial delay
•DELAY FORMULA - the formula to calculate the transformer outflow’s delay value
•DELAY THRESHOLDS - “NONE” (default) or values for MN range, MJ range, CR range
•WASTE - a value of “NO” (default) or “YES-IN” to leak a portion of the inflows or “YES-OUT” to leak a portion of the outflow
•WASTE FORMULA - the formula to calculate the leakage of the outflow
•WASTE THRESHOLDS - “NONE” (default) or values for MN range, MJ range, CR range
•LEVEL THRESHOLDS - “NONE” (default) or values for MN range, MJ range, CR range for each inflow stock
•CONSTRAIN POS - transformer OUTFLOW > CONSTRAINT not allowed; a value of “NO” (default) or “YES”
•CONSTRAINT POS - maximum transformer OUTFLOW value
•OUTFLOW INCREMENT - the incremental number of units outflowed at a time; a value of “NONE” or a specific numeric value
Component Interfaces on a transformer allowed by the Model Builder process:
•to any type of stock
•from any type of modeled flow
•to any type of transformer
•from or to a factory according to its unique rules
•from or to a model component as an internal variable value
•from an external variable or an adjusted variable
Error Conditions detected and prohibited by the Model Builder process:
•INCONSISTENT GOOD OR UNITS – an attempt to connect to stocks, transformers and factories when GOOD or UNIT has already been defined on the other side of the outflow and they are inconsistent
Other Behaviors and Characteristics:
•a delayed modeled transformer is strictly FIFO by definition
•the GOOD and UNITS of a transformer are implicit if the transformer is connected through a flow to a stock where GOOD and UNITS have been previously defined
Transformers
Unconstrained Transformers
Modeled Transformers
Abstraction Layers, Fragments and Scripts
Appendix: The Modeling Process