Generation of Diagnostic Knowledge by Discrete-Event Model Compilation