-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RasterLayer creates Cells, Cells inherit from Agents, Agents need model input, but RasterLayer doesn't have access to model #236
Comments
(I deleted two spam posts from spam bots) Edit: Three |
It's probably introduced as mentioned here: https://github.com/projectmesa/mesa-geo/pull/212/files#r1730417300 A mesa-geo/mesa_geo/raster_layers.py Line 556 in 9c3196c
Moving forward, it's better to refactor But I'll submit a fix for this first. |
Thanks for looking into this! It sparked me to finally write up an example model using the PropertyLayer: projectmesa/mesa-examples#182 |
Great! |
Currently, Mesa-Geo can create agents in it's RasterLayer's from_file() method.
mesa-geo/mesa_geo/raster_layers.py
Line 556 in 9c3196c
To create an Mesa Agent, you are required to pass a Model parameter:
https://github.com/projectmesa/mesa/blob/0b2d250cf2d3be79b266a04c0c91612880e28f0a/mesa/agent.py#L40
However, the
RasterLayer
or it'sfrom_file()
method don't have access to a Model variable.Why this previously worked, I don't know exactly. I think because there was previously a "hack" in which you inherited from Agent, but not properly set the agent up with
super().__init__()
.I think this might require a rethink about how Cells integrate with the Mesa (with the AgentSet and experimental cell_space specifically.
The text was updated successfully, but these errors were encountered: