def __init__(self) : Scenario.__init__(self) m = Model(name='n0', position=(50,50,0), agents = [], interfaces = {}) m.get('agents').append(CircleWalkerAgent(Model(job='send'))) self._nodes.append(m)
def __init__(self) : Scenario.__init__(self) for node_id in range(0, 5) : ''' Make the node model ''' node = Model(name='n%s' % node_id, position=(0,0,0), agents = [], interfaces = {}) ''' Instance of a 'MovingAgent' ''' agent_instance = MovingAgent() ''' Place the agent on the node ''' node.get('agents').append(agent_instance) ''' Add the node to the scenario ''' self._nodes.append(node)