Class: Fathom::AgentCluster
- Inherits:
-
Object
- Object
- Fathom::AgentCluster
- 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
-
#agents ⇒ Object
readonly
Returns the value of attribute agents.
Instance Method Summary collapse
-
#initialize(*agents) ⇒ AgentCluster
constructor
A new instance of AgentCluster.
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
#agents ⇒ Object (readonly)
Returns the value of attribute agents.
11 12 13 |
# File 'lib/fathom/agent/agent_cluster.rb', line 11 def agents @agents end |