For this issue we have already developed a package for training purposes. This package contains a discription of how to implement the tools for the simulation component as well as an application library.
With 'Path Analyis'-tool one is able to find the critical paths of the model.
Download:
Domain Specific Samples