Working with the Variable Browser

You can perform a number of actions in the Variable Browser which is the main user interface to view the initial conditions and the results of a simulation.

The Variable Browser is displayed in the dock when you compute the initial conditions of a virtual execution or after a virtual execution has been launched. It displays details of the variables associated with the classes, components, and connectors in the system.

Tip: During a virtual execution, when the Experience Player toolbar is displayed, the values displayed in the Variable Browser are updated to match the current time of the Experience Player toolbar. This enables you to display values for a specific time.

For the possible number of Variable Browsers, the closing of Variable Browsers, and how to keep them from being closed, see Keep Simulation Results by Preventing the Automatic Closure of Corresponding Variable Browsers.

This task shows you how to:


Before you begin: A Variable Browser must be displayed. See Defining Execution Parameters Initial Conditions or Simulating a Behavior.

Display a Minimized Variable Browser

You can minimize each Variable Browser, if undocked. If minimized, it is represented by an icon on the right side of the screen.

Note: You have several identical icons, but the tooltip display the simulated item and the time.

To display the minimized Variable Browser, click the wanted Variable Browser icon to the right on your screen.
The selected Variable Browser appears.

Hide and Display Columns

You can hide and display columns in the Variable Browser.

  1. Right-click any of the column headers and select Open Column Manager .
    The Column Manager displays all available columns and what columns are currently displayed.
  2. To manage the display of columns, do any of the following:
    • To display a selection of columns, select the columns by pressing Ctrl and select the column names, and then click Show Selection.
    • To hide a selection of columns, select the columns like above, and then click Hide Selection.
    • To display all columns, click Show All.
    • To hide all columns, click Hide All.

    Tip: As an alternative, you can, in the Column Manager, show or hide columns by clicking the check box in front of the column names.

    It is also possible to select what columns to display without using the Column Manager. You can instead right-click any column header and select from the following:

    • Hide Column: Hides the column you selected.
    • Show All Columns: Displays all columns.
    • Show Column > Value: Select Value (or another item) to display the item column.

    Notes:
    • Show Column is only visible when a column is hidden.
    • In the execution results list, the Value column is hidden by default.

    The display of the columns is updated according to your selection.

View the Children of a Node

You can view or hide the children of a node in a list in the Variable Browser.

  1. Click + next to a name.
    The first level of children of the node is displayed.
    Tip: You can expand the whole variable tree by right-clicking the Variable Name column header and select Expand whole variable tree.
  2. Click - next to the name to collapse a node.
    The first level of children of the node is hidden.

Sort the Content of the Variable Browser

You can sort the content of the Variable Browser alphabetically for each column. The sorting can be ascending or descending.

  1. Click the column header.
    An arrow appears in the column header.

    The results are now sorted in ascending alphabetical order.

  2. Click the column header again.
    The direction of the arrow reverses.

    The results are now sorted in descending alphabetical order.

Filter the Content by Name

You can filter the content of a list in the Variable Browser by parameter or variable name.

Before you begin: This description assumes have you have not applied any name filtering already.
  1. To select what column you want the filter to work on, right-click the header and select Apply Filter on this Column.

    Important: If the command is not present for a column, that column is already selected for filtering.

    The default selection is the Variable Name column.

    The result is:
    • The column is selected for filtering.
    • The contextual command Apply Filter on this Column is not available for the column header of this column.
  2. In the Filter box, start typing.
    The following is the result:
    • The filtering is dynamically applied for the selected column, that is, the content of the Variable Browser is filtered after each character you type.
    • A filter icon appears in the header of the selected column.
    Tips:
    • You can use wildcards such as * to help define your search criteria
    • You can filter on the whole path of the node as well as the name of the node. This enables you to also filter on the names of intermediate nodes. The following rules apply:
      • If you type a dot "." or a bracket "[", the filtering is performed on the whole Modelica path of the node
      • Otherwise, the filtering is performed only on the node name
    • Some examples of filtering (compare with the rules above):
      • To show all the variables named phi, enter *.phi
      • To show all the variables named V, inside components named resistor 1, resistor 2, etc., enter *.resistor*.V
      • To show all the variables contained in a specific subcomponent C1, enter C1. or *.C1.*
      • To show any Modelica path that contains the character sequence abc (except if only in the variable name itself), enter that character sequence *abc*.*
  3. Optional: To use the typed text to filter another column instead, right-click the header of that column and select Apply Filter on this Column.
    • The filtering text is applied on that column instead.
    • The filter icon is moved to the header of that column.
  4. To clear the text filtering, click Clear the text filter after the Filter box.
    The following is the result:
    • The name filtering is removed. Any other filtering is still present.
    • The filter icon disappears from the column header.
      Important: The column is still selected for name filtering, if you again type in the Filter box, the filter is applied on this column.

