The Model Browser is an implimentation of the Prefuse Information Visualization Toolkit which reads GraphML data generated by the JSim compiler to graphically represent variables and their dependencies or other relationships between variables.
Contents:
- Using the Browser
- Interacting with the Browser
- Browser rendering rules
- GraphML
- Comments or Questions?
Using the Model Browser
There are currently two types of data relationships that can be graphed:
- Variables: Visualizes interdependencies between variables. Graph edges point (destination) to dependent variable.
- Sequence: Visualizes order of calculations for the variables within JSim at runtime. Graph edges point to variable that gets calculated after the 'source' node (variable).
To view a graph of the model data:
- Compile a model.
- Go to the 'Browser' tab. The Model Browser window will be empty.
- Select 'Render' -> 'Data select' -> type of data ('Variables', 'Sequence') from the drop-down menu.
- Hit the 'Refresh' button to display the rendering.
Depending on how powerful your computer is and how complicated a model you want graphed, you should see a node -> edge rendering of your data (It may take anywhere from 1 to 60 seconds to render the data).
Interacting with the Browser rendering
After you have rendered the data you can currently interact with it in the following ways:
- Zoom in and out: Hold the 'right' mouse button down and move the mouse down to zoom in, up to to zoom out while mouse pointer is over the Model Browser window.
- Move a node: Point mouse cursor on a node, then click and hold 'left' button while moving mouse.
- Move entire graph rendering: Point mouse cursor on area that is Not a node, then click and hold 'left' button while moving mouse.
- Node information: Point mouse cursor on a node (no clicks). A popup window should display additional information about the node. Note: this is a temporary popup and will disappear after a few seconds.
JSim version 2.08 and above:
- Hitting the 'Refresh' button will redraw the graph using updated rendering rules (see below).
- Graph layout and render rules are saved when project file is saved.
- To go back to default layout: Go to 'Render' drop down menu and pick Revert to default layout. Nodes will be aranged in default layout.
JSim version 2.07 and lower:
- Hitting the 'Refresh' button will redraw the graph using original viewing paramters (All user interactions will be lost)
- All user interactions with the browser are lost after closing project file.
Changing Browser data rendering rules
You can change the coloring and shape of the nodes based on data rendering rules which are specified in the 'Render' drop-down menu. Here are the options:
- Collapse variables: (Checked by default for 'variables' graph) This removes variable nodes that are directly related to each other, collapsing them down to just one node. Example: t, t.min, t.max, and t.ct get collapsed down to just node 't'. Used only with 'variables' data.
- Node fill color: Group nodes by fill color. Default for 'variable' graph is unit type (Ex: all variable nodes with units of sec are one color while other variables with units of mmol/(g*min) have another.
- Node border color: Group nodes by border color. Default for 'variable' graph is tooltype (Example: tool types are domain, expression, external)
- Node shape: Group nodes by shape. This is a boolean property (only two shapes currently supported). Default for 'variable' graph is 'isInput'. Example: if variable is an input then the node is circular, if it is an output then it is square.
GraphML Output
GraphML is a XML file format for graphs. The JSim compiler generates this file at compile time. To view and/or save the GraphML file for a compiled model, go to the 'Debug' tab from within the JSim UI. From there hit the 'View' drop-down menu and pick 'View GraphML'. The formated file should now be visable. To save, just hit 'File' -> 'Export text'.
The GraphML file generated by JSim may contain multiple graphs.The currently used graphs are the first one ('variables' graph) and the second one (the 'sequence' graph).
Comments or Questions?
Model development and archiving support at https://www.imagwiki.nibib.nih.gov/physiome provided by the following grants: NIH U01HL122199 Analyzing the Cardiac Power Grid, 09/15/2015 - 05/31/2020, NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.