Parallel#
- HARK.parallel.multi_thread_commands_fake(agent_list: List, command_list: List, num_jobs=None) None #
Executes the list of commands in command_list for each AgentType in agent_list in an ordinary, single-threaded loop. Each command should be a method of that AgentType subclass. This function exists so as to easily disable multithreading, as it uses the same syntax as multi_thread_commands.
- Parameters:
agent_list ([AgentType]) – A list of instances of AgentType on which the commands will be run.
command_list ([string]) – A list of commands to run for each AgentType.
num_jobs (None) – Dummy input to match syntax of multi_thread_commands. Does nothing.
- Return type:
none
- HARK.parallel.multi_thread_commands(agent_list: List, command_list: List, num_jobs=None) None #
Executes the list of commands in command_list for each AgentType in agent_list using a multithreaded system. Each command should be a method of that AgentType subclass.
- Parameters:
agent_list ([AgentType]) – A list of instances of AgentType on which the commands will be run.
command_list ([string]) – A list of commands to run for each AgentType in agent_list.
- Return type:
None