Cellular Automata to Simulate the amount of Biomphalaria glabrata in a focus of Schistosomiasis in Carne de Vaca - GO - PE - Brazil.

Jones Albuquerque
Marco Andrade
Silvana Bocanegra
Date : 08th, mai 2008

This code simulates the feeling of a malacological colect of Biomphalaria glabrata when environmental parameters have been defined. It uses real data parameters of Carne de Vaca - GO - PE - Brazil.

ShowInfectedArea[a_]:=Show[ArrayPlot[a,Mesh->True,ColorRules->{0-> Blue,1->Yellow,2->Red,3->Black}]]

FourNeighbors[a_] :=(RotateRight /@ a) + (RotateLeft /@ a) + (RotateRight[a])+ (RotateLeft[a]);

NextGen = { {_,0 }->3,{_,1 }->3,{_,2}->3,{h_,3}->h,{_,x_/;x≥4}->3};

CarneDeVaca[a_] := (Transpose/@ Transpose[{ a,FourNeighbors[a]}]) /. NextGen;

horizontalstreets = 10;
verticalstreets = 10;
infectedarea=RandomInteger[3,{horizontalstreets,verticalstreets}];

ShowInfectedArea[infectedarea]

ShowInfectedArea[CarneDeVaca[infectedarea]]

newinfectedarea=CarneDeVaca[infectedarea];
ShowInfectedArea[CarneDeVaca[newinfectedarea]]