Caution -- no auto-updating from text attributes

Analytica maintains an dependency network similar to the influence diagrams that tracks how each variable depends on other variables -- i.e. uses other variables in its Definition. So any change to the value of a variable automatically propagates a message to any dependent variables (its Outputs and their Outputs and so on) to invalidate their current values (both Mid and Prob values) so that they will recompute their values when and if needed. This dependency network and automatic updating also applies for the Check, and OnChange attributes. But, it does not apply to other user-modifiable Attributes, such as Identifier, Units, or Description. It is rare that a Variable depends on one of these other Attributes, but it is can happen.

An example:

Variable T 
    Definition: 20
    Units: degrees F
Variable TempC 
    Definition IF Units OF T  = 'degrees C' THEN T
        ELSE IF Units OF T  = 'degrees F' THEN (T - 32)*(100/180)
        ELSE 'Variable T has unknown Units'
    Units: degrees C</code>

The calculation of TempC will calculate the temperature in degrees Celsius (Centigrade) whether the Units of T are in 'degrees C' or 'degrees F'. However, if the user modifies the Units of T:

 Variable T 
    Units: degrees C

it will not trigger recalculation of TempC, which may then be incorrect. This is because the dependency network does not apply to the Units attribute.

Comments


You are not allowed to post comments.