Create a spatial modelΒΆ

Spatial structure is an important component in many models of disease. CMS offers an easy way to specify geographic compartments. The syntax for creating a locale is (locale name), and all Spatial simulation methods support this feature.

Species must be specified with the name of the locale where it belongs in the following format: species_name::locale_name. The below example illustrates how locales and species are created for a spatial simulation.

(locale site-1)
(set-locale site-1)
(species A::1 1000)

(locale site-2)
(set-locale site-2)
(species A::2 1000)

(reaction A1->A2 (A::1) (A::2) (* D A::1))
(reaction A2->A1 (A::2) (A::1) (* D A::2))