Tooblippe / pandapower_gui

A Graphical User Interface for the open source pandapower load flow program. [ I was so inexperienced when I started this, but maybe we can try again]
BSD 3-Clause "New" or "Revised" License
38 stars 12 forks source link

pandapower collections plotting update #8

Open Tooblippe opened 7 years ago

Tooblippe commented 7 years ago

@lthurner HI, I have spent some time cleaning up the code, did some refactoring, and started playing with the collections. I have changed the dummy network to the tutorial network in the documentation and added some geodata.

I just couln't get pyside to import the ui file for now. Will keep this for later.

I have added the infofunc to the collections builder, but I think it's not implemented on the plotting.collections side on the pandapower project.(bus and lines are and respond to double clicks) I think you just wanted to get the examples out as quickly as possible. What is your proposal on updates here?

You can also now load and save excel case files.

image

lthurner commented 7 years ago

I am on holidays now so I can't check it out right now, all I can say from the screenshot it looks very well! I will get back to you as soon as I am back, end of next week probably

Tooblippe commented 7 years ago

enjoy, let me work on n local copy of collections and then you can pull whatever i get done later. i also need some time for real work.

lthurner commented 7 years ago

Hey, so I am back and I had a look at the GUI again. I don't have any general comments, everything looks like its going in the right direction, very nice!

I worked a little bit more on it and now implemented:

Tooblippe commented 7 years ago

HI, thank you. I have been travelling a bit as well and pretty busy at work. I have looked at the changes quickly now. Very cool. Let me connect the Transformer and load items to the input dialogue windows later.

what type of networks is .p? is that the network pickle?

lthurner commented 7 years ago

Yes .p is a network saved with pp.to_pickle

I refactored the element window to avoid copy&paste code. There is now a base class ElementWindow where most of the interaction is defined. The LineWindow class is a subclass of ElementWindow, where only three functions have to be defined:

For buses it is a bit more complicated because of the geodata, which is why more functions have to be defined. For all other elements it should however work as demonstrated with lines

lthurner commented 7 years ago

I have added a load window as well. Works pretty straightforward with the new ElementWindow class

lthurner commented 7 years ago

I have changed the display in the network model tab from html tbales to QtableWidgets. This has the advantage that you can now doublecklick on the table, and the same window from the collection pops up

I also added ext_grid collection, although the grid does not yet work properly (it gets smaller/larger when zooming, should be constant). But it works for now and doublecklicks on it are also detected.

Some general comments:

lthurner commented 7 years ago

I added the ui file main.ui as a suggestion for a new layout. I did not connect anything yet, it is just a layout suggestion. Please take a look at it and tell me what you think. We should also look into the GridCal layout which looks very professional in my opinion: https://github.com/SanPen/GridCal Maybe we can catch some ideas from there.

Tooblippe commented 7 years ago

sure ,traveling at the moment. but i am not stuck with anything in the layout. I new nothing about qt when strarting so cleaning up is cool!

Tooblippe commented 7 years ago

hi, i am busy having a look at this. it is looking good.

lthurner commented 7 years ago

I continued working on the GUI a little bit. I added PyQt4 compatibility and moved to the new layout, which looks like this: grafik

There is now a toolbar, from where networks can be loaded and saved. I added the possibility to load pandapower networks directly with one click: grafik

License and Documentation are availbe in the button of the toolbar.

The terminal is now always visible down below, as is the solve(runpp) button at the top.

Tooblippe commented 7 years ago

HI,

I am trying to get to run, just have some work to do. I do not think the imports between Qt4 and 5 is that simple. The two packages have the imports that is slightly different/ that is why i abondoned, but the picture looks good and I will see if i can get it to run

lthurner commented 7 years ago

I am currently working with PyQt4 on another project and I didn't want to skip between versions, so I started to make it work with PyQt4. But I didn't change anython about the PyQT5 imports (I think?), so why is it not working with PyQt5 now?

Are there some differences in the Widgets also?

lthurner commented 7 years ago

I just added a toolbar with icons to run a power flow:

grafik

The right icon is meant to change power flow parameters (doesn't do anything yet)

Let me know if you can get it to run

lthurner commented 7 years ago

There was some incompatibility with the webkit import, but now it should work with PyQt4 and 5.

I added a runpp options window:

grafik

lthurner commented 7 years ago

Hi Tobie, will you have time to continue working on this in the foreseeable future? I feel like the GUI is 80% ready to work with, so it would be a shame to not put in the time to get the last 20% to work. I will also try to invest some more time, I hope I can get around to it next week.