diff --git a/README.md b/README.md index 209cc6f..8d761d0 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,20 @@ When the network is a de facto complete network, scientists might be able to uti If the `exit-condition` reporter is evaluated the variable will be set to `true` in case the the exit-condition is met, `false` otherwise. Positive evaluation of the exit-condition marks the end of a run. +#### g-myscientists + +* format: list +* example: [3 7] + +Reflects how many scientist are currently researching each theory: the first entry in the list is for theory one the 2nd entry for theory two. + +#### g-research-time + +* format: list +* example: [350 129] + +Records how much each theory has been researched over the course of the run: each round each researcher who pulls from the slot machine for a given theory increases the counter for this theory by one. The first entry in the list is for theory one the 2nd entry for theory two. + ### Turtles-own diff --git a/SocNetABM.nlogo b/SocNetABM.nlogo index c1e4395..b2f776c 100644 --- a/SocNetABM.nlogo +++ b/SocNetABM.nlogo @@ -162,7 +162,7 @@ end to init-converge-reporters set converge-reporters (list [ -> average-belief 0 true] [ -> average-cum-successes 0 true] [ -> average-confidence true] - [ -> average-signal 0 true]) + [ -> average-signal 0 true] [ -> research-time 0 true]) end @@ -891,6 +891,21 @@ When the network is a de facto complete network, scientists might be able to uti If the `exit-condition` reporter is evaluated the variable will be set to `true` in case the the exit-condition is met, `false` otherwise. Positive evaluation of the exit-condition marks the end of a run. +#### g-myscientists + +* format: list +* example: [3 7] + +Reflects how many scientist are currently researching each theory: the first entry in the list is for theory one the 2nd entry for theory two. + +#### g-research-time + +* format: list +* example: [350 129] + +Records how much each theory has been researched over the course of the run: each round each researcher who pulls from the slot machine for a given theory increases the counter for this theory by one. The first entry in the list is for theory one the 2nd entry for theory two. + + ### Turtles-own #### cur-best-th @@ -1335,6 +1350,8 @@ NetLogo 6.0.4 frequency-converged "th2" center-of-convergence "th1" center-of-convergence "th2" + research-time "th1" false + research-time "th2" false diff --git a/protocol.nls b/protocol.nls index 653b51b..16c98cd 100644 --- a/protocol.nls +++ b/protocol.nls @@ -540,3 +540,24 @@ to compute-popularity let th-2-scientist scientists - th-1-scientist set g-myscientists (list th-1-scientist th-2-scientist) end + + + + + +; reports the time scientists spent researching each theory before they finally +; converged +; arguments: +; - th# = theory, type: string +; - rec? = recording?, type: boolean +to-report research-time [th# rec?] + let identifier "restime" + ifelse rec? [ + report (fput identifier g-research-time) + ][ + set th# translate-from-string th# + let res-time but-first first filter [curitem -> + first curitem = identifier] converge-reporters-values + report item th# res-time + ] +end