Model description: the agent D represents the danger zone (road) that can set on fire the neighbouring locations, that have high probability (H) to catch fire. The burning locations (B) can set on fire the neighbouring ones, that can be part of the forest (T) or of the area of interest (P). The safe area (S) will never catch fire. When the sensors (WS) will detect a fire close by, the area of interest will activate the control measure (performed by the agents PA), reducing the probability of the neighbouring zone to catch fire (L). In the initial condition we find D and H agents in central lines, area of interest (P) and safe area (S) in specific part of the grid, sensors (WS) arranged on a central line while the rest of the grid is occupied by forest (T).
#Space: TwoD(25,25)
#Parameters
fD= 0.5;
pD= 1.0;
fBH= 0.5;
pBH= 1.0;
fBT= 0.5;
pBT= 0.7;
fBL= 0.5;
pBL= 0.01;
fBP= 0.5;
pBP= 1.0;
fBPA= 0.5;
pBPA= 0.2;
cH= 2.0;
pH= 1.0;
cT= 2.0;
pT= 1.0;
ac= 2.0;
pc= 1.0;
cH1= 2.0;
pH1= 1.0;
cH2= 2.0;
pH2= 1.0;
cH3= 2.0;
pH3= 1.0;
cT1= 2.0;
pT1= 1.0;
cT2= 2.0;
pT2= 1.0;
cT3= 2.0;
pT3= 1.0;
ac1= 2.0;
pc1= 1.0;
ac2= 2.0;
pc2= 1.0;
#Agents
D(l) := ->{N(1)}(fireD, fD).D(l);
B(l) := ->{N(1)}(fireBH,fBH).B(l) + ->{N(1)}(fireBT,fBT).B(l) + ->{N(1)}(fireBL,fBL).B(l) + ->{N(1)}(actControl1,ac1).B(l) +
->{N(2)}(actControl2,ac2).B(l) + ->{N(1)}(fireBP,fBP).B(l) + ->{N(1)}(fireBPA,fBPA).B(l);
H(l) := <-(fireD,pD).B(l) + <-(fireBH,pBH).B(l) + <-(controlH1,pH1).L(l) + <-(controlH2,pH2).L(l) +
<-(controlH3,pH3).L(l);
T(l) := <-(fireBT,pBT).B(l) + <-(controlT1,pT1).L(l) +
<-(controlT2,pT2).L(l) + <-(controlT3,pT3).L(l);
L(l) := <-(fireBL,pBL).B(l);
P(l) := <-(fireBP,pBP).B(l);
PA(l) := ->{N(1)}(controlH1,cH1).PA(l) + ->{N(2)}(controlH2,cH2).PA(l) + ->{N(3)}(controlH3,cH3).PA(l) + ->{N(1)}(controlT1,cT1).PA(l) + ->{N(2)}(controlT2,cT2).PA(l) + ->{N(3)}(controlT3,cT3).PA(l) + <-(fireBPA,pBPA).B(l);
S(l) := ;
WS(l) := <-(actControl1,pc1).PA(l) + <-(actControl2,pc2).PA(l);
#Initial conditions
D(0,12)[1]||D(1,12)[1]||D(2,12)[1]||D(3,12)[1]||D(4,12)[1]||D(5,12)[1]||D(6,12)[1]||D(7,12)[1]||D(8,12)[1]||D(9,12)[1]||D(10,12)[1]||D(11,12)[1]||D(12,12)[1]||D(13,12)[1]||D(14,12)[1]||D(15,12)[1]||D(16,12)[1]||D(17,12)[1]||D(18,12)[1]||D(19,12)[1]||D(20,12)[1]||D(21,12)[1]||D(22,12)[1]||D(23,12)[1]||D(24,12)[1]||H(0,13)[1]||H(1,13)[1]||H(2,13)[1]||H(3,13)[1]||H(4,13)[1]||H(5,13)[1]||H(6,13)[1]||H(7,13)[1]||H(8,13)[1]||H(9,13)[1]||H(10,13)[1]||H(11,13)[1]||H(12,13)[1]||H(13,13)[1]||H(14,13)[1]||H(15,13)[1]||H(16,13)[1]||H(17,13)[1]||H(18,13)[1]||H(19,13)[1]||H(20,13)[1]||H(21,13)[1]||H(22,13)[1]||H(23,13)[1]||H(24,13)[1]||H(0,11)[1]||H(1,11)[1]||H(2,11)[1]||H(3,11)[1]||H(4,11)[1]||H(5,11)[1]||H(6,11)[1]||H(7,11)[1]||H(8,11)[1]||H(9,11)[1]||H(10,11)[1]||H(11,11)[1]||H(12,11)[1]||H(13,11)[1]||H(14,11)[1]||H(15,11)[1]||H(16,11)[1]||H(17,11)[1]||H(18,11)[1]||H(19,11)[1]||H(20,11)[1]||H(21,11)[1]||H(22,11)[1]||H(23,11)[1]||H(24,11)[1]||P(5,20)[1]||P(5,21)[1]||P(6,20)[1]||P(6,21)[1]||P(20,5)[1]||P(20,6)[1]||P(21,5)[1]||P(21,6)[1]||WS(7,8)[1]||WS(8,8)[1]||WS(9,8)[1]||WS(10,8)[1]||WS(11,8)[1]||WS(12,8)[1]||WS(13,8)[1]||WS(14,8)[1]||WS(15,8)[1]||WS(16,8)[1]||WS(17,8)[1]||WS(18,8)[1]||WS(19,8)[1]||WS(7,16)[1]||WS(8,16)[1]||WS(9,16)[1]||WS(10,16)[1]||WS(11,16)[1]||WS(12,16)[1]||WS(13,16)[1]||WS(14,16)[1]||WS(15,16)[1]||WS(16,16)[1]||WS(17,16)[1]||WS(18,16)[1]||WS(19,16)[1]||S(5,5)[1]||S(5,6)[1]||S(6,5)[1]||S(6,6)[1]||S(20,20)[1]||S(20,21)[1]||S(21,20)[1]||S(21,21)[1]||T(0,0)[1]||T(0,1)[1]||T(0,2)[1]||T(0,3)[1]||T(0,4)[1]||T(0,5)[1]||T(0,6)[1]||T(0,7)[1]||T(0,8)[1]||T(0,9)[1]||T(0,10)[1]||T(0,14)[1]||T(0,15)[1]||T(0,16)[1]||T(0,17)[1]||T(0,18)[1]||T(0,19)[1]||T(0,20)[1]||T(0,21)[1]||T(0,22)[1]||T(0,23)[1]||T(0,24)[1]||T(1,0)[1]||T(1,1)[1]||T(1,2)[1]||T(1,3)[1]||T(1,4)[1]||T(1,5)[1]||T(1,6)[1]||T(1,7)[1]||T(1,8)[1]||T(1,9)[1]||T(1,10)[1]||T(1,14)[1]||T(1,15)[1]||T(1,16)[1]||T(1,17)[1]||T(1,18)[1]||T(1,19)[1]||T(1,20)[1]||T(1,21)[1]||T(1,22)[1]||T(1,23)[1]||T(1,24)[1]||T(2,0)[1]||T(2,1)[1]||T(2,2)[1]||T(2,3)[1]||T(2,4)[1]||T(2,5)[1]||T(2,6)[1]||T(2,7)[1]||T(2,8)[1]||T(2,9)[1]||T(2,10)[1]||T(2,14)[1]||T(2,15)[1]||T(2,16)[1]||T(2,17)[1]||T(2,18)[1]||T(2,19)[1]||T(2,20)[1]||T(2,21)[1]||T(2,22)[1]||T(2,23)[1]||T(2,24)[1]||T(3,0)[1]||T(3,1)[1]||T(3,2)[1]||T(3,3)[1]||T(3,4)[1]||T(3,5)[1]||T(3,6)[1]||T(3,7)[1]||T(3,8)[1]||T(3,9)[1]||T(3,10)[1]||T(3,14)[1]||T(3,15)[1]||T(3,16)[1]||T(3,17)[1]||T(3,18)[1]||T(3,19)[1]||T(3,20)[1]||T(3,21)[1]||T(3,22)[1]||T(3,23)[1]||T(3,24)[1]||T(4,0)[1]||T(4,1)[1]||T(4,2)[1]||T(4,3)[1]||T(4,4)[1]||T(4,5)[1]||T(4,6)[1]||T(4,7)[1]||T(4,8)[1]||T(4,9)[1]||T(4,10)[1]||T(4,14)[1]||T(4,15)[1]||T(4,16)[1]||T(4,17)[1]||T(4,18)[1]||T(4,19)[1]||T(4,20)[1]||T(4,21)[1]||T(4,22)[1]||T(4,23)[1]||T(4,24)[1]||T(5,0)[1]||T(5,1)[1]||T(5,2)[1]||T(5,3)[1]||T(5,4)[1]||T(5,7)[1]||T(5,8)[1]||T(5,9)[1]||T(5,10)[1]||T(5,14)[1]||T(5,15)[1]||T(5,16)[1]||T(5,17)[1]||T(5,18)[1]||T(5,19)[1]||T(5,22)[1]||T(5,23)[1]||T(5,24)[1]||T(6,0)[1]||T(6,1)[1]||T(6,2)[1]||T(6,3)[1]||T(6,4)[1]||T(6,7)[1]||T(6,8)[1]||T(6,9)[1]||T(6,10)[1]||T(6,14)[1]||T(6,15)[1]||T(6,16)[1]||T(6,17)[1]||T(6,18)[1]||T(6,19)[1]||T(6,22)[1]||T(6,23)[1]||T(6,24)[1]||T(7,0)[1]||T(7,1)[1]||T(7,2)[1]||T(7,3)[1]||T(7,4)[1]||T(7,5)[1]||T(7,6)[1]||T(7,7)[1]||T(7,8)[1]||T(7,9)[1]||T(7,10)[1]||T(7,14)[1]||T(7,15)[1]||T(7,16)[1]||T(7,17)[1]||T(7,18)[1]||T(7,19)[1]||T(7,20)[1]||T(7,21)[1]||T(7,22)[1]||T(7,23)[1]||T(7,24)[1]||T(8,0)[1]||T(8,1)[1]||T(8,2)[1]||T(8,3)[1]||T(8,4)[1]||T(8,5)[1]||T(8,6)[1]||T(8,7)[1]||T(8,8)[1]||T(8,9)[1]||T(8,10)[1]||T(8,14)[1]||T(8,15)[1]||T(8,16)[1]||T(8,17)[1]||T(8,18)[1]||T(8,19)[1]||T(8,20)[1]||T(8,21)[1]||T(8,22)[1]||T(8,23)[1]||T(8,24)[1]||T(9,0)[1]||T(9,1)[1]||T(9,2)[1]||T(9,3)[1]||T(9,4)[1]||T(9,5)[1]||T(9,6)[1]||T(9,7)[1]||T(9,8)[1]||T(9,9)[1]||T(9,10)[1]||T(9,14)[1]||T(9,15)[1]||T(9,16)[1]||T(9,17)[1]||T(9,18)[1]||T(9,19)[1]||T(9,20)[1]||T(9,21)[1]||T(9,22)[1]||T(9,23)[1]||T(9,24)[1]||T(10,0)[1]||T(10,1)[1]||T(10,2)[1]||T(10,3)[1]||T(10,4)[1]||T(10,5)[1]||T(10,6)[1]||T(10,7)[1]||T(10,8)[1]||T(10,9)[1]||T(10,10)[1]||T(10,14)[1]||T(10,15)[1]||T(10,16)[1]||T(10,17)[1]||T(10,18)[1]||T(10,19)[1]||T(10,20)[1]||T(10,21)[1]||T(10,22)[1]||T(10,23)[1]||T(10,24)[1]||T(11,0)[1]||T(11,1)[1]||T(11,2)[1]||T(11,3)[1]||T(11,4)[1]||T(11,5)[1]||T(11,6)[1]||T(11,7)[1]||T(11,8)[1]||T(11,9)[1]||T(11,10)[1]||T(11,14)[1]||T(11,15)[1]||T(11,16)[1]||T(11,17)[1]||T(11,18)[1]||T(11,19)[1]||T(11,20)[1]||T(11,21)[1]||T(11,22)[1]||T(11,23)[1]||T(11,24)[1]||T(12,0)[1]||T(12,1)[1]||T(12,2)[1]||T(12,3)[1]||T(12,4)[1]||T(12,5)[1]||T(12,6)[1]||T(12,7)[1]||T(12,8)[1]||T(12,9)[1]||T(12,10)[1]||T(12,14)[1]||T(12,15)[1]||T(12,16)[1]||T(12,17)[1]||T(12,18)[1]||T(12,19)[1]||T(12,20)[1]||T(12,21)[1]||T(12,22)[1]||T(12,23)[1]||T(12,24)[1]||T(13,0)[1]||T(13,1)[1]||T(13,2)[1]||T(13,3)[1]||T(13,4)[1]||T(13,5)[1]||T(13,6)[1]||T(13,7)[1]||T(13,8)[1]||T(13,9)[1]||T(13,10)[1]||T(13,14)[1]||T(13,15)[1]||T(13,16)[1]||T(13,17)[1]||T(13,18)[1]||T(13,19)[1]||T(13,20)[1]||T(13,21)[1]||T(13,22)[1]||T(13,23)[1]||T(13,24)[1]||T(14,0)[1]||T(14,1)[1]||T(14,2)[1]||T(14,3)[1]||T(14,4)[1]||T(14,5)[1]||T(14,6)[1]||T(14,7)[1]||T(14,8)[1]||T(14,9)[1]||T(14,10)[1]||T(14,14)[1]||T(14,15)[1]||T(14,16)[1]||T(14,17)[1]||T(14,18)[1]||T(14,19)[1]||T(14,20)[1]||T(14,21)[1]||T(14,22)[1]||T(14,23)[1]||T(14,24)[1]||T(15,0)[1]||T(15,1)[1]||T(15,2)[1]||T(15,3)[1]||T(15,4)[1]||T(15,5)[1]||T(15,6)[1]||T(15,7)[1]||T(15,8)[1]||T(15,9)[1]||T(15,10)[1]||T(15,14)[1]||T(15,15)[1]||T(15,16)[1]||T(15,17)[1]||T(15,18)[1]||T(15,19)[1]||T(15,20)[1]||T(15,21)[1]||T(15,22)[1]||T(15,23)[1]||T(15,24)[1]||T(16,0)[1]||T(16,1)[1]||T(16,2)[1]||T(16,3)[1]||T(16,4)[1]||T(16,5)[1]||T(16,6)[1]||T(16,7)[1]||T(16,8)[1]||T(16,9)[1]||T(16,10)[1]||T(16,14)[1]||T(16,15)[1]||T(16,16)[1]||T(16,17)[1]||T(16,18)[1]||T(16,19)[1]||T(16,20)[1]||T(16,21)[1]||T(16,22)[1]||T(16,23)[1]||T(16,24)[1]||T(17,0)[1]||T(17,1)[1]||T(17,2)[1]||T(17,3)[1]||T(17,4)[1]||T(17,5)[1]||T(17,6)[1]||T(17,7)[1]||T(17,8)[1]||T(17,9)[1]||T(17,10)[1]||T(17,14)[1]||T(17,15)[1]||T(17,16)[1]||T(17,17)[1]||T(17,18)[1]||T(17,19)[1]||T(17,20)[1]||T(17,21)[1]||T(17,22)[1]||T(17,23)[1]||T(17,24)[1]||T(18,0)[1]||T(18,1)[1]||T(18,2)[1]||T(18,3)[1]||T(18,4)[1]||T(18,5)[1]||T(18,6)[1]||T(18,7)[1]||T(18,8)[1]||T(18,9)[1]||T(18,10)[1]||T(18,14)[1]||T(18,15)[1]||T(18,16)[1]||T(18,17)[1]||T(18,18)[1]||T(18,19)[1]||T(18,20)[1]||T(18,21)[1]||T(18,22)[1]||T(18,23)[1]||T(18,24)[1]||T(19,0)[1]||T(19,1)[1]||T(19,2)[1]||T(19,3)[1]||T(19,4)[1]||T(19,5)[1]||T(19,6)[1]||T(19,7)[1]||T(19,8)[1]||T(19,9)[1]||T(19,10)[1]||T(19,14)[1]||T(19,15)[1]||T(19,16)[1]||T(19,17)[1]||T(19,18)[1]||T(19,19)[1]||T(19,20)[1]||T(19,21)[1]||T(19,22)[1]||T(19,23)[1]||T(19,24)[1]||T(20,0)[1]||T(20,1)[1]||T(20,2)[1]||T(20,3)[1]||T(20,4)[1]||T(20,7)[1]||T(20,8)[1]||T(20,9)[1]||T(20,10)[1]||T(20,14)[1]||T(20,15)[1]||T(20,16)[1]||T(20,17)[1]||T(20,18)[1]||T(20,19)[1]||T(20,22)[1]||T(20,23)[1]||T(20,24)[1]||T(21,0)[1]||T(21,1)[1]||T(21,2)[1]||T(21,3)[1]||T(21,4)[1]||T(21,7)[1]||T(21,8)[1]||T(21,9)[1]||T(21,10)[1]||T(21,14)[1]||T(21,15)[1]||T(21,16)[1]||T(21,17)[1]||T(21,18)[1]||T(21,19)[1]||T(21,22)[1]||T(21,23)[1]||T(21,24)[1]||T(22,0)[1]||T(22,1)[1]||T(22,2)[1]||T(22,3)[1]||T(22,4)[1]||T(22,5)[1]||T(22,6)[1]||T(22,7)[1]||T(22,8)[1]||T(22,9)[1]||T(22,10)[1]||T(22,14)[1]||T(22,15)[1]||T(22,16)[1]||T(22,17)[1]||T(22,18)[1]||T(22,19)[1]||T(22,20)[1]||T(22,21)[1]||T(22,22)[1]||T(22,23)[1]||T(22,24)[1]||T(23,0)[1]||T(23,1)[1]||T(23,2)[1]||T(23,3)[1]||T(23,4)[1]||T(23,5)[1]||T(23,6)[1]||T(23,7)[1]||T(23,8)[1]||T(23,9)[1]||T(23,10)[1]||T(23,14)[1]||T(23,15)[1]||T(23,16)[1]||T(23,17)[1]||T(23,18)[1]||T(23,19)[1]||T(23,20)[1]||T(23,21)[1]||T(23,22)[1]||T(23,23)[1]||T(23,24)[1]||T(24,0)[1]||T(24,1)[1]||T(24,2)[1]||T(24,3)[1]||T(24,4)[1]||T(24,5)[1]||T(24,6)[1]||T(24,7)[1]||T(24,8)[1]||T(24,9)[1]||T(24,10)[1]||T(24,14)[1]||T(24,15)[1]||T(24,16)[1]||T(24,17)[1]||T(24,18)[1]||T(24,19)[1]||T(24,20)[1]||T(24,21)[1]||T(24,22)[1]||T(24,23)[1]||T(24,24)[1]