Automation with Python

Slides used in the 2-day course, Automating PowerWorld Simulator with SimAuto and Python, are available below.

Download Sample Cases, Auxiliary Files, and Python Files used in this training module. The examples work best in Python 3.7.4. A guide for installing Python, Python modules, and the Visual Studio Code Integrated Development Environment (IDE) is available here.


P1: Course Introduction (slides only)

Topics and Outline; Benefits of Automation; Key Questions

P2: SimAuto and Python Basics (slides only)

Features and Data Types in Python; the PowerWorld Automation Server (SimAuto); Connecting Python to SimAuto; SimAuto Functions and Sample Code

P3: Accessing Data (slides only)

The Model Explorer and Case Information Displays in Simulator; Filtering; Auxiliary Files, Objects, and Variables; Scripting

P4: Auxiliary Files and Scripting Tips (slides only)

Reference and Help Documents; Scripting and Python Examples; Custom Fields, Expressions, and Calculated Fields; Keywords; Auxiliary File Export Format Descriptions

P5: Data Structures and Auxiliary Files (slides only)

Auxiliary File Overview; Automation Example: Case Development and Sensitivity (TLR) Calculations; Auxiliary File Export Format Descriptions

P6: The Difference Case Tool (slides only)

Auxiliary File Export Format Descriptions; Difference Case and Change Case; Present Case Topological Difference from Base Case; Updates in Version 20; Change Mode Tolerance