location_set.
agent_set for which the
model runs. If it is None, the whole agent_set is considered.
Algorithm:
The location_set is expected to have implemented variable
``number_of_jobs_of_sector_
'' in the package
given by the class property variable_package (default is
``urbansim'').
is an integer giving sector IDs.
The method filters out jobs that are supposed to be located using agents_index and
the 'membership' of jobs given by 'group_member'. (If 'group_member' is None the group membership is ignored.)
Then it determines distinct sectors of those jobs and their count in each of
these sectors. It iterates over those sectors. In each iteration it
randomly samples (with replacement) the desired count of locations
weighted by the number of existing jobs of that sector in each
location. If there are no existing jobs in that sector, it samples
with equal weights for all locations. It then modifies the location
attribute of the job set by storing the sampled
location IDs.
Output:
The method returns an array of the new locations, i.e. of size
agents_index. For entries in verb|agents_index| that do not belong to this group member, the values are -1.