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

add UI return, then visualize() can return now #1466

Merged
merged 6 commits into from
Aug 28, 2024
7 changes: 4 additions & 3 deletions idaes/core/base/flowsheet_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def stream_table(self, true_state=False, time_point=0, orient="columns"):
dict_arcs, time_point=time_point, orient=orient, true_state=true_state
)

def visualize(self, model_name, **kwargs):
def visualize(self, model_name, **kwargs) -> "VisualizeResult":
"""
Starts up a flask server that serializes the model and pops up a
webpage with the visualization
Expand All @@ -275,9 +275,10 @@ def visualize(self, model_name, **kwargs):
**kwargs: Additional keywords for :func:`idaes.core.ui.fv.visualize()`

Returns:
None
visualize_result: The :class:`idaes_ui.fv.fsvis.VisualizeResult` instance returned by :meth:`UI.visualize`
CopyDemon marked this conversation as resolved.
Show resolved Hide resolved
"""
UI().visualize(self, model_name, **kwargs)
visualize_result = UI().visualize(self, model_name, **kwargs)
return visualize_result

def _get_stream_table_contents(self, time_point=0):
"""
Expand Down
Loading