Tutorials

Here, you will find a variety of tutorials.

Before proceeding, ensure that the SIR 3S Toolkit is properly installed (see Installation).

These tutorials are designed to introduce new users to the basic functionalities of the SIR 3S Toolkit.

SIR3S_Model()

The SIR3S_Model() class implements basic functionalities regarding interactions between Python and a SIR 3S model.

You can also download all tutorials regarding SIR3S_Model() (0 - 49) and their respective data in a joint .zip archive at once here.

Tutorial 0: Importing and initialization of the SIR 3S Toolkit

This tutorial demonstrates how to import the SIR 3S Toolkit and initialize instances of its classes.

View: Notebook | Download: ZIP archive.

Tutorial 1: Creating a new or opening an existing SIR 3S model

This tutorial demonstrates how to create new SIR 3S models or open already existing ones.

View: Notebook | Download: ZIP archive.

Tutorial 2: Accessing and modifying model data

This tutorial demonstrates how to get and set values of objects based on their topological key (tk).

View: Notebook | Download: ZIP archive.

Tutorial 3: Calculating and Accessing results

This tutorial demonstrates how to execute calculations and access their results.

View: Notebook | Download: ZIP archive.

Tutorial 4: Editing a SIR 3S using Transactions/EditSessions

This Tutorial demonstrates how to change SIR 3S models by grouping changes into Transactions/EditSessions.

View: Notebook | Download: ZIP archive.

Tutorial 5: Insert and Connect Elements

This Tutorial demonstrates how new elements such as nodes, pipes, tanks, valves, etc. can be inserted into a SIR 3S model and connected.

View: Notebook | Download: ZIP archive.

Tutorial 6: Tables

This Tutorial demonstrates how to view SIR 3S tables in python and add rows to them. For time tables some more advanced features are available: Tutorial 54

View: Notebook | Download: ZIP archive.

Tutorial 7: Groups

This Tutorial demonstrates how to obtain the tks of objects that are part of a Group (Layer) and to change which objects are part of which groups.

View: Notebook | Download: ZIP archive.

Tutorial 8: Miscellaneous

This Tutorial demonstrates miscellaneous functions of the SIR3S_Model() class that cannot be assigned to one of the previous Tutorial topics.

View: Notebook | Download: ZIP archive.

Toolkit Structure

SIR3S_Model_Mantle()

SIR3S_Model_Mantle() is a collector class that extends the SIR3S_Model() class. As of now the model data for these tutorials is not publicly available (internal: T:\SCRATCH\Jablonski\Toolkit).

Tutorial 50: Mantle Import

This Example demonstrates how to instantiate the SIR3S_Model_Mantle() class and its subclasses.

View: Notebook | Download: Notebook.

Tutorial 51: Manual Creation of Element Dataframes

This Example demonstrates the capabilities of the class SIR3S_Model_Dataframes that extends SIR3S_Model be abilities to work directley with pandas dataframes. It is shown how to create dataframes containing information about elements such as Nodes, Pipes, etc. existing in a SIR 3S Model. The methods presented are manual, user-defined and detailed. For creating more general dataframes with less input necessary, see Tutorial 52.

View: Notebook | Download: Notebook.

Tutorial 52: General Creation of Element Dataframes

This Example demonstrates the capabilities of the class SIR3S_Model_Dataframes that extends SIR3S_Model be abilities to work directley with pandas dataframes. It is shown how to create dataframes containing information about elements such as Nodes, Pipes, etc. existing in a SIR 3S Model. The methods presented are not user-defined and neither efficient, but get you the most important information quickly. For more detailed methods of creating dataframes, see Tutorial 51.

View: Notebook | Download: Notebook.

Tutorial 53: Creation of Non-Element Dataframes

This Example demonstrates the capabilities of the class SIR3S_Model_Dataframes that extends SIR3S_Model be abilities to work directley with pandas dataframes. It is shown how to create dataframes containing information that does not concern individual elements types such as Nodes, Pipes, etc. but instead concerning more abstract SIR 3S data such as longitudinal sections or concatenations of multiple element types like hydraulic edges.

View: Notebook | Download: Notebook.

Tutorial 54: Measured Variable Tables

This example demonstrates how view, create, delete and edit measured variable tables (Sollwerttabellen) with pandas dataframes as python representation. The functions presented work for any kind of time table.

View: Notebook | Download: Notebook.

Tutorial 55: Compare Calculations

The Tutorial demonstrates how to execute calculations for the same model in adjusted valve states and view the individual results.

View: Notebook | Download: Notebook.

Tutorial 61: Nx-Graph

This Tutorial demonstrates how to create a nx-Graph from a SIR 3S model.

View: Notebook | Download: Notebook.

Tutorial 62: Pandapipes

This Tutorial demonstrates how to create a pandapipes model from a SIR 3S model.

View: Notebook | Download: Notebook.

Tutorial 71: Time Curves

This Tutorial demonstrates how to plot time curves.

View: Notebook | Download: Notebook.

Tutorial 72: Longitudinal Sections (soon)

This Tutorial demonstrates how to plot time curves. WORK IN PROGRESS

View: Notebook | Download: Notebook.

Tutorial 73: Network Color Depiction

This example demonstrates how to plot network color depictions (ncd).

View: Notebook | Download: Notebook.

Tutorial 81: Groups

This example demonstrates how add, remove, set elements to groups.

View: Notebook | Download: Notebook.