Class: Fathom::AgentCluster

Inherits:
Object
  • Object
show all
Defined in:
lib/fathom/agent/agent_cluster.rb

Overview

This class is designed to hold a cluster of agents in memory. It runs the simulation locally and

speaks to other clusters via EventMachine.  In this way, we don't need a Ruby runtime/thread/fiber
for each agent, just one per dozen/hundred/thousand agents, depending on what balances the 
simulation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*agents) ⇒ AgentCluster

Returns a new instance of AgentCluster.



13
14
15
# File 'lib/fathom/agent/agent_cluster.rb', line 13

def initialize(*agents)
  @agents = agents
end

Instance Attribute Details

#agentsObject (readonly)

Returns the value of attribute agents.



11
12
13
# File 'lib/fathom/agent/agent_cluster.rb', line 11

def agents
  @agents
end