SmartTag

No description for this project.



Agents

Number of agents: 4

Behaviors


CityblockCityblock

Number of methods: 1


WHILE-RUNNING ()

city block keeps track of clinic density

Number of rules: 1 

If
no condition
Then
SET (clinic , to , (clinic[up]+clinic[down]+clinic[left]+clinic[right])/4.0)



ClinicClinic

Number of methods: 2


WHILE-RUNNING ()

hospital is a passive cure station

Number of rules: 1 

If
%-CHANCE (2)
Then
MOVE-RANDOM-ON (cityblock)

WHEN-CREATING-NEW-AGENT ()

1000 = highest clinic density

Number of rules: 1 

If
no condition
Then
SET (clinic , to , 1000)



CounterCounter

Number of methods: 1


WHILE-RUNNING ()

keep track of people, healthy and sick

Number of rules: 1 

If
no condition
Then
SET (@healthy , to , 0), and
SET (@sick , to , 0), and
BROADCAST (Person , rollcall)



PersonPerson

Number of methods: 5


WHILE-RUNNING ()

hp next to sp get sick with some prob
sick person moves towards hospital seeking help
time can also cure

Number of rules: 7 

If
SEE ((0 0) , person), and
NEXT-TO (> , 0 , sickperson), and
%-CHANCE (@infectionrate)
Then
CHANGE ((0 0) , sickperson), and
SET (clicks , to , 0)

If
SEE ((0 0) , person)
Then
MOVE-RANDOM-ON (cityblock)

If
SEE ((0 0) , sickperson), and
IS (clicks , > , 250), and
%-CHANCE (@cureprob)
Then
CHANGE ((0 0) , person)

If
SEE ((0 0) , sickperson), and
NEXT-TO (> , 0 , clinic)
Then
SET (clicks , to , clicks+50)

If
SEE ((0 0) , sickperson), and
%-CHANCE (@seekprob)
Then
MAKE ((0 0) , SeekHelp), and
SET (clicks , to , clicks+1)

If
SEE ((0 0) , sickperson), and
%-CHANCE (10)
Then
MOVE-RANDOM-ON (cityblock), and
SET (clicks , to , clicks+1)

If
SEE ((0 0) , sickperson)
Then
SET (clicks , to , clicks+1)

ON (SeekHelp)

Put text here to explain what this method does!

Number of rules: 1 

If
no condition
Then
SET (ClinicSense , to , 0), and
MAKE ((0 0) , SeekClinic), and
MAKE ((0 0) , MoveToClinic)

ON (SeekClinic)

Put text here to explain what this method does!

Number of rules: 4 

If
IS (ClinicSense , < , Clinic[up])
Then
SET (ClinicSense , to , Clinic[up]), and
SET (ClinicDir , to , 0), and
MAKE ((0 0) , SeekClinic)

If
IS (ClinicSense , < , Clinic[right])
Then
SET (ClinicSense , to , Clinic[right]), and
SET (ClinicDir , to , 1), and
MAKE ((0 0) , SeekClinic)

If
IS (ClinicSense , < , Clinic[down])
Then
SET (ClinicSense , to , Clinic[down]), and
SET (ClinicDir , to , 2), and
MAKE ((0 0) , SeekClinic)

If
IS (ClinicSense , < , Clinic[left])
Then
SET (ClinicSense , to , Clinic[left]), and
SET (ClinicDir , to , 3)

ON (MoveToClinic)

Put text here to explain what this method does!

Number of rules: 4 

If
IS (ClinicDir , = , 0), and
SEE ((-1 0) , cityblock)
Then
MOVE ((-1 0))

If
IS (ClinicDir , = , 1), and
SEE ((0 1) , cityblock)
Then
MOVE ((0 1))

If
IS (ClinicDir , = , 2), and
SEE ((1 0) , cityblock)
Then
MOVE ((1 0))

If
IS (ClinicDir , = , 3), and
SEE ((0 -1) , cityblock)
Then
MOVE ((0 -1))

ON (rollcall)

Put text here to explain what this method does!

Number of rules: 2 

If
SEE ((0 0) , person)
Then
SET (@healthy , to , @healthy+1)

If
SEE ((0 0) , sickperson)
Then
SET (@sick , to , @sick+1)


This report was generated using AgentSheets Version 3.0.0