Next: Coefficients
Up: Specification
Previous: Initialization
Index
One can also omit the arguments in the constructor and load the specification
from a storage, using the method load(). It takes the following
arguments:
- resources
- - an object of class Resources. If the remaining
arguments are given, they will have priority over entries of the same name
in
resources.
- in_storage
- - an object of class Storage that overwrites the
one given in the constructor.
- in_table_name
- - name of the table/file where the specification should
be loaded from.
- variables
- - if this argument is given, it serves as a filter for the
variables loaded from the store.
For each of the class properties variables, coefficients, equations, and
submodels, respectively, a table column is expected on the storage. The column
names are given in the resources entries field_variable_name,
field_coefficient_name, field_equation_id, and field_submodel_id,
respectively. Default values are 'variable_name, 'coefficient_name,
'equation_id, and 'sub_model_id.
The variables and coefficients are stored in the class attributes
variables and coefficients. Equations and submodels are stored
only if their maximum value is not negative.
To store a specification into a storage, use the method
write(resources, out_storage, out_table_name). The behavior is
analogous to the load() method. If equations or/and submodels are not
used, the method stores values
in those columns.
Next: Coefficients
Up: Specification
Previous: Initialization
Index
info (at) urbansim.org