WISPO-POP / PowerPlots.jl

Functions plot PowerModels networks
BSD 3-Clause "New" or "Revised" License
22 stars 2 forks source link

Arrows on powerflow plot #82

Open noahrhodes opened 2 years ago

noahrhodes commented 2 years ago

Should be able to support arrows on powerplot for line power flow based on this example:

https://www.queryverse.org/VegaLite.jl/v2.1/examples/examples_table_based_plots/#Wind-Vector-Map-1

bryanluu commented 2 years ago

Which direction is pf and pt with respect to xcoord_1 and xcoord_2?

bryanluu commented 2 years ago

Which direction is pf and pt with respect to xcoord_1 and xcoord_2?

Based on some quick experimentation, it looks like pf is the power going to the bus f_bus, and pt is the power going to the bus t_bus. Can you confirm @noahrhodes?

bryanluu commented 2 years ago

What type of properties of the arrows would you like to be customizable Noah? Right now I have the arrow sizes being dependent on the power, and the color matching the branch color. Screenshot from 2022-05-18 16-11-03 Is that alright, or would you like these properties to be plot_attributes?

bryanluu commented 2 years ago

I could also add a plot_attribute[:branch_arrows] which is a true by default and could be turned off (i.e. set to false or nothing). This would control whether to show the arrows. I could do something similar for the legend, which I turned off in the above example since it takes up a lot of space (see screenshot below for what it used to look like).

image

What do you think @noahrhodes?

noahrhodes commented 2 years ago

size based on power makes sense, but I think the arrows could be a different color (maybe black by default) because they are hard to see. I also think it makes sense to turn off the legend by default. All of these can be a part of plot attributes though, and let people change the values as they see fit.

Also, I'm not sure about the arrows being on by default. Often the entries for pf and pt are missing, unless someone has solved a power-flow on the network and updated the the entries. Does the plot crash if pt and pf are missing?

noahrhodes commented 2 years ago

Based on the PowerModels docs, pf is the power going out of the f_bus and into the line, while pt is the power going out of the t_bus and into the line. I think this is the opposite of what you stated.

bryanluu commented 2 years ago

Tasks to do to finish up

bryanluu commented 2 years ago

@noahrhodes I forget, did you want the flow arrows to be on or off by default?

noahrhodes commented 2 years ago

On by default

On Thu, Jun 9, 2022, 10:29 PM Bryan Luu @.***> wrote:

@noahrhodes https://github.com/noahrhodes I forget, did you want the flow arrows to be on or off by default?

— Reply to this email directly, view it on GitHub https://github.com/WISPO-POP/PowerPlots.jl/issues/82#issuecomment-1151891238, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU7P3ZNYWNATSLDKF2NFI3VOKZB5ANCNFSM5HTVCXMA . You are receiving this because you were mentioned.Message ID: @.***>

bryanluu commented 2 years ago

@noahrhodes how do I run the examples again?

noahrhodes commented 2 years ago

you can run the make.jl file in the docs folder