colspn [brusselator] { constants: valuesets[Main:P_Set_2:P_Set_3:P_Set_4:P_Set_5:P_Set_6:P_Set_7] all: int N = 10; int M = N; int INITP = N/2; param: double D = [8:8:8:8:8:8:8]; double B = [6.976424:7.177667:7.244748:8.72053:10.330474:11.135446:13.282038]; double A = [4.5:4.5:4.5:4.5:4.5:4.5:4.5]; colorsets: Dot = {dot}; xDim = {1..N}; yDim = {1..M}; Grid2D = PROD(xDim,yDim); variables: xDim : x; yDim : y; xDim : a; yDim : b; colorfunctions: bool N2D(xDim x,yDim y,xDim a,yDim b) { (a=x|a=x+1|a=x-1)&(b=y|b=y+1|b=y-1)&!(a=x&b=y) }; places: discrete: Grid2D U = 3`(INITP,INITP); Grid2D V = 13`(INITP,INITP); transitions: r1 : : [U + {(x,y)}] : A ; r2 : : [V + {(x,y)}] & [U - {(x,y)}] : MassAction(B) ; r3 : : [U + {3`(x,y)}] & [V - {(x,y)}] & [U - {2`(x,y)}] : MassAction(1) ; r4 : : [U - {(x,y)}] : MassAction(1) ; r5 {[N2D(x,y,a,b)]} : : [U + {(a,b)}] & [U - {(x,y)}] : U ; r6 {[N2D(x,y,a,b)]} : : [V + {(a,b)}] & [V - {(x,y)}] : MassAction(D) ; }