Understanding Output Attributes
All element outputs in GoldSim have three
- Type: The output type is either a value or a condition. Values can take on any real number. Conditions have only two states: True or False.
- Order: The order of an output can be scalar An output consisting of a single value or condition., vector A one-dimensional array. or matrix A two-dimensional array.. A scalar is a single item. A vector is a column (or row) of items. A matrix is a table (with rows and columns) of items.
- Dimensions: Outputs can be assigned dimensions (e.g., length, volume, velocity) which can be displayed in any units that you choose (meters, gallons, feet/second). Dimensions can only be assigned to values (not to conditions).
Most GoldSim outputs default to being dimensionless, scalar values.
Output attributes are important because GoldSim uses them to ensure consistency between inputs and outputs when you link elements. That is, when you define the output attributes for an element, this also affects the required input attributes for that element.
For example, if you assign units of liters to a Reservoir A stock element that integrates and conserves flows of materials. element, GoldSim will only accept an input into the "Initial Value" field for the Reservoir which has dimensions of volume. (For those readers with programming experience, this is analogous to a programming language which is strongly-typed.)
Note: The strong-typing built into GoldSim may at first appear bothersome: until you get used to ensuring that the inputs to an element are consistent with the specified output attributes, you may wish that GoldSim did not enforce this. It is our experience, however, that users quickly become accustomed to this requirement and greatly appreciate it as they become more proficient with the program. The idea is that a small amount of inconvenience when you first begin to learn the tool is more than made up for in the prevention of errors as you are building your models.
Note: The output attributes refer to the primary output For an element with multiple outputs, the output that has the same name as the element. of the element. For elements with multiple outputs, the attributes of the secondary outputs are automatically inferred by GoldSim based on the attributes of the primary output.
For some types of elements (e.g., an Expression), you can specify all three output attributes. For others, some output attributes are fixed and cannot be changed by the user. For example, the output of a Reservoir is always a value (only the order and dimension can be specified), and the output of a logical element (And, Or, Not) is always a scalar condition (in this case, the output attributes are completely fixed).
The output attributes that
you will most commonly specify are the dimensions.
Dimensions are specified by defining the
If the other two attributes (order and type) can be modified for an element, a Type... button will be present in the dialog immediately to the right of the Display Units. Pressing this button displays the following dialog:
Many models can be built using only scalar values. Vectors and matrices, however, are very powerful, and you will want to take advantage of them for more complex simulations.
Although the use of condition outputs is not necessarily required in GoldSim (in many cases you can accomplish the same thing using values), their use can streamline and add clarity to a model. Conditions are particularly useful when modeling discrete events.