-
Notifications
You must be signed in to change notification settings - Fork 2
Differences between NetLogo and Python versions
1. setup siblings
The fundamental part of the standard setup of the model is the creation of the household (MesaPROTON_OC.setup_households) where households consisting of one or two parents and one to several children are generated. At this point, however, we only have groups of agents who do not have any kind of connection between them except for the household. The standard setup_siblings procedure takes parents within households and creates sibling type links by creating a network of relatives outside the household. In both the Netlogo 🐢 code and the Python 🐍 code, the agents eligible for this operation are selected and merged recursively. But the Netlogo 🐢 code contains a bug, the agents that are merged with each other do not leave the pool and continue to be added to other siblings creating an exaggerated number of siblings. In Python 🐍 this procedure has been fixed by removing from the pool the agents who have already received their siblings. For more information on how to reproduce the error: #194
2. p-fertility
During the make-baby procedure a fertility rate is calculated for each woman depending on her age and the number of children she already has. This number determines whether or not this agent will have a new baby. The number of children that each woman has is kept within the number-of-children variable. The problem in Netlogo 🐢 is that this variable only takes into account the children that arrive during the to-go procedure of the model while it should also take into account the children that are assigned to each woman during the standard setup of the model. In Python 🐍 this problem has been solved. For more information and how to reproduce the error: #211
3. too many facilitators Too many facilitators are added in the netlogo version when searching for accomplices. Fixed in the Python version.
if any? available-facilitators [ set accomplices (turtle-set available-facilitators accomplices) ]
should be
if any? available-facilitators [ set accomplices (turtle-set one-of available-facilitators accomplices) ]