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

testing to csv

parent 3b3dd420
Branches
Tags
No related merge requests found
...@@ -3,6 +3,7 @@ Amas Class ...@@ -3,6 +3,7 @@ Amas Class
""" """
from threading import Thread from threading import Thread
from typing import List from typing import List
import sys import sys
import pathlib import pathlib
......
import pandas
from pyAmakCore.classes.amas import Amas
from pyAmakCore.classes.environment import Environment
from pyAmakCore.classes.agent import Agent
class SimpleAgent(Agent):
"""
test
"""
class SimpleAmas(Amas):
"""
test
"""
def on_initial_agents_creation(self) -> None:
for i in range(10):
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())
class SimpleEnv(Environment):
"""
test
"""
env = SimpleEnv()
amas = SimpleAmas(env)
amas.to_csv()
"""
There are no visible memory leak in pyAmakCore
"""
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment