Input:
agent_set determining which
agents enter the choice process. If it is not given (default), all agents are
considered.
dataset_pool argument of the constructor.
Algorithm:
The algorithm is implemented in the method run_chunk() called from the
parent class ChunkModel for each chunk. It overwrites the
ChunkModel method get_agents_order() in a way that it returns a
permutation of the agents indices. Thus, the agents make their choices in a
random order.
The method creates an interaction set between the agent set and the choice
set. It computes all variables given in the specification. Variables that are
specific to one of the datasets are computed on all elements of that dataset,
interaction variables are computed only on elements entering the choice
process. The method then creates the corresponding data matrix using
agents_index for selecting the appropriate data values. It runs one
simulation per submodel (for submodels specified in the specification) by
calling the run() method of the upc_sequence attribute
(see 24.5.4) and passing the data matrix and the coefficients
for the corresponding submodel.
If run_config contains the entry 'demand_string' having a character string value,
an aggregated demand for each choice is computed and stored as an additional attribute (of that name)
of the choice dataset.
Output:
The method returns an array of size agents_index, representing the
choices 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.