Iteration

Rules

The iteration symbol contains the condition that marks the successful convergence of the iteration. An influence arrow coming FROM the alarm symbol can be used as an argument to the function iterations(). This function returns the number of iterations made so far. This function can be used to set the initial value (also called the guess) for the loop, i.e. when the number of iterations so far is equal to zero. If the number of iterations so far is one or more, then the result of the last calculation should be used. Since the last calculation depends on the result calculated from the guess, a circular loop of influences is present. In the past, Simile would reject this loop at build time, but setting a new property of the influence arrow: “Use values made in same time step” to true, allows the loop to be processed. Influence arrows with this property set are drawn with a dashed line. To set this property for an influence arrow, double-click on it to invoke the property dialogue box.

  • The expression in the equation dialogue box for a iteration element is a Boolean expression: that is, it returns the value “true” or “false”. This normally takes the form of some sort of comparison, using the conditional operators such as >, <, >= etc, combined with logical operators such as “and” and “or”.