Thanks for the pull request<https://github.com/MATPOWER/matpower/pull/95>. We can take the rest of the discussion related to this graphical representation there.
In the mean time, are you familiar with plot_mpc() in the extras directory? If not, please have a look at it, as it as this seems to be very similar in intention to what Paul Cuffe implemented there. Ray On Apr 7, 2020, at 3:33 AM, Antonio Pepiciello <antoniopepicie...@gmail.com<mailto:antoniopepicie...@gmail.com>> wrote: Dear Sergio, that sounds great. We can talk about it. ===================================== Dear Ray, the code, as I thought it for now, would be a function call that takes as input the results of a power flow. It is general and not case related, so it can be applied to every possible PF solution. It would have some options to highlight the information needed by the user (for example the congested lines or the lines "near to congestion", show double branches with both P and Q flows, weight the branches or generators depending on marginal prices etc...). For GitHub, I am new to that, so as soon as I get familiar with it, I will create a fork and put the code there. Thank you, Antonio Il giorno lun 6 apr 2020 alle ore 22:34 Ray Daniel Zimmerman <r...@cornell.edu<mailto:r...@cornell.edu>> ha scritto: Thanks Antonio. This does look like it could be quite useful. Could you give us a little idea of what the public interface is to your code? Is it a simple function call with a solved case and some options? And what about the structure of the code? Is it a single function or multiple functions? I think it’ll make sense for you to make your own fork of MATPOWER and add your code in a new branch there so we can have a look. Thanks again for offering to contribute, Ray On Apr 6, 2020, at 11:33 AM, Antonio Pepiciello <antoniopepicie...@gmail.com<mailto:antoniopepicie...@gmail.com>> wrote: Dear developers, sorry for the double post, but by graphical inspection (I have just understood how useful it can be :) ) I found out that there was an error in the code, leading to a wrong representation of the power flows, that were mixed up in the previously attached files. You can find the updated graphs with the right values attached to this email. Best regards, Antonio ---------- Forwarded message --------- Da: Antonio Pepiciello <antoniopepicie...@gmail.com<mailto:antoniopepicie...@gmail.com>> Date: lun 6 apr 2020 alle ore 19:08 Subject: Graphical representation of power flow solution To: <MATPOWER-DEV-L@cornell.edu<mailto:MATPOWER-DEV-L@cornell.edu>> Dear developers, I started developing a Matlab code for the graphical representation of power flow solutions in matlab. I think it could be a good functionality to have in Matpower, in order to get an immediate overview of the solution. The representation can be improved a lot to portrait more information and to be more organized. I attach some examples to this email. 9busPF.png This figure shows the power flows (only the real power) for the 9bus case study. The lines show the power flows. The arrow shows their direction. Their color and width is proportional to the power carried. The power flows are explicitly represented. The generation buses are red, the load ones are green, the interconnecting ones are blue and the ones with both load and generation are magenta. Their size is proportional to the power generated/absorbed. 24busPF.png In this case the graph is more minimalistic. DC_OPF.png In this case, the lines who reached their transmission capacity are shown in red. If you are interested, I can share the code and we could work on it together to improve it. Thanks and best regards, Antonio Pepiciello <9busPF.png><24busPF.png>