As you enter an expression into an input field, GoldSim attempts to interpret the expression, and if it is unable do so, it indicates this in two ways:
• The item in the expression that is causing the problem is highlighted ; and
• A tool-tip is displayed to explain the error.
For example, in the following expression, GoldSim indicates that a right parenthesis is missing by marking as red and underlining the last item in the expression (just prior to the error), and displaying a tool-tip:
In this example, GoldSim indicates that a plus sign must be followed by another operand:
If you start typing (or move the focus to another field), the tool-tip will disappear. If you stop typing, the tool-tip will reappear.
Note that when evaluating an expression, GoldSim identifies and underlines the first error it encounters. Items shown to the left of the error are displayed in green (for links), black (for values), gray (for operators) or blue (for units), indicating that these have been successfully parsed and interpreted. Items shown to the right of the error are shown in light gray, indicating that they have not yet been parsed:
Once you change the focus away from an invalid input field, the entire field will be highlighted in pink to indicate that there is a problem:
You can view the tool-tip for an input field such as this by simply holding the cursor over the field (while the focus is elsewhere). The tool-tip disappears when you move the cursor away.
In some cases, GoldSim may be able to interpret the expression you enter, but the output attributes may be incorrect. That is, GoldSim uses the specified output attributes (dimensions, order and type) to ensure consistency when you enter information into input fields. If the attributes of the specified input number, link or expression are inconsistent with the required attributes for the field, the input is considered invalid and the entire field will be highlighted in pink.
For example, if you created a Reservoir element and assigned it display units of m3, then the Initial Value input for the Reservoir must have dimensions of volume. If not, the input would be considered invalid:
It is important to understand that a model with an invalid input cannot be run. If you attempt to run such a model, GoldSim will display an error message.
Note: Whenever you change the output attributes for an existing element, GoldSim will keep the existing input numbers, links or expressions in the input fields (and mark them as invalid). There is, however, one exception to this rule. If you change the display units for an element, GoldSim will automatically reset any inputs which are currently specified as zero to be consistent with the new dimensions. For example, if you create a new Reservoir element, and assign it display units of m, and then later change this to gallons (but have not yet defined an Initial Value), GoldSim will automatically replace the default input for the Initial Value (0 m) with 0 gal.
Learn more about: