Group Formation

Skip to first unread message

Leonardo Fernandes

Oct 1, 2020, 6:45:48 PM10/1/20
to ProjectMesa

I am trying to create a model of group formation where agents can merge together to form a new agent(a group of agents that act as if an agent) if a condition X is met and break apart if a condition Y is met. I am trying to implement the group as a network of agents (using networkx) but I can't really make agents who form an edgework as a single agent. I have also looked at Multilvel_Mesa which seems perfect to this but I was having trouble using it. I appreciate any suggestions!

Thanks, everyone.

David Masad

Oct 2, 2020, 6:08:50 AM10/2/20
to Leonardo Fernandes, ProjectMesa
Hi Leonardo,

The way I would handle it is to have each agent have variables for a parent and children. When the parent is None, the agent runs as usual; when the parent is another agent, that is the group agent -- when the child is activated, it is either skipped or the parent is activated instead (depending on how you're handling the timing). Then when an agent with child agents is activated, it acts collectively on behalf of the entire group. When a new edge is added, the new member takes  on the other's parent.

Without seeing the specific code / errors or issues you're having it's hard to provide more detailed troubleshooting, though. If the above doesn't help, you might need to share your code.


Project repos:
You received this message because you are subscribed to the Google Groups "ProjectMesa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Leonardo Fernandes

Oct 2, 2020, 11:47:46 AM10/2/20
to ProjectMesa
Hi David,

Thank you for your suggestion, it had not occurred to use parent and children classes. If I run into any trouble I will share more of my code.


Tom Pike

Oct 7, 2020, 3:17:21 PM10/7/20
to ProjectMesa
Leo: I wrote Multilelvel Mesa so I can help you with implementation issues if you would like. 
Reply all
Reply to author
0 new messages