Volunteers motivation
Model was written in NetLogo 5.1.0
•
Viewed 449 times
•
Downloaded 27 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Info tab cannot be displayed because of an encoding error
Comments and Questions
Click to Run Model
;;;;;;;;;;;;;;;;;;;;;;;;;;; ; globals and definitions ; ;;;;;;;;;;;;;;;;;;;;;;;;;;; globals [Continue?] breed [volunteers volunteer] breed [issues issue] ; report is reserved word, so we'll use observation. directed-link-breed [ observations observation ] directed-link-breed [ v_tasks v_task ] ; *motivation* is crucial for the emodel ; - at motivation >= inherent-v_motivation, the volunteer will start moving arround on its own. In the first round, this is the same as init-motivation. ; - at motivation <= Treshold-tasking_motivation (*), the volunteer will stop and rest, unless it's currently on a task. ; - at motivation >= Treshold-tasking_motivation the volunteer can accept tasks. ; (*) TODO: I guess that this needs own treshold.. volunteers-own [v_state v_motivation v_moved v_error v_trust inherent-v_motivation] ; i_resolved? is set to true when we have enough reports. issues-own [ i_resolved? i_generated i_discovered i_consensus] ; not sure what we need in this link... observations-own [timestamp o_correct?] ;;;;;;;;;;;;;;;;;;;; ; setup procedures ; ;;;;;;;;;;;;;;;;;;;; to setup clear-all setup-world setup-volunteers watch volunteer 0 follow volunteer 0 setup-issues reset-ticks end ; randomly add some taskable volunteers to the world to setup-volunteers set-default-shape volunteers "person" ; if not is-number? Nr-taskable [ set Nr-taskable 10 ] create-volunteers Nr-volunteers [ setxy random-xcor random-ycor set v_state "resting" set inherent-v_motivation init-motivation set v_motivation inherent-v_motivation set v_moved 0 set v_error Init-error set v_trust 1 set color violet set size 1.5 ] end ; randomly add some issues to the world ; ; issues have a generation time & later also a discovery time to setup-issues set-default-shape issues "target" create-issues Nr-issues [ setxy random-xcor random-ycor set i_generated 0 set i_consensus 0 set i_resolved? false set color red set size 1.5 ] end ; initially all patches are just grey = unknown. to setup-world resize-world 0 Size-world 0 Size-world set-patch-size 900 / Size-world ask patches [ set pcolor grey ] end ;;;;;;;;;;;;;;;;;;;; ; Help Procedures ; ;;;;;;;;;;;;;;;;;;;; ; altering the volunteers state to alter-v_state [new_state] let old_state v_state set v_state new_state if new_state = "resting"[ set color black set size 1 stop ] if new_state = "searching"[ set color violet set size 1.5 stop ] if new_state = "tasked"[ ; tasking motivation boost! alter-v_motivation "new-task" set color orange set size 2 stop ] ; we should never come here! set v_state old_state show "Don't know how to change state to:" print new_state end ;altering the volunteers motivation. ; at the moment it's just linear in time or step-wise with fixed steps. ; S-function for demotivation and saturating steps with diminishing return would be more realistic. ; e.g. exponentialy diminishing return with (N-events) + s-function(t) for return to normall for the single-shot motivation boosts? to alter-v_motivation [reason] ; these are called on every tick if reason = "resting" [ set v_motivation v_motivation + M-idle-gain stop ] if reason = "moving" [ set v_motivation v_motivation - M-moving-loss stop ] ; TODO: different rate of losing motivation when tasked? if reason = "tasked" [ set v_motivation v_motivation - M-moving-loss stop ] ; these are single-shot motivation boosts and sinks if reason = "new-task" [ set v_motivation v_motivation + M-task stop ] show "Don't know how to change motivation by:" print reason end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Procedures governing the world development ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to go assign-tasks move-volunteers report-issues manage-issues ;if count issues with [ i_resolved? = true ] = Nr-issues [ next-event ] ;stop unless "Continue" is true, but pressing on the "Run1" again will start the next event. if count issues with [ i_resolved? = true ] = Nr-issues [ next-event if (not Continue?) [stop] ] tick end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; next-event setup procedure ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to next-event ask volunteers [ setxy random-xcor random-ycor set v_state "resting" ; if my motivation is higher at the end of the run than at the start of the run, "hui", if not "pfui"! ; this could (and should) be improved... set inherent-v_motivation inherent-v_motivation + ifelse-value (v_motivation + M-bier > init-motivation) [1][-1] set v_motivation inherent-v_motivation set v_moved 0 ] ask issues [die] setup-issues clear-links ; do we need clear/kill/reset other things? ticks? plots? end ; volunters can be tasked, e.g. to quality-assure the reports to assign-tasks ; Note: if Nr-confirmations = N, we need N+1 observations to resolve the issue, not N! let open_issues issues with [i_discovered > 0 and (count in-link-neighbors) <= Nr-confirmations] ; no discovered but unresolved issues, let's get out of this... if count open_issues = 0 [ if debug? [ write "no open issues" ] stop ] let free_volunteers volunteers with [not any? out-v_task-neighbors and v_motivation >= Treshold-tasking_motivation] ; no free volunteers, let's get out of here. if count free_volunteers = 0 [ ; we are overbooked, let's lower the tasking radius? if Adjust-R-task? and R-task >= R-discover [set R-task R-task - 1] if debug? [ write "no free volunters" ] stop ] ask free_volunteers [ let nearest_issue min-one-of (issues with [ i_discovered > 0 and not in-observation-neighbor? myself and (count in-link-neighbors) <= Nr-confirmations and distance myself <= R-task ]) [distance myself ] ifelse is-issue? nearest_issue [ ; exhausted volunteers are BAD. We shall lower the tasking radius and we shall not task this volunteer now. ; This is a bit of a chreating though. .-) create-v_task-to nearest_issue [ if show-tasks? [ set color orange ] if debug? [ write "created task" show self ] ] ; the volunteer is tasked now, let's show it! alter-v_state "tasked" ] [ ; wth? Maybe the tasking radius is too small? But don't do this too fast! if Adjust-R-task? and R-task < Size-world / 2 [set R-task R-task + (1 / count free_volunteers)] ] ] ; Something like this could be used to dynamically adjust the tasking radius. ;set free_volunteers volunteers with [not any? out-v_task-neighbors] ;let c_free-volunteers count free_volunteers ;let c_open-issues count issues with [i_discovered > 0 and (count in-link-neighbors) <= Nr-confirmations] ; let's play with tasking radius ;if c_free-volunteers = 0 and R-task > R-discover [set R-task R-task - 1 ] ;if c_free-volunteers > 0 and R-task < max-pxcor and c_open-issues > 1 [set R-task R-task + 1 ] end ; tasked volunteers move towards their task or at random if no task defined and if they are motivated enough. to move-volunteers ask volunteers [ ; If we are resting, rest until re-motivated if v_state = "resting" and v_motivation > 0 [ alter-v_motivation "resting" if v_motivation >= inherent-v_motivation [ alter-v_state "searching" ] stop ] ; If we are "searching" (not tasked), do the random walk. if v_state = "searching" [ right random 60 - 30 alter-v_motivation "moving" forward 1 if v_motivation < Treshold-selfmotivation [ alter-v_state "resting" ] stop ] ;If we already have a task, let's go for it! if any? out-v_task-neighbors [ face one-of out-v_task-neighbors forward 1 alter-v_motivation "tasked" stop ] ; if we are here, it means that the v_state is "tasked" but we have already resolved the task set v_state "searching" ] end ; report observations on nearby issues to report-issues ask volunteers [ ; "myself" refers to a volunteer which initiated the loop, not to issue! ; issue would be reffered to as "self" in own context. let this_reporter self ; which issues are in vicinity? ask issues in-radius R-discover [ ; report only those issues we haven't reported already! if in-observation-neighbor? myself [ stop ] ; delete all tasks from caling turtle to this issue ask my-in-v_tasks with [ other-end = this_reporter ] [ ask this_reporter [ set color violet ;set size 1.5 ] if debug? [ write "deleting resolved task:" print self ] die ] ; don't report if already enough reports. ; This is kind-or optional, results might even improve if we don't do this. if (count in-observation-neighbors) > Nr-confirmations [stop] ; is the observation correct? let correct? ifelse-value (Init-error < random 100) [true] [false] create-observation-from myself [ if show-observations? [ ; actually i should set it to black if the observation is wrong... set color ifelse-value ([i_discovered] of myself > 0) [green][red] if not correct? [ set color color - 3] ] set o_correct? correct? set timestamp ticks if debug? [print self] ] ; issue is discovered! if i_discovered = 0 [set i_discovered ticks] set color orange ; some of the reports will be wrong. We simplify this to "negative reports" here. set i_consensus i_consensus + ifelse-value correct? [1][-1] ] ] end to manage-issues ; issues are considered resolved if we get enough reports on it. ; thus we can have "false positives" here too. ask issues with [ not i_resolved? and (count in-observation-neighbors) > Nr-confirmations ] [ if debug? [ write "No. neigbours:" print count in-observation-neighbors ] set i_resolved? true ; if needed, tell the volunteers that their help isn't needed anymore! ask my-in-v_tasks [ if debug? [ write "deleting obsolete tasks (2):" print self ] ask other-end [ alter-v_state "searching" ; TODO: we should reverse this if the o_correct? of the observation corresponding to this task is false! ifelse [i_consensus] of other-end > 0 [ alter-v_motivation "+harmony" ] [ alter-v_motivation "-harmony" ] ] die ] ifelse i_consensus > 0 [ set color turquoise ] [ set color black ] ] end
There is only one version of this model, created about 10 years ago by Denis Havlik.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Volunteers motivation.png | preview | Preview for 'Volunteers motivation' | about 10 years ago, by Denis Havlik | Download |
This model does not have any ancestors.
This model does not have any descendants.
Denis Havlik
How to model the volunteers motivation? (Question)
My first try at modeling the volunteers motivation is here. It shows the main features, such as "telling the volunteers that they did a great job will motivate them" and "long time spent volunteering is bad for motivation", but it's far from perfect. The question is: what to target next?
Posted about 10 years ago
João Antônio
File Error (Question)
It is not possible to open the zip file. An error occurs. Is it possible to upload it again?
Posted almost 9 years ago