Input:
It takes the same arguments as the run() method of its parent (see
Section 6.4.3 for more details):
specification, coefficients, agent_set, agents_index,
chunk_specification, data_objects, and run_config.
Algorithm:
The model is processed in chunks. The run_chunk() method moves
the agents out of their locations, i.e. the values of an
agent_set attribute of the same name as the unique identifier of
location_set is set to
for each agents of the currently processed
chunk. If agent_set does not have this attribute, it is appended to it.
If an entry ``compute_capacity_flag'' is given in run_config and its
value is True, an entry ``capacity_string'' is expected in run_config
which gives the name of attribute/variable of location_set that
determines capacity for each location. In such a case, after removing agents
from their locations, the capacity is computed using method
determine_units_capacity(). Note that by removing agents of only the
current chunk from their locations, the capacity is influenced by only those
agents. Each chunk then see the state of the world updated by all previously
running chunks.
The capacity values are used as weights of locations in the case of sampling.
They are multiplied by the filter given in the initialization. The
model then invokes sampling of alternatives by calling the
run() method of the sampler class, passing the possibly filtered
weights. The parent class then takes care of creating the interaction set, for
agents of the corresponding chunk and possibly sampled alternatives and of
running the upc_sequence. If run_config includes an entry
``correct_sampling_bias'' that is set to True, the method performs a bias
correction for non-uniform sampling in the multinomial logit computation.
The location IDs that agents chose in the choice process are stored
in the agent_set attribute specifying the location.
Output:
The method returns an array of size agents_index,
representing the location IDs that agents (elements of
agent_set determined by agents_index) made. Agents
whose choice is less equal zero were not included in the choice
process, for example because they do not belong to any submodels
given in the specification.