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.

SIR 3S Installation

[ ]:
SIR3S_SIRGRAF_DIR = r"C:\3S\SIR 3S\SirGraf-90-15-00-24_Quebec-Upd2" #change to local path

Imports

Note: The SIR 3S Toolkit requires the Sir3S_Toolkit.dll included in SIR 3S installations (version Quebec and higher).

[2]:
import sir3stoolkit

The core of sir3stoolkit is a Python wrapper around basic functionality of SIR 3S, offering a low-level access to the creation, modification and simulation of SIR 3S models. In the future pure python subpackages may be added.

[3]:
from sir3stoolkit.core import wrapper
[4]:
sir3stoolkit
[4]:
<module 'sir3stoolkit' from 'c:\\Users\\wolters\\AppData\\Local\\anaconda3\\Lib\\site-packages\\sir3stoolkit\\__init__.py'>

The wrapper package has to be initialized with reference to a SIR 3S (SirGraf) installation.

[5]:
wrapper.Initialize_Toolkit(SIR3S_SIRGRAF_DIR)

Initialization

The SIR 3S Toolkit contains two classes: SIR3S_Model (model and data) and SIR3S_View (interactive work in SIR Graf using the SIR Graf Python console). All SIR 3S Toolkit basis functionality is accessed via the methods of these classes. In this line of tutorials (0-49) we focus on SIR3S_Model.

[6]:
s3s = wrapper.SIR3S_Model()
Initialization complete
[7]:
s3s_view = wrapper.SIR3S_View()
Initialization complete

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