Error Messages/41035

< Error Messages
Revision as of 22:21, 10 February 2009 by Lchrisman (talk | contribs) (comment feedback at bottom)

Message Text

Cyclic Dependency between variables.
  Va1 - Va2 - Va3 - Va4 - Va1

Description

The definition of the first variable shown (Va1 in the example) depends either directly or indirectly on itself. This creates a cycle in the dependencies between variables, which would appear as a directed cycle in the influence diagram.

A cycle between variables is not allowed, since the true definition of the variables in the cycle would then be ambiguous.

There are a few instances where directed cycles in a model may be legitimate. Perhaps the most common case is where a variable's value at a given point in Time depends on its own values at earlier points in Time. This type of recurrence over time forms a cycle at the variable level, but not at the individual cell level, since the definition of each time slice of a variable depends only on earlier time slices, never on the same time slice. You can model a recurrence of this type over the system index Time by using the function Dynamic.

Another style of dependence can occur when your intention is for each variable to define its own "update" equation, with the intention that the variables in the cycle should be repeatedly evaluated until they converge to a fixed-point value. You can accomplish this style of cyclic dependence using the Iterate function.

Hard-core Excel users may find themselves encountering a third type of cyclic dependence, where the cells in a single table depend on other cells within the same table. Because the cells exist in the same variable, this creates a cycle at the variable level. You can create a table in which cells of the table depend on other cells in the same table in arbitrary ways (as long as they don't form a cell-level cycle). To do this, you must change your Table definition into an IntraTable definition (by just editing the first word in the definition, changing "Table" to "IntraTable"). When it is at all possible, it is highly recommended that you avoid using this type of within-table cycle dependence. It is usually avoidable, but stylistically it has many of the same downsides that plague spreadsheet models, and evaluation of that table is likely to be less efficient.

A fourth type of cyclic dependence can occur as a result of encoding constraints in a constraint satisfaction or optimization problem. For example, in an economic equilibrium model, you might attempt to define supply as a function of price, and price as a function of supply. This type of cyclic dependency indicates that you are encoding the problem incorrectly for Analytica -- expressing it like you might in an algebraic modeling language, rather than in terms of constraints as expected by the Analytica optimizer. (to do: add additional elaboration on this elsewhere on the Wiki).

A fifth type of cyclic dependency can occur when you want to create a recursive user-defined function. However, this will generally result in a different error message, Error Messages/41036.


You are not allowed to post comments.

Comments
<comments />