Tutorial 1: 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
[15]:
SIR3S_SIRGRAF_DIR = r"C:\3S\SIR 3S Entwicklung\SirGraf-90-15-00-16_Quebec_x64" #change to local path
Imports
Note: The SIR 3S Toolkit requires the Sir3S_Toolkit.dll included in SIR 3S installations (version Quebec and higher).
[16]:
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.
[17]:
from sir3stoolkit.core import wrapper
[18]:
sir3stoolkit
[18]:
<module 'sir3stoolkit' from 'C:\\Users\\aUsername\\3S\\sir3stoolkit\\src\\sir3stoolkit\\__init__.py'>
The wrapper package has to be initialized with reference to a SIR 3S (SirGraf) installation.
[19]:
wrapper.Initialize_Toolkit(SIR3S_SIRGRAF_DIR)
Initialization
The SIR 3S Toolkit contains two classes: SIR3S_Model (model and data) and SIR3S_View (depiction in SirGraf). All SIR 3S Toolkit functionality is accessed via the methods of these classes.
[20]:
s3s = wrapper.SIR3S_Model()
Initialization complete
[21]:
s3s_view = wrapper.SIR3S_View()
Initialization complete
Next: Tutorial 2: Creating a new or opening an existing SIR 3S Model