next up previous index
Next: Creators Up: Agent Relocation Model Previous: Initialization   Index

The Run Method

Input:
agent_set
- A Dataset object containing agents to be relocated.
resources
- An instance of class Resources which is a collection of additional arguments and objects that will be passed to the upc_sequence run.

Algorithm
The method appends agent_set into resources and invokes the run() method of upc_sequence, passing resources as argument. The upc_sequence runs the probabilities component and the choices component and it is expected to return an array of zeros for agents not to be relocated, and ones for agent to be relocated. The distinct values of indices of the ``to be relocated'' agents joined with indices of all unplaced agents is the resulting array of agents to be relocated. As unplaced agents are considered agents that have value smaller equal 0 for the attribute given in location_id_name passed to the constructor.

Output
The method returns the resulting array of indices of all agents to be relocated.


next up previous index
Next: Creators Up: Agent Relocation Model Previous: Initialization   Index
info (at) urbansim.org