All element outputs in GoldSim have three output attributes: a type, an order, and dimensions:
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, vector or matrix. 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 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 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 Display Units for the element. For any element which can be assigned dimensions, the Display Units can be specified on the main dialog (directly below the Description field). Note that if the output is defined as a condition (rather than a value), the Display Units field is grayed out.
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:
The type is specified in the Type box by selecting Value or Condition. The order (scalar, vector, or matrix) is specified by selecting from the Order list. If the order is vector or matrix, you define the Labels for the array in the Row Labels and Column Labels boxes.
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.
Learn more about: