Replies: 2 comments 1 reply
-
As stated before, I fail to see the point of 2 and 3. A tag is an attribute, so the get method in agent set covers this already. Other than that, good idea and let's get this done. |
Beta Was this translation helpful? Give feedback.
1 reply
-
groupby has been added |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Implement methods in AgentSet for grouping, tagging, and managing agents based on types or custom attributes.
Here is my approach:
Task: Add a method to group agents by a specified attribute.
Key Actions:
Define the group_by method to categorize agents based on an attribute.
Task: Develop a method to tag agents for easy retrieval.
Key Actions:
Create the tag method allowing tagging of agents with a custom identifier.
Task: Add a method to retrieve agents by their tags.
Key Actions:
Define the get_by_tag method to fetch agents based on a previously assigned tag.
Task: Ensure the new methods work as expected.
Key Actions:
Test group_by with various attributes.
Verify tag and get_by_tag correctly assign and retrieve tagged agents.
Task: Document the new methods in the AgentSet class.
Key Actions:
Explain the purpose, usage, and examples for group_by, tag, and get_by_tag.
Task: Show how to use the new methods in example models.
Key Actions:
Incorporate group_by, tag, and get_by_tag in simulation models to demonstrate their utility.
Looking forward for your feedbacks :)
Beta Was this translation helpful? Give feedback.
All reactions