Overview of PhysioCanvasThe PhysioDesigner GUI provides the following components in the main window.
1. Nesting diagram
In this view, a hierarchical structure of modules is represented by nested boxes. Each box represents a module. If a module has child modules, double-clicking the module expands it and displays the list of submodules.
The nesting diagram is an editable interface showing the model’s hierarchical structure as nested blocks. In the diagram, the following symbols are used:
Only functional modules have physical quantities for defining states, variable/static parameters, etc. The others (capsule and container modules) are used to bundle modules for easy reuse. This concept is explained in more detail in other documents.
Double-clicking on a module expands or collapses the module.
To move a module, grab the frame of the module and drag it.
Or double-click the module and hold it.
If you grab inside the module (without double-clicking) or on the white background, and move it, the screen pans.
You can zoom in/out by rolling the mouse wheel.
If you select a functional module that has physical quantities in it, the list of physical quantities is shown in the Physical quantity table at the bottom of the window.
2. Component tree
In the component tree, the hierarchical structure of modules is shown in the form of an indented outline. Items can be expanded and collapsed by double-clicking. Since this type of display is simpler than the nesting diagram or tree diagram shown below, it is easier to reach the searched module. Right-clicking the context menu and then selecting "Open in Canvas" finds the module in a canvas.
3. Tree diagram
The tree diagram is an editable interface showing the model’s hierarchical structure as a tree. In the diagram, the following symbols are used:
Only functional modules have physical quantities for defining states, variable/static parameters, etc. The others (capsule and container modules) are used to bundle modules for easy reuse.
You can move a module by dragging it while pressing the left mouse button. Modules can be expanded or collapsed by double-clicking.
If a module has child modules, a gray circle appears at the bottom of the module.
You can zoom in/out by rolling the mouse wheel.
If you grab the white background and drag it, the screen pans.
The ports defined on a focused module are listed in the Port table at the bottom of the window.
4. Create a module
Clicking an icon on the toolbar,
or selecting “Item” > “Make a Module...”, “Make a Child Module...” or “Make a Sibling Module...”
opens the dialog to create a module.
The Type and Name fields must be completed. For example, selecting the name "module A" as shown below
and selecting "Make a Module..." , then
creates a new module at the root level.
If "Make a Child Module..." is selected, then a child module will be created in module A on the nesting diagram.
If "Make a Sibling Module..." is selected, then a sibling of module A is created.
Clicking the right mouse button on a module shows the context menu, from which you can view and edit all information defined in the module.
5. Create ports
To create ports on a module, select “Edit Ports...” in a context menu appearing by pressing right mouse button on the module.
The following dialog appears.
On this dialog, you can create or delete ports. “Name” and “Direction” must be provided here.
To build a computable model, ports must be assigned to the physical quantities. It is possible to make a new port without associating it with any physical quantity. The ports can be configured afterward. But if you already know which physical quantity should be associated with the port, then it can be selected in the “Physical quantity” column.
If the module does not have a physical quantity to assign to the port, it is possible to create it from this dialog. In the case of an in-port (direction is "IN"), pressing the "New Physical quantity" button opens a small dialog as shown below,
where it is possible to create a physical quantity with the given name and type, which is already assigned to this in-port. This is a quick way to create a physical quantity and its association with a port. If it is an out-port (direction is "OUT"), a physical quantity dialog opens for creating a physical quantity. Clicking the OK button in the physical quantity dialog automatically assigns the new physical quantity to the port.
There are shortcut keys for creating ports. Use “i” to create an in-port, and “o” to create an out-port. Select a module and press these keys to easily create the ports. To delete a port, select it at the module and press the delete key. Or right-click it and select “Delete”.
6. Using an edge to link ports
To link an edge between ports, simply drag a line from an out-port and release it at the in-port of the other module.
If there are no ports, instead of creating ones beforehand, it is possible to drag an edge from a tentative out-port (gray triangle at the bottom of the module) to the other module. Again, a tentative in-port appears at the bottom left of the other module. Simply release the mouse button at that point. The ports will be fixed ports.
You can also edit an edge. Select it and press the right mouse button.
It is possible to associate physical quantities with the head and tail of an edge from the Edit edge dialog. Clicking the "Edit Edge..." menu opens the dialog.
In the dialog, it is possible to write a description and set an operation type for the edge, as well as configure the physical quantities associated with the head and tail of the edge. For the in-port side, when the "New Physical quantity" button is pressed, a small dialog opens in which the name and type can be input for the physical quantity receiving the information carried by this edge. For the out-port side, the Physical quantity dialog opens so that a new physical quantity can be created and defined.
Click “Delete” to delete the edge. Click “Add anchor point” for an additional anchor point to re-route the edge as desired.
In the case of the tree diagram, pressing the right mouse button shows the following popup menu. “To orthogonal” toggles the edge display mode to polygonal-lines.
To return to the line style, select “To line” in the popup menu.
7. Shortcut to creating a moduleOnce a module is created with out-ports, another module can receive information output from an out-port of this module. In such a case, right-click on the out-port and select "Create Receiver Module" in the context menu.
A module with a variable-parameter type physical quantity and an in-port is created. Of course, the physical quantity is already assigned to the in-port. Also, the edge automatically spans between the out-port and the new in-port.