Closed mountaindust closed 4 years ago
To save space and reduce complexity, there should also be a dictionary to hold attributes shared by all agents within a swarm, rather than storing N copies of redundant data in a dataframe.
This is currently being handled on the dataframe branch
Next steps probably need to look like this:
Even better:
This is done on the dataframe branch and is passing tests, but need to make sure examples work.
Also need to add a new test to make sure the individual variation case works.
A swarm is essentially a container for many agents of the same type (for speed purposes), but in this function it is rather rudimentary and not well suited for handling arbitrary agent states, properties, etc. - a vary desirable thing to have in such a container. An elegant solution would be to add a Pandas dataframe property, in which the dataframe holds all attributes of each agent (columns are attributes, rows are agents). A list then holds each dataframe in the time history, much as pos_history does now, with the current-time dataframe updated in place. This would also present a natural solution to #23. Then one can easily look at the dataframe associated with a given time point to quickly see the state of every agent in an organized manner.