Using mesa for participatory simulation #1901
Replies: 2 comments 1 reply
-
(I'm not a maintainer of Mesa, just a frequent user) You could check out mesa-interactive. It's in very early stages of development, but it allows real-time interaction with models. For example, in the forest_fire example you can click on trees to set them on fire. |
Beta Was this translation helpful? Give feedback.
-
I have built a tornado app (webpage) and have been able to use tornado to host a server for the participants. I was also able to use websockets to send messages that would then update data fields on a participants webpage and I am also able to read the participants selection of values for some data fields needed to make them a part of the simulation. However, When I try to run my tornado application inside the mesa model, it does not run. Only the mesa model runs. Can anyone please let me know the possible reason. Below is my code: from server import server if name == "main":
However, when I run the app and the ABM separately they both work .i.e, the console reads: When I tried creating two instances of my app on two separate ports in the same python script, it did work and the console read: I am not sure how mesa is working internally. Can someone please shed some light on how I can integrate my tornado app into my mesa model. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have developed a model using python MESA. However, my research requires me to include participatory simulation capability with this model. Given that MESA currently doesn't have the option of executing something like this, I have an idea to do this with MESA but I need some advice on whether my idea is practical or not.
I am planning on using a package in python called "flask" to develop a webpage that will interact with the participants to get the required input. At the same time I plan to show them the information they need to make decisions during the simulation. The simulation will move forward to the next tick only after it receives the input from the participants. The simulation will also have agents whose rules have been defined already and they make their decisions based on those rules.
I have some experience with flask from a class I took a few years ago. However, I need to learn more but before I start, please let me know if this would work.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions