netlogo - Volunteer coordination system for modelling natural disaster emergencies -
this model system model of centralized coordination of volunteers response phase of volcanic eruption. agent (volunteers) placed randomly try reach point of barracks (red colored patches). each agent (volunteers) has energy capacity channelled point barracks if volunteer has been able achieve. point barracks have demand reduced capacity of volunteers if volunteer able reach point of refugee camps.
problems on program created volunteer movement not run in accordance predetermined color patch , move , forth. volunteers can’t choose turn left or turn right if color patch in front of instead of specified color. there solution movement of agents (volunteers) model?
besides how volunteers can measure shortest distance agent reach point barracks?
furthermore, there way volunteers can perform search evacuation point must reached in advance if demand of each point varies barracks or upon priorities?
this code:
to go if ticks = 180 [ stop] ask volunteers [ifelse capacity = 0 [ fd 0 frozen][ move search ]] ;search ;update-demand tick display-labels do-plots end move ask volunteers [ move-to one-of patches in-radius 2 [pcolor = 0] ifelse [pcolor] of patches in-radius 2 = 0 [move-to one-of patches in-radius 2 [pcolor = 0]] [ ifelse [pcolor] of patch-ahead 1 = 105 [set heading -180 move-to one-of patches in-radius 2 [pcolor = 0] ] [ ifelse [pcolor] of patch-ahead 1 = 8 [set heading -180 move-to one-of patches in-radius 2 [pcolor = 0]] [ if [pcolor] of patch-ahead 1 = red [move-to one-of patches in-radius 2 [pcolor = red] fd 0 ] ] ] ] ] end search if any? turtles-on patches [ pcolor = red ] [ ifelse capacity < demand [ set demand (( 1 + rate-of-demand) * (demand - (capacity * (1 + rate-of-capacity)))) set capacity 0 ] [set capacity (( 1 + rate-of-capacity) * (capacity - demand )) set demand 0 ] ] end frozen if capacity = 0 [ fd 0 set waiting-time waiting-time + 1 if waiting-time > 5 [set capacity 1000 / jumlah-relawan set waiting-time 0] ] end
i've finish, not exact same same, kind of model. model made evacuation of people. , you, student in ugm too.
the solution used solve agent's movements implementing shortest-path algorithm in netlogo code.
you up, djikstra algorithm or other. in case, use a*(astar) algorithm. there example of a* implementation in netlogo well. up.
i far, seth tisue said, details answer take hours write.
hope helps.
Comments
Post a Comment