You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the export API to allow construction of user-specified graphs for display of results.
Motivation
The ability to draw arbitrary plots to accompany flowsheet solutions would be very useful and cover a wide range of use-cases for simple analysis.
Possible Implementation
Add a new callback to the export that populates a data structure for graphing (and probably laying out those graphs) in a new panel on the WaterTAP UI front end. The callback has access to the entire model and construct Plot.ly JavaScript data structures for a very flexible way to do bar, scatter, etc. charts.
We can also add a 2nd callback to use for parameter sweeps, which would be given the list of solved flowsheets. It would probably be nice to have some utility function to easily get the same variable from each flowsheet in the list and transform that into a vector, e.g. x_values = get_vector(flowsheets, "fs.output.name.of.the.var[0]").
There may even be some clever way to use the specification of the 1st callback to automatically generate some graphs for the 2nd one. ¯\_(ツ)_/¯
Additional Context
Thought of this while incorporating a PROMMIS flowsheet that had a whole bunch of chemical species concentrations and mass fractions (on the outlets) that would probably be best visualized with a bar chart (or similar)
The text was updated successfully, but these errors were encountered:
Description
Extend the export API to allow construction of user-specified graphs for display of results.
Motivation
The ability to draw arbitrary plots to accompany flowsheet solutions would be very useful and cover a wide range of use-cases for simple analysis.
Possible Implementation
Add a new callback to the export that populates a data structure for graphing (and probably laying out those graphs) in a new panel on the WaterTAP UI front end. The callback has access to the entire model and construct Plot.ly JavaScript data structures for a very flexible way to do bar, scatter, etc. charts.
We can also add a 2nd callback to use for parameter sweeps, which would be given the list of solved flowsheets. It would probably be nice to have some utility function to easily get the same variable from each flowsheet in the list and transform that into a vector, e.g.
x_values = get_vector(flowsheets, "fs.output.name.of.the.var[0]")
.There may even be some clever way to use the specification of the 1st callback to automatically generate some graphs for the 2nd one.
¯\_(ツ)_/¯
Additional Context
Thought of this while incorporating a PROMMIS flowsheet that had a whole bunch of chemical species concentrations and mass fractions (on the outlets) that would probably be best visualized with a bar chart (or similar)
The text was updated successfully, but these errors were encountered: