Skip to content
Snippets Groups Projects
Commit bca91c68 authored by shinedday's avatar shinedday
Browse files

Remove env & amas pointer

parent 7a268acc
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,11 @@ class SimpleAmas(Amas):
self.add_agent(Agent(self))
def to_csv(self):
print(pandas.DataFrame([{**vars(x), **{'nombre_cycle': self.get_cycle()}} for x in self.get_agents()]).to_csv())
ignore_attribute = ["_Agent__amas", "_Agent__environment"]
table = [{**{e: x[e] for e in x if e not in ignore_attribute},
**{'nombre_cycle': self.get_cycle()}} for x in map(vars, self.get_agents())]
dataframe = pandas.DataFrame(table)
print(dataframe.to_csv(index=False))
class SimpleEnv(Environment):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment