Code Monkey home page Code Monkey logo

pssetools's Introduction

High level tools to work with PSS®E

The PSS®E has a Python API to perform sample activities. This project provides the tools to automate the complex PSSE®E workflows. They include

  • wrappers for sample subsystems APIs
  • routines for analysis of:
    • violations
    • contingencies
    • headroom capacity
  • JSON writer for headroom and violations statistics

Running code

Requirements:

  • Python 3.9
  • pipenv ≥ 2018.11.15
# Install project dependencies
pipenv install --skip-lock
# Run the simulation
pipenv run python -m pssetools sample_config.json

The config file name, sample_config.json in this example, is the required argument. Its path should be an absolute path or a path relative to this repository root. The config file is described in the next section.

The headroom analysis is performed. The output files for headroom and violations statistics are written in JSON format. They are written to the same directory as a case file if the case file name is an absolute path or to the project root directory if the case file name is a relative path.

Configuration file

All the configuration options are described as a ConfigModel class found in the config.py file.

There are 3 required options:

{
    "case_name": "savnw.sav",
    "upper_load_limit_p_mw": 100.0,
    "upper_gen_limit_p_mw": 80.0
}

The case_name is a file name from the PSS®E EXAMPLE directory or an absolute file path.

Environment variables

There are debugging features that could be enabled using the environment variables.

ENV Description
PSSE_TOOLS_TREAT_VIOLATIONS_AS_WARNINGS Enable violations output
PSSE_TOOLS_VERBOSE Enable verbose output

To start the project with verbose output enabled, run:

$env:PSSE_TOOLS_VERBOSE = 1
pipenv run python -m pssetools sample_config.json

Running tests

pipenv run python -m unittest

Developer tools

To install developer tools, run:

pipenv install --skip-lock --dev

Format code and check typing errors with

pipenv run isort . ; black . ; mypy .

Check unused imports with

pipenv run autoflake --remove-all-unused-imports -r .

pssetools's People

Contributors

zagryzyn avatar dvlazariev avatar vincentgliniewicz avatar dmy3k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.