Package: electricalsim
Electrical Grid Simulator (EGS)TheElectrical Grid Simulator(abbreviated asEGS) is a graphical user interface application for simulating electrical networks based on thepandapowerlibrary. The main objective is to allow the creation of mathematical models for steady-state electrical grids from a user-friendly interface. It adds an extensions system for including new calculation or simulation algorithms. Extensions are implemented as standard Python packages, so they can be distributed through thePyPI repository.EGS is developed at theNational Technological University, Santa Fe Regional Faculty(UTN-FRSF), at theCenter for Research and Development in Electrical Engineering and Energy Systems(CIESE), Argentina.WarningThis application is in an early stage of development. So you can expect incomplete sections and some (or many) bugs. New changes may cause incompatibilities with older versions (old files that no longer work with newer versions of the program).GoalsProviding a minimalistic, modern and good-looking interface.Multiplatform: GNU/Linux, MS Windows and Apple MacOS (not tested on MacOS).Providing an extensions system to expand its capabilities.How it is builtEGS is built in Python and entirely from open source and free software. The main core components are:Thepandapowermodeling and calculation library for electrical power systems.TheQttoolkit withPySide6bindings for the UI.AQt6port (fork) of theNodeGraphQtlibrary for building the graph (schematic network graphic).ThePyQtDarkThemepackage for applying modern themes (light and dark themes).TheQtAwesomepackage for modern flat monochromatic icons.Thematplotlibpackage for plotting calculation results.Other scientific Python packages, mainlyNumPyandpandas.EGS is implemented as a Python package uploaded to thePyPI repository.pandapowerand other packages listed above are set as dependencies.[!NOTE]Starting with version0.0.8.0, the EGS package includes a fork ofNodeGraphQtported toQt6(using thePySide6library). This implementation is renamed toNodeGraphQt6in order to avoid conflicts. These changes allow the application to run on recent versions of Python.Simulations and calculationsWith EGS you can build and set up the model of an electrical grid in a graphical way. The application also allows you to performAC balanced power flowcalculations (other calculations supported bypandapowermay be added in the future). For other types of simulations and calculations, you can proceed according to two alternatives:Export theData modeland the last power flow results to a JSON format file ready to be imported from a Python script throughpandapower. Then, any calculation or processing can be done from the script. The export is done from the graphical interface, while the subsequent import is done as indicatedin the pandapower documentation, using thepandapower.from_json()function.Incorporate the required calculation functionality from an extension developed in Python. This way, the calculation is executed from within EGS. Extensions are implemented as regular Python packages. An Optimal Power Flow (OPF) extension is available in the PyPI repository (package name:electricalsim-opf-quadratic).Models generated by EGS can be saved in a.egsfile. You can then reopen the file whenever you need it and retrieve even the results of the last power flow run.InstallationEGS is installed usingpip, the official Python package manager.On GNU/Linux and MacOS execute the following order in a terminal:pipinstallelectricalsimOn MS Windows you may prefer:python-mpipinstallelectricalsimUpgrading EGSIn order to upgrade EGS viapip, execute the following in a terminal:pipinstallelectricalsim-UOn MS Windows you may prefer:python-mpipinstallelectricalsim-URunning EGSOnce installed, you can run it with the command:egsIf you prefer to run the program in a more practical way, just execute this command only once:egs-create-shortcutThis will add a shortcut launcher to your desktop and to your application menu. Note that this launcher will not work if you are installing the application into a Python virtual environment.UninstallingIf you want to remove the application, execute:pipuninstallelectricalsimOn MS Windows:python-mpipuninstallelectricalsimNote that shortcuts added with theegs-create-shortcutcommand are not removed. So you must delete them manually.Installing extensionsExtensions available in the PyPI repository can be installed usingpip. For example, the Optimal Power Flow extension is installed with:pipinstallelectricalsim-opf-quadraticOn MS Windows:python-mpipinstallelectricalsim-opf-quadraticLicenseThis project uses theMIT license.