Related Topics: | ||
A result storage block stores numerical values passed to it during simulations, and then computes or holds a result based on one of the following options:
Average of Results computes the average value of the numbers that were passed to the result storage block. Each time a new value is passed to the block, the average is recomputed. If the block is called during simulation, it will return the latest average of the values.
Sum of Results computes the sum of the numbers that were passed to the result storage block. The total sum is recalculated with each new value that is passed to the block. If the block is called during simulation, it will return the latest sum of the values.
Array of Results allows the result storage block to hold an array of values. These values may be used to perform various statistical calculations, such as calculating the variance, standard deviation, etc. The values stored in the block are displayed in the Simulation Results Explorer. If the block is called during simulation, it will return only the most recent value that was added to the array.
Minimum of Results holds the smallest numerical value that was passed to the result storage block. Each new value that is passed to the block is compared to the value that is currently stored. If the new value is less than the stored value, the block discards the stored value and replaces it with the new value; otherwise, the new value is discarded.
Maximum of Results holds the largest numerical value that was passed to the result storage block. Each new value that is passed to the block is compared to the value that is currently stored. If the new value is greater than the stored value, the block discards the stored value and replaces it with the new value; otherwise, the new value is discarded.
Last Value holds only the latest value that was passed to the result storage block. Each new value that is passed to the block replaces the old value.
Normalized Sum of Results adds the values that were passed to the result storage block and divides by the number of simulations. If the block is called during simulation, it will return the summed value currently stored divided by the total number of simulations to be performed.
For example, if you select the Average of Results option, and then run 100 simulations on the following configuration (a single simulation is a single pass through the flowchart), then the block that generates a random number will pass a total of 100 random values to the result storage block, which will compute the average value of the numbers as they come in.
The following picture shows the Block Properties window of the result storage block in the example. The Store field allows you to select the output of the block. In this case, it stores the average of results.
A result storage block can have any number of incoming paths and any number of outgoing paths (i.e., the same output value is passed to more than one block). In addition to storing the results, the block may be configured to store the output in a variable. The Storage Variable field in the Block Properties window of the block displays the name of the variable, if any. If the result storage block is holding an array of results, only the most recent value that was added to the array will be stored in the variable.
If your block has multiple incoming paths, you can configure the block to not pass an output or compute a result until a certain number of those incoming paths have been executed. This allows you to control the number of inputs that the block processes at any given time. To do this, enter the required number of inputs in the Required Number of Executed Incoming Paths field in the Block Properties window. Starting in version 9.0.10, an asterisk (*) in this field means that all incoming paths are required. See Flowchart Configurations and Execution for an example.
Conditional formatting allows you to mark the result storage block with a corner indicator in a particular color when it meets a certain condition. For instance, you might wish to mark the block with red if the computed result is less than a particular value. The conditional formatting corner indicator appears at the upper left corner of the block. To apply conditional formatting, select the result storage block(s) and choose Format > Styles > Conditional Formatting or right-click the result storage block(s) and select Conditional Formatting on the shortcut menu.
There are two types of conditional formatting that you can apply in the Conditional Formatting window:
You can click the Set of Conditions button to define conditions and specify the color of the block under each condition. To enable each condition, select the Use this condition check box. The fields directly below will be enabled, allowing you to select the conditional operator, enter the value(s) against which the value of the result storage block will be checked and specify a color to be used when the value meets the condition. Available conditional operators are:
= |
equal to |
<> |
not equal to |
<= |
less than or equal to |
< |
less than |
>= |
greater than or equal to |
> |
greater than |
Between |
|
Not between |
You can define up to six conditions, and can enable and disable them with the Use this condition check boxes. The conditions you have defined will be saved even when disabled. Enabled conditions do not need to be immediately consecutive. Keep in mind, however, that the conditions are evaluated in the order in which they are displayed in this window and that if a result storage block meets more than one condition, the first true condition will be applied.
You can click the Color Limits button to define a range of values across which the range of colors from red to green will be applied. Result storage blocks with values close to the specified lower limit will be marked with red corner indicators; those with values close to the specified upper limit will be marked with green corner indicators.
In both types, for the value(s) against which the result storage block is checked, the expression can include:
Numerical values
Predefined mathematical functions (exp, log, sin, etc.)
References to any analysis workbooks
You can enter the equation manually, or you can use the function selector or the equation editor to assist you.
RENO resources, analysis workbooks and internal functions are automatically color-coded to assist in reading the equation. When the cursor is positioned on one of these items, a preview area appears and displays a summary of the item. If the item is a resource, you can click the View icon in the Preview area to open that resource's properties window.
IMPORTANT: All values and results are assumed to be in terms of the default unit specified for the database. See Using Time Units in RENO for details on how this may affect your analysis.
You can click the No Formatting button to turn off conditional formatting for the selected block(s).
Note that for result storage blocks of type array, the conditional formatting will be based on the most recent value. The size of the conditional formatting corner indicators can be changed via the Block Corner Indicators pages of the Diagram Style window.
© 1992-2015. ReliaSoft Corporation. ALL RIGHTS RESERVED.