-
Notifications
You must be signed in to change notification settings - Fork 3
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
Run directly from Python script #11
Comments
@EwoutH wanted to work on this issue . |
@zain581 that would be greatly appreciated, go ahead! Edit: Note that this issue is the same for the main Mesa visualisation. Maybe better to provide an implementation in that repo first. |
@EwoutH thanks for your kind reply will start working on it and let you know when got something . |
@EwoutH while running the def get_agent_data_from_coord_iter(agents_per_coordinate):
for agents, (x, y) in agents_per_coordinate:
if agents: # Checking if the list is non-empty
for agent in agents:
agent_data = json.loads(
json.dumps(agent.__dict__, skipkeys=True, default=str)
)
agent_data["x"] = x
agent_data["y"] = y
agent_data.pop("model", None)
agent_data.pop("pos", None)
yield agent_data |
Can you fix this issue first in Mesa itself? This repo is a bit outdated. The new Mesa visualization is in https://github.com/projectmesa/mesa/blob/main/mesa/experimental/jupyter_viz.py |
OKAY ,i wanted to ask is it possible when the agent running script is done then we will automatically visualization the result but not running solara command but the agent class . |
Sorry, what do you mean exactly? |
running the code from the class |
Sorry, I still don’t understand your question or point 😅 |
okay ,what i am trying to say that we can run the same process of |
Sounds good! |
@zain581 would you still like to work on this? If so, please check out: https://github.com/projectmesa/mesa/tree/main/mesa/visualization I would really love to have that feature in there! CC @rht |
Instead of using
would it be possible to run directly from the Python script? Something like:
For some applications it would be nice to run the Python script directly instead of having to run it from the terminal.
The text was updated successfully, but these errors were encountered: