Ipsa and Python

Python is a high level, general-purpose programming language. It has a simple syntax and programmes written in Python can run on many different platforms. The main features of Python include:

  • Interpreted: Code is processed by the interpreter at runtime, saving you the task of compiling and linking it.

  • Dynamically typed: There is no need for variable or argument declarations.

  • Object Orientated: Supports for user-defined classes and inheritance.

  • Interactive: Python contains an interactive prompt which is useful for testing short pieces of code.

  • Automatic Memory Management: Python handles memory management automatically, freeing you from the need to think about allocating and freeing memory in your code.

  • Easy to use and quick to develop code: Because it is a high-level language with an elegant syntax Python is easy to learn and the built-in data types and features such as lists and dictionaries enable quick code development.

  • Mature: Python is a mature, stable and well-documented language.

  • Extendable: New modules can be added in a compiled language such as C++ or C. Python programming interfaces can be incorporated into applications (e.g. IPSA).

  • Interface and Existing Toolboxes: Many useful modules already exist that can be freely downloaded, for example, to enable interaction with Microsoft Office programmes like Excel. Toolboxes are available that allow the creation of graphical user interfaces. Libraries like SciPy, NumPy and Matplotlib allow python to be used effectively within the scientific community.

  • Free: Python is available under an open source license and is free to both download and include in an application.

Python is useful to us in the power industry because as the computers are advancing in power, the industry is demanding more complex, accurate and computationally intensive models. For example power systems based analysis and economic analysis based on power systems models. IPSA 2 contains application programming interfaces to Python making Python a good choice to automate analysis using power systems analysis software.

This guide provides a full reference to all the IPSA objects and their callable functions exposed through Python. This reference guide refers to IPSA version 2.10.0.

IPSA version 2.10.0 32-bit uses Python version 2.7, while the 64-bit one makes use of Python 3.8.