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 a fully-qualified Opus variable name, or a dataset-qualified
primary attribute name. It is important to list all dependent variables
here and don't invoke the computation of the dependent variables from the
compute() method, since the dependencies tree mechanism would not
work correctly (see Section 7.4.3). If the names of the
dependent variables are not known at the time this method is called, the
dependencies list can be extended from the compute() method using the
Variable method add_dependencies() which takes as an argument
a list of additional dependencies (specified either as character strings or in
form of AttributeBox). add_dependencies() 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