Introduction
To support the operation of the SNS accelerator we have built a development framework for high-level control applications called XAL (for a description of XAL see [2]). The framework includes a simulation engine that we call the XAL model subsystem. This subsystem works in conjunction with the application framework, or as a stand-alone particle beam simulator. XAL contains a utility for automatically generating modeling lattices and synchronizing them with the operating machine. Here we outline the architecture of the model subsystem and the mathematical models upon which it is based.