Filter the Content by Type and Variable Selections

You can filter the content in the Variable Browser by type and variable selections.

Note: You can filter on both simultaneously.

  1. To display the filtering alternatives for types and variable selections, expand More Filters.
    The filtering alternatives appear, divided in two groups:
    • Show: Filtering of types. The group contains:
      • Constants
      • Time-varying
      • Parameters
      • Tunable values
    • Variable selection: Filtering of variable selections. The group contains:
      • In no predefined filter
        Note: This alternative is complementary to all the other alternatives, that is, if you clear all alternatives, the Variable Browser contains no variables.
      • A list of user-defined variable selections.
        Important: To be able to filter on user-defined variable selections, the model must contain user-defined variable selections. If the model contains no user-defined variable selections, only the alternative In no predefined filter is displayed.

        For more information about user-defined variable selections, see Managing Variable Selections

  2. To specify the filtering, apply your choice of selections.

Filter on Selected Component

You can filter the Variable Browser on a node corresponding to a selected component.

  1. To activate this filtering, click, in the Variable Browser header, Show Preferences , then activate Automatic Filter Tree.
    The Variable Browser is displaying only the node corresponding to the selected component.
    Notes:
    • This option and the option Automatic Center Tree are exclusive. You cannot activate both at the same time. However, you can clear both.
    • By default, the option Automatic Center Tree is activated, and the option Automatic Filter Tree is cleared.
    • The options can have different values in each Variable Browser.
  2. From the diagram, or from the Component Browser, select the component.

    Important: Multiselection of components does not work for this feature.
    Note: If you select a subcomponent, the whole component is displayed in the Variable Browser.

    The following is the result:
    • The Variable Browser is displaying only the node corresponding to the selected component.
    • The filtering field displays the filtering for the selected component or subcomponent.
    Note: This node is displayed until you select another component, that is, if you deselect the component by clicking outside it, the Variable Browser still displays the previously selected component.

Display Simulation Information

You can display information about the simulation by expanding Simulation Details.

The simulation information contains:

  • Full name of the simulated model
  • Status of the simulation (initialized, computing, success, or failed)
  • Stop time
  • Date and time of simulation
  • Solver settings: solver name, tolerance, and fixed step interval ("no" for step interval means variable steps)
Note: You can always see the status of the simulation from the icon in front of the Simulation Details header:
  • : Simulation success
  • : Simulation failed
  • : Unknown status.
    Note: This is the status when the simulation is still running, and also if a .mat file has been imported for the simulation.

Predefined Actions

You can perform a number of predefined actions from the Variable Browser.

You can perform the following predefined actions:

  • To run Modelica commands from the model, right-click any signal and select Predefined Actions > Commands from Model . For more information, see Run and Edit an Existing Modelica Command.
  • To plot Figure annotations from the model, right-click any signal and selectPredefined Actions > Plot Figure . For more information, see Plotting Figure Annotations.
  • To plot variable selections from the model, right-click any signal and selectPredefined Actions > Plot Variable Selection . For more information, see Plotting Variable Selections.

Replay Animation

From the Variable Browser, you can replay the animation.

For more information, see Replaying an Animation.

Display the Simulation Log

You can display the simulation log from the Variable Browser.

To display the simulation log, under the header of the Variable Browser, click Show Simulation Log .

The simulation log is a part of the messages reporting. For more information about messages reporting, see Messages Reporting Window.

Display a Class in an Immersive Dockable Panel

You can display a class in an immersive dockable panel.

Navigate to the node or signal you want to display in an immersive dockable panel, right-click it, and select Display Immersive Diagram.
An immersive dockable panel displaying the enclosing class appears. Some features of the panel:
  • If the class supports animation, the content of the 2D panel is also animated.
  • If the class contains objects that could be interacted with, you can interact with them when simulating. You can, for example, start a motor.
  • Several immersive dockable panels can be displayed at the same time, and are animated simultaneously.

Display Modelica Path of Node, and Copy It to Clipboard

