GithubHelp home page GithubHelp logo

nopywer's Introduction

intro

This code analyses power grid draw on QGIS to compute current flowing through cables, 3-phases balance, and a rough estimation of voltage drop.

This is not professional software, I am neither a professionnal electrician nor a python developer. This software does not comes with any waranties or whatsoever.

This project is under development. I am learning python along the way, the code is not very pythonic yet...

Contributions welcome !

setup

how to set up your QGIS project

This part of the documentation is incomplete. In a nutshell:

  • start by duplicating the nodes and cables layers of the example qgis project

(note: the example project as yet to created and shared, but if you are reading this we probably know each other and you got your hands on the qgis project ;))

  • create a spreadsheet containing power requirements for each load of the qgis' loads layer(s). The spreadsheet must comply with the following rules:
    • should be a .ods file
    • should contain the following columns:
      • Project: the name of the project should match the names on qgis nodes layer(s)
      • which phase(1, 2, 3, T, U or Y): split the load on selected phases.
        • T splits it on the 3 phases
        • Y and U assign them to the Y and U grids and does not compute power stuff for them.
      • worstcase power [W]: how many watts this loads needs
    • should NOT contains any notes or comments on the cells

how to setup nopywer parameters

To download the code, click on the green <> Code button on the top-right corner of this page, and then click on "Download ZIP". Note that if you are familiar with git, it would be best to clone the repository to get updates easily.

The file get_user_parameters.py contains some fields that can be edited:

  • project_file: this actually NOT used if you run nopywer from QGIS console directly, so you can ignore this
  • extra_cable_length: extra length to add to the "straight line length" measured on the map, to get the necessary length of the cable to have some slack. 10m should be the minimum.

The file get_constant_parameters.py also contains some informations you might want to look at.

usage

  • download the nopywer code on your computer

  • open your qgis project

  • open the python console by typing Ctrl+Alt+P (or clicking on Plugins -> Python Console)

  • if it's the first time you are running nopywer:

    • Click on 'Show Editor' icon
    • Click on 'Open Script...' icon
    • Navigate to the folder where you downloaded nopywer and select the file main.py
    • Click on 'Run Script' icon
  • if you have already ran nopywer before:

    • press the "arrow up" key on your keyboard, to retrieve previously executed python commands. You should see something like exec(Path('<some path>/nopywer/main.py').read_text()) (where <some path> shows where you downloaded nopywer on your computer)
    • press Enter
  • That's it ! The code should run, show lots of info, and conclude by "end of script for now :)"

troubleshooting

If you have errors, please reach out (please include of copy of complete message displayed in the console).

Here are some explanations on how to interpret nopywer's output:

  • loads not using power appear on the "on map but missing on spreadsheet" list: --> they should be added on the spreadsheet

  • loads not using power appear on the "on spreadsheet but missing on map" list: --> they should be removed from the spreadsheet

  • loads which have U or Y assigned appear on the 'loads not connected to a cable' list --> connect them to a cable layer that nopywer is actually checking

nopywer's People

Contributors

vfinel avatar

Stargazers

 avatar Charles Vanwynsberghe avatar

Watchers

 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.