Modified Virus_On_Network Blank Visualization in Server #1616
-
I modified the Virus_On_Network example so it could read in .edge files. However, I am running into the issue of the grid and chart not showing up. Furthermore, when I click start, the steps are not going. The actual model is working though after testing it without using the server. I will show below the issue, things I have done/troubleshoot in server.py. My version of mesa is 1.1 and python 3.10. I can run the original Virus_On_Network perfectly. Things I have done on server.py:
2.) Test if portrayal works by print(portrayal). I get an output that looks correct.
returns
Anyone got an idea of what's going on? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
I used the exact same |
Beta Was this translation helpful? Give feedback.
Your solution overcounts the number of nodes by 1 (node 0 that is never used). This may not affect the result of your analysis (if you do some network measures) since the number of nodes is off by 0.2% (but 25% for the 3-node case).
As with the 2nd situation, this means that there are nodes without edges from the edge list.
In both situations, they can be solved if you pre-process the edge list file by decrementing the numbers by 1 before you read it. Then you will need only 333 nodes.