Skip to content

Commit

Permalink
docs(enhance_UI): rename and add description to UI example
Browse files Browse the repository at this point in the history
  • Loading branch information
bangxiangyong committed Jun 1, 2021
1 parent 360f6da commit 3a03428
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from agentMET4FOF.agents import AgentNetwork, MonitorAgent
# This main example shows how to create and import an agent defined in agent_module_example.py
# Firstly, it is done via python import
# Then, in the instantiation of the AgentNetwork , we pass the `agent_module_example`
# All agents imported will be then available via the dashboard UI
# Note also, the exposed and tunable parameters in the `ParameterisedSineGeneratorAgent` are defined in the class

from agentMET4FOF.agents import AgentNetwork
from agentMET4FOF_tutorials.tutorial_1_generator_agent import SineGeneratorAgent
from develop_UI import agent_module_example
from agentMET4FOF_tutorials.agent_module import agent_module_example


def demonstrate_generator_agent_use():
# Start agent network server.
# agent_network = AgentNetwork(dashboard_modules=[agent_module_example])
agent_network = AgentNetwork(dashboard_modules=[agent_module_example], backend="mesa")
sine_agent = agent_network.add_agent(agentType=SineGeneratorAgent)

Expand Down

0 comments on commit 3a03428

Please sign in to comment.