How to use SimultaneousActivation?

218 views
Skip to first unread message

jun9...@gmail.com

unread,
Aug 14, 2018, 6:51:02 AM8/14/18
to ProjectMesa

Recently, I have some trouble using Mesa. There are two states in examples using SimultaneousActivation : self._state and self._next_state. If I consider people in the market to trade at the same time, there are no this two states. So what should I do?


Regards

David Masad

unread,
Aug 14, 2018, 10:04:07 PM8/14/18
to jun9...@gmail.com, ProjectMesa
If I'm understanding you correctly, you want to create a model where agents trade with each other simultaneously. How to implement that depends on how exactly you want the trades to happen. If you're simulating a market where the order of trades matters, simultaneous activation may not make sense -- for example, agent A may be able to trade with B or C, but not both. In that case, you may be better off using a RandomActivation scheduler.

If you want only two agents to be activated together to trade with one another, you might need to write your own scheduler. For example, if you have two types of agents, Buyers and Sellers, you can write a scheduler where each step it selects two agents, one of each type, and has them interact.

Does that help?

On Tue, Aug 14, 2018 at 6:51 AM <jun9...@gmail.com> wrote:

Recently, I have some trouble using Mesa. There are two states in examples using SimultaneousActivation : self._state and self._next_state. If I consider people in the market to trade at the same time, there are no this two states. So what should I do?


Regards

--
Project repos: github.com/projectmesa
---
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 projectmesa...@googlegroups.com.
To post to this group, send email to proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectmesa/8d47521d-53e0-4213-a4e8-a3ff7be409ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eloy Ruiz Donayre

unread,
Aug 15, 2018, 2:32:11 AM8/15/18
to ProjectMesa
Hi,

Sorry If I am misunderstanding the gist of your question.

I understand that there is no real-time simulation available in the schedulers, so if you have agents with sequential states of behaviour like sense, decide, act and use the SimultaneousActivation for each tick there will be a round where all agents sequentially sense, another round for deciding, and another one for acting. The trick or important aspect is that all the agents should have all the states and something to do in each one (even only pass the action).

If I'm not being clear, maybe this video can help:

Regards

jun9...@gmail.com

unread,
Aug 15, 2018, 3:58:34 AM8/15/18
to ProjectMesa

Thank you very much for your answer. I have drawn inspiration from your hint. 

I will try to write my own scheduler. 

Regards

在 2018年8月15日星期三 UTC+8上午10:04:07,David Masad写道:

jun9...@gmail.com

unread,
Aug 15, 2018, 4:10:48 AM8/15/18
to ProjectMesa

Thank you very much for your answer.  Your answer made me understand the essence of SimultaneousActivation.

But My model may have problems. I will improve the model.


Regards


在 2018年8月15日星期三 UTC+8下午2:32:11,Eloy Ruiz Donayre写道:
Reply all
Reply to author
Forward
0 new messages