javipalanca / spade

Smart Python Agent Development Environment
MIT License
258 stars 98 forks source link

Instantiating time #79

Open shahab-valaei opened 4 years ago

shahab-valaei commented 4 years ago

Description

I'm trying to create a multi-agent system for disaster response using SPADE. I want to use a huge number of agents around 10000 or more. Do you think SPADE is a good choice for this simulation with this number of agents?

What I Did

I created a simple model using SPADE which contains about 20 agents, but each time it takes about 1 minute to instantiate agents and after that running process starts. I think if I use large number of agents, the instantiation time will increase a lot. Is there any solution to this problem?

javipalanca commented 4 years ago

Every agent you create needs to make a connection to an XMPP server. Handling lots of connections made at the same time may be a problem for both the client (who needs to open a lot of sockets) and even for the XMPP server, who may not be powerful enough to support thousands of connections made at the same time. This does not mean that you can have thousands of agents connected to a server, but the problem is making the connections at the same time.

In the meantime I'm preparing a plugin for SPADE that allows to have standalone agents that are not connected to the XMPP server, so it allows to have lots of agents in the same process, but they can only communicate with agents in the same process. Maybe this is a good solution to simulations.