Examples

The following examples highlight the usage of pyrecodes. Examples are written as Jupyter notebooks and all the files necessary to run the examples are available on Github.

All Examples:

Example 1 is the simplest example and is a good starting point to understand how pyrecodes works.

Example 2 considers a slightly more complex system with a higher number of components and illustrates how pyrecodes handles complex component interdependencies.

Example 3 shows how pyrecodes integrates with third-party software - the SimCenter’s R2DTool and how it can automatically build a pyrecodes model based on the R2DTool’s outputs, creating a pipeline that extends the classical regional risk assessment tool to simulate regional recovery and assess resilience.

Example 4 builds on Example 3 by including the effect of interdependent infrastructure on building’s functional recovery through supply/demand interfaces.

Example 5 demonstrates how pyrecodes interfaces with third-party resource flow models through APIs.