Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Issue when running jupyter example #168

@Sirorezka

Description

@Sirorezka

When running jupyter example the code breaks. I'm running the following code:

import abce

simulation = abce.Simulation(name="ipythonsimulation", processes=1)

class Agent(abce.Agent):
    def init(self, parameters, agent_parameters):
        self.family_name = agent_parameters
        self.world_size = parameters['world_size']
    def say(self):
        print("hello I am %s my id %i and my group is '%s', it is the %i round" % (self.family_name, self.id, self.group, self.round))

agents = simulation.build_agents(Agent, 'agent', 
                                parameters={"world_size": 10}, 
                                agent_parameters=['fred', 'astaire', 'altair', 'deurich'])

I get the following error:

TypeError: string indices must be integers

in

singleprocess.py

agent.init(**ChainMap(simulation_parameters,ap))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions