Next: Other Methods and Properties
Up: Implementation
Previous: Required Method compute()
Index
Optional Method dependencies()
This optional method takes no arguments and returns a list of variable names
that this variable needs in order to compute its values. Each variable name
must be either an expression, a fully-qualified Opus variable name, or a dataset-qualified
primary attribute name. It is important to list all dependent variables
here and not invoke the computation of the dependent variables from the
compute() method, since the dependencies tree mechanism would not
work correctly (see Section 24.3.3). If the names of the
dependent variables are not known at the time this method is called and are determined dynamically, the
dependencies list can be extended from the compute() method using the
Variable method add_and_solve_dependencies() which takes as arguments
a list of additional dependencies (each specified either as a character string or an objects of class AttributeBox)
and the dataset pool object. add_and_solve_dependencies() computes
the additional variables and extends the
dependencies list only when the compute() method runs for the first
time.
Next: Other Methods and Properties
Up: Implementation
Previous: Required Method compute()
Index
info (at) urbansim.org