Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pandapower collections plotting update #8

Open
Tooblippe opened this issue May 23, 2017 · 16 comments
Open

pandapower collections plotting update #8

Tooblippe opened this issue May 23, 2017 · 16 comments

Comments

@Tooblippe
Copy link
Owner

@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
Copy link
Collaborator

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
Copy link
Owner Author

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
Copy link
Collaborator

lthurner commented Jun 2, 2017

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:

  • loading of .p networks
  • doublecklicking on transformer and load items (in pandapower repo) - doublecklick is detected but not yet connected to opening a window
  • standard line window correctly loads and saves all data on doubleclick

@Tooblippe
Copy link
Owner Author

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
Copy link
Collaborator

lthurner commented Jun 3, 2017

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:

  • initialize window which loads the ui file and fills the drop down boxes
  • get_parameters which reads the parameters from the widget and returns them as a dictionary
  • set_parameters which sets all parameters it gets in the widget

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
Copy link
Collaborator

lthurner commented Jun 3, 2017

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

@lthurner
Copy link
Collaborator

lthurner commented Jun 5, 2017

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:

  • we should clean up the code a little bit, maybe spread it to more files. there is also a lot of copy&paste, partial functions can help to avoid that (see the implementation of the show_table function and how buttons are connected to it)
  • maybe we can move some buttons to the top (like run power flow) and make a menu with File --> load/save and Info --> About/License/Documentation ?
  • Do we need the html section? I don't see an additional value here compared to the network model

@lthurner
Copy link
Collaborator

lthurner commented Jun 6, 2017

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
Copy link
Owner Author

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
Copy link
Owner Author

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

@lthurner
Copy link
Collaborator

lthurner commented Jul 3, 2017

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
Copy link
Owner Author

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
Copy link
Collaborator

lthurner commented Jul 4, 2017

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
Copy link
Collaborator

lthurner commented Jul 4, 2017

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
Copy link
Collaborator

lthurner commented Jul 4, 2017

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants