next up previous index
Next: Model Components Up: Models Previous: AllocationModel Class   Index


JoinAttributeModificationModel Class

The model modifies an attribute of a dataset for members that are determined by given ids of a second dataset. The run() method takes the following arguments:
dataset
- an object of class Dataset for which the modification is done.
secondary_dataset
- an object of class Dataset used to specify members of dataset to be modified.
index
- index of members of the secondary_dataset to be used. If it is None, all members are considered.
attribute_to_be_modified
- name of an attribute of dataset to be modified. If it is None (default), an attribute of the same name as the id name of secondary_dataset is taken.
value
- constant to be assigned to the selected members. Default value is 0.
filter
- name of an attribute/variable/expression used for filtering out members of the secondary_dataset. Only members that correspond to value of the filter larger than 0 and are included in index are considered. Default is None which means no filtering.
dataset_pool
- pool of datasets used in the computation. Default is None.

dataset must contain an attribute of the same name as the id attribute of the secondary_dataset, here called the 'join attribute'. The model finds members of dataset for which the values of the join attribute match the values in the secondary_dataset (possibly restricted by the index and/or filter). For all those members the attribute attribute_to_be_modified is changed to value.


next up previous index
Next: Model Components Up: Models Previous: AllocationModel Class   Index
info (at) urbansim.org