DatalogiForAlle / AgentsPy

Agent-based simulation for education in Python
GNU General Public License v3.0
5 stars 0 forks source link

Research if it's possible to open simulation window, when we create a model #107

Open dybber opened 3 years ago

dybber commented 3 years ago

When you use the turtle library, there's no "run" function. When you create the first agent a window appears, and then the python console receives new input and sends that to the window.

First: make a small proof of concept python project (no relation to the agent library), where we make a window, but keep the REPL active to receive new input. That is, figure out if we can make a Window, move it to a separate thread/subprocess and continue there, and then send signals to the process from the Python terminal about what to draw.

In this way we will have two different programs: one accepting inputs from the user in the Python terminal, a user facing library, but all calls to the library sends messages to the other UI-process which is doing the actual simulation.

JensKanstrupLarsen commented 3 years ago

The concurrent UI pull-request fixes this, but it's not complete yet.