Beginner Tutorial on SAInt API

Welcome to the beginner tutorial series on the SAInt API. The API allows users to interact with SAInt programmatically and automate modeling and simulation tasks, which can be more efficient and scalable than in the SAInt GUI. Moreover, the SAInt API offers a flexible way to access and use SAInt’s functionality with a variety of programming languages such as Python, C++, etc.

This tutorial series will focus on using SAInt with Python programming language. By the end of this tutorial series, you will have a strong understanding of the various SAInt API functions and how to use them with Python to automate processes with SAInt. So let’s get started!

  • Before starting this tutorial, you will need to install Python on your computer. The latest Python version can be downloaded from the official Python website Python download link.

  • Integrated development environments (IDEs) such as PyCharm, Sypder, or Visual Studio Code (VSCode) can be used to follow this tutorial. Once you have installed Python, please open your preferred Python IDE and set your Python interpreter. This will allow you to run Python code within your IDE.

  • Before starting this tutorial, we recommend that you familiarize yourself with the basic operations and workflow within SAInt by at least reviewing the overview and layers sections of the reference documentation. This is to ensure that you have a good learning experience through this tutorial series and you are on your way to becoming a SAInt API expert.

This tutorial series will show SAInt API functions related to electric networks, but similar functionality for other types of networks is also available in the SAInt API. Refer to SAInt API documentation.

This tutorial series is divided into four tutorials. The first tutorial covers the basic functions used for loading networks, scenarios, and executing simulations using the SAInt API. The second tutorial focuses on the inclusion functions of the SAInt API, used for importing and including network and scenario data. It also explains how to create a new scenario for an existing network. The third tutorial introduces the functions for exporting network and scenario data. The last tutorial explains some of the SAInt built-in evaluation functions and demonstrates how to use them with the SAInt API.

Time to complete:

The tutorial uses one of the default models available in C:\Users\...\Documents\encoord\SAInt-v3\Projects, but a copy of the files is also available in the sub-folder .\Scripting\API Beginner of the folder Tutorials. Download the tutorials data from the "Model Ready Datasets" category of the community Forum.