Volunteer Coordination System for Disaster Simulation

This model is a systematic model for the centralized coordination of volunteers during the reaction phase of a volcanic eruption. The agent (volunteers) were randomly placed to try to get to the barracks (red spots). Each agent (volunteers) has an energy potential that will be directed to the barracks if the volunteer was able to reach. Potential barracks can be reduced by volunteer capacity if the volunteer is able to reach the point of the refugee camps.

The problems with the program I created is the volunteer movement not starting according to the predefined color patch and moving back and forth. Volunteers cannot turn left or turn right if in front of this colored patch instead of the indicated color. Is there a solution for moving agents (volunteers) about this model?

Also, how can volunteers measure the shortest distance to an agent, can they quickly reach the barracks point?

Also, is there a way that volunteers can search where the evacuation point has to be reached in advance if the demand of each point depends on the barracks or priorities?

This is my 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



to move
  ask Volunteers
  [
    move-to one-of patches in-radius 2 with [pcolor = 0]
    ifelse [pcolor] of patches in-radius 2 = 0 [move-to one-of patches in-radius 2 with [pcolor = 0]]
    [
    ifelse [pcolor] of patch-ahead 1 = 105 [set heading -180 move-to one-of patches in-radius 2 with [pcolor = 0] ]
    [
      ifelse [pcolor] of patch-ahead 1 = 8 [set heading -180  move-to one-of patches in-radius 2 with [pcolor = 0]]
      [
        if [pcolor] of patch-ahead 1 = red [move-to one-of patches in-radius 2 with [pcolor = red]  fd 0 ]

        ]
      ]
    ]
  ]
end
to search
     if any? turtles-on patches with [ 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


to 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

      

+3


source to share


1 answer


I just finished, not the same, but basically the same model. The model I made is about evacuating people. and just like you, I also participate in UGM.

The solution I used to solve the agent movements is the shortest path algorithm in netlogo code.

You can look, Jikstra's Algorithm or other. In my case, I am using the * (aStar) algorithm. Netlogo also has a sample implementation *. you can watch it.



I could only help so far, just like Seth Tisue Said, any detailed answers will take hours to write.

Hope it helps.

0


source







All Articles