Automated handling of tutoring and training functions in educational systems requires the availability of articulate domain models. In this article we further develop the application of qualitative models for this purpose. A framework is presented that defines a key role for qualitative models as interactive simulations of the subject matter. Within this framework our research focuses on automating the diagnosis of learner behaviour. We show how a qualitative simulation model of the subject matter can be reformulated to fit the requirements of general diagnostic engines such as GDE. It turns out that, due to the specific characteristics of such models, additional structuring is required to produce useful diagnostic results. A set of procedures is presented that automatically maps detailed simulation models into a hierarchy of aggregated models by hiding non-essential details and chunking chains of causal dependencies. The result is a highly structured subject matter model that enables...