Replies: 9 comments 7 replies
-
I think those docs are out of date and should be updated. The examples were moved to the mesa-examples repository in #1529. |
Beta Was this translation helpful? Give feedback.
-
On further investigation, it seems clear the the examples in your link are not compatible with Mesa 2.1.5. Running python and then giving the command:
I can get rid of that particular error by editing agent.py, but then another arises... and so on. It seems clear the directory structure has been changed, but without knowing how, or what Mesa version the examples belong to, I'm stuck. I want to be able to run examples in a recent version in order to have another try at updating my model which runs in version 0.8.8.1, but I can't do this without a working example under a more recent version. Can anyone assist? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Looks like the requirements files for Forest Fire wasn't updated. I updated it in this PR -- projectmesa/mesa-examples#75 I found out there a few more like this -- projectmesa/mesa-examples#76 One the PR is reviewed and merged that solves FF... I will try to do the rest this evening. |
Beta Was this translation helpful? Give feedback.
-
Thanks very much, but I'm not entirely clear what I need to do. I've got mesa 2.1.5 installed, and the example I've mostly been trying (because it uses continuous space) is boid_flockers, which you don't mention as needing any updating. I'll try setting up a new environment, reinstalling 2.1.5, then "git clone https://github.com/projectmesa/mesa-examples/" and "mesa runserver" in examples\boid_flockers. As far as you know, should that work? (Incidentally, I have no experience with Colab, but I don't think it would be useful for what I want to do, which is update my model CINCH to a recent mesa version. CINCH has around 2,500 lines of code, has fairly complicated input files, and runs in three different ways - single runs with a visualization, using mesa's batch-running facilities, and using the EMA workbench. I did try updating to 2.1.1 before, but couldn't get the visualization to work.) |
Beta Was this translation helpful? Give feedback.
-
OK - this time boid_flockers worked (and so did forest_fire). The only thing I did differently was where I gave the clone command. So thanks for your assistance, particularly given the time of year! My plan now is to see if the version of boid_flockers that runs under mesa 0.8.8.1 runs under 2.1.5, and if not, what has to be changed to make it do so; and if I can do that, try making parallel changes to CINCH and see if that will run under 2.1.5. So I may have further issues, given that my previous attempt failed. |
Beta Was this translation helpful? Give feedback.
-
sigh... pip install mesa
cd mesa-examples\examples\forest_fire
cd ..\boid_flockers
Does anyone have any idea what is going on here? Can anyone reproduce this behaviour? Seems like it is something specific to boid_flockers, or more generally to visualization of continuous space. |
Beta Was this translation helpful? Give feedback.
-
Bizarre... shutting my desktop down then rebooting itrestored the visualization. I'll continue to experiment. |
Beta Was this translation helpful? Give feedback.
-
I suspect the problem arises from some interaction between the browser (I'm using Firefox) and the two versions of mesa (0.8.8.1 and 2.1.5) I'm working with - and possibly Anaconda as well. But I have not found a way of reproducing the problem consistently - sometimes it occurs, sometimes it doesn't. Last time it occurred, shutting down the browser and restarting it resolved the problem, but I don't know if this will always work. I'll report it here if I find a way of reproducing the problem consistently. |
Beta Was this translation helpful? Give feedback.
-
Finally got the CINCH visualization working in 2.1.5! The problem was with the simple_continuous_canvas.ps file. The 0.8.8.1 version has "var" in several places where the 2.1.5 version has "const". I don't know why (or in what version) this change was made, nor why using the 0.8.8.1 version under 2.1.5 doesn't work (because I had added code to the 0.8.8.1 version to get the visualization to show walls, doors and beds - the CINCH environment is a hospital ward - I copied that version across. I think the occasions when boid_flockers failed to work for me in 2.1.5 must have been due to it somehow accessing the 0.8.8.1 version - I admit my undertanding of the roles and operation of sys.path, pycache and local_includes (I suspect one or more of these was involved), as well as of javascript, is rudimentary. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've installed mesa version 2.1.5 in an Anaconda Python 3.9 environment, and then tried to follow the instruction from https://mesa.readthedocs.io/en/stable/index.html#using-mesa which reads:
"To launch an example model, clone the repository folder and invoke mesa runserver for one of the examples/ subdirectories"
I've cloned the repository, apparently successfully, but no examples/ directory appears. What am I doing wrong, or failing to do?
Beta Was this translation helpful? Give feedback.
All reactions