You can display the full Modelica path of a node in the Variable Browser, and copy it to the clipboard.

  1. To display the full Modelica path for an item, pause over it.
    The path appears in the tooltip.
  2. To copy it, right-click it and select Copy Path To Clipboard.
    The path is copied to the clipboard. An example might be J1.w.
    Tip: This is useful when you, for example, want to use signal paths in scripting.
  3. To select the corresponding component in the diagram, select the item in the Variable Browser.
    The corresponding component is selected in the diagram.
    Note: Only the components displayed can be selected in the diagram.

Highlight and Reframe on Component Corresponding to Node

You can highlight a diagram component, corresponding to a node in the Variable Browser, and reframe on it.

  1. To highlight a component corresponding to a node in the Variable Browser, click the node in the Variable Browser.
    The corresponding component is highlighted in the diagram.
    Tip: If you animate Modelica 3D shapes, the corresponding shape is also highlighted.
  2. To reframe on a component in the diagram, corresponding to a node in the Variable Browser, right-click the node in the Variable Browser and select Reframe On.
    The diagram is reframed on the component corresponding to the node in the Variable Browser.

Center the Variable Browser on a Node Corresponding to a Selected Component or Connection

You can center the Variable Browser on a node corresponding to a selected component or connection. The first level of the node is also expanded.

This is useful when you want to plot variables for the selected component or connections, by right-clicking the variable in the Variable Browser and selecting Add to Plot

Do the following:
  • For a component, from the diagram, or from the Component Browser, right-click the component and select Center Tree on Preselected Objects.
    Note: For components, you can always have this option activated if you, from the Variable Browser header, the Show Preferences , activate Automatic Center Tree. For more about this option, see the notes in Step 1 in Filter on Selected Component.
  • For a connection, from the diagram, right-click the connection and select Center Tree on Preselected Objects.
The following is the result:
  • The Variable Browser is centered on the node corresponding to the selected component or connection.
    Note: For a connection, the Variable Browser is centered on one of the nodes corresponding to the connectors of the selected connection.
  • The first level of that node is opened, in some cases more levels.
If several variable browsers are displayed, they are all centered the same way.

Center the Variable Browser on a Node Corresponding to a Selected Animated 3D Shape

You can center the Variable Browser on a node corresponding to a selected animated 3D shape. The node is also expanded.

From an animation, select a 3D shape and then, from the context toolbar, click Show in Variable Browser .
The following is the result:
  • The Variable Browser is centered on the node corresponding to the selected animated shape.
  • The Variable Browser is expanded down to the relevant node, for example Shape of the component corresponding to the highlighted 3D shape
If several variable browsers are displayed, they are all centered and expanded the same way, but only the currently active Variable Browser has a highlighting.

Specifying the Default Variable Browser Panel Docking

You can specify the default Variable Browser panel docking.

To control the default Variable Browser panel docking, specify the option Default variable browser docking from Me > Preferences > Systems > Behavior Modeling, the Results tab, the Results Management Settings group.

The default is Stacked, that is, a new Variable Browser is stacked in the same panel as previous Variable Browsers, as a new tab.

For more information, see Native Apps Preferences Guide: Results.

Keep Simulation Results by Preventing the Automatic Closure of Corresponding Variable Browsers

You can keep a simulation result from being automatically closed when performing new simulations by preventing the closure of the corresponding Variable Browser. You do this by pinning the Variable Browser.

A pinned Variable Browser is never automatically closed. Define a number for the unpinned Variable Browsers that can be simultaneously displayed with the Maximum number of variable browsers option, from Me > Preferences > App Preferences > 3D Modeling > Systems Modeling and Execution > Dymola Behavior Modeling , the Results tab. For more information, see Native Apps Preferences Guide: Results. When this limit is reached, displaying a new Variable Browser automatically closes the oldest unpinned Variable Browser.

You can manually close any Variable Browser like closing any other window. To prevent closing a Variable Browser by mistake, you by default must acknowledge a warning before closing the browser. You can disable such warnings either in the warning dialog or by the preference Ask for confirmation before closing any variable browser. This preference is located in the same place as the previous preference.

  1. To pin a Variable Browser, click, in the Variable Browser header, Show Preferences , then activate Keep Variable Browser.
    The result is:
    • The Variable Browser is never automatically closed - you always have direct access to the corresponding simulation result.
    • The icon of the Variable Browser is changed to display that it is pinned. This icon is present both in the header of the Variable Browser and when it is minimized.
  2. To unpin the Variable Browser, repeat the previous step and clear Keep Variable Browser.
    The Variable Browser is unpinned. If the number of unpinned Variable Browsers now exceeds the limit above, the oldest unpinned Variable Browser is closed.