Coder Social home page Coder Social logo

jhw45birch / pypowerworld Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jessemarkboyd/pypowerworld

0.0 0.0 0.0 104 KB

Wrapper for the PowerWorld SimAuto API

Home Page: https://github.com/jessemarkboyd/pypowerworld

License: MIT License

Python 100.00%

pypowerworld's Introduction

pypowerworld

==== OVERVIEW ====

pypowerworld provides a class as a user-friendly wrapper for the PowerWorld COM object. It initializes a class object with a loadflow case. If the case fails to open, the program does not error out but prints an error and proceeds without a case. The ‘open_case’ method may be used to attempt to open the PowerWorld case again.

==== REQUIREMENTS ====

pypowerworld requires COM which means it must be run on a Windows operating system. It also requires the user to have PowerWorld and SimAuto licenses. Any PowerWorld tools which require additional license are also necessary.

==== INPUT ====

The inputs are labeled similarly to the PowerWorld Auxiliary File documentation. The inputs can either be method parameters or attributes used to set data or get data from the PowerWorld program.

==== OUPUT ====

Data output is sent in dataframe format and set to the ‘output’ attribute. This is true only when the get data method is run. For all other operations, this attribute will be set to None.

==== ERROR HANDLING ====

If an error occurs, the ‘error’ attribute is set to True and the ‘error_message’ attribute is set to an error string value explaining the error. If an error is not encountered, the ‘error’ attribute is set to False and the ‘error_message’ is set to an empty string.

==== TYPICAL IMPLEMENTATION ====

   from pypowerworld import PowerWorld
   case_path = r'somepathsomecase.pwb'
   pw = PowerWorld(case_path)
   print(pw.solve())
   if pw.error:
       print("Error encountered solving power flow: %s" % pw.error_message)
   else:
       print("The case was solved using the Newton-Raphson method.")
   script_cmd = 'SolvePowerFlow(RECTNEWT);'
   if pw.run_script(script_cmd):
       print("The case was solved using the Newton-Raphson method.")
   else:
       print("Error encountered solving power flow: %s" % pw.error_message)

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.