WOLFRAM

Simulation Center ToolsEquation Browser

Equation BrowserBlock Browser
OverviewBlock View
Classification

Simulation Center provides a number of tools for working with experiments and simulation results.
For a complete list, see the Tools guide.

Equation Browser

There are several ways to get to the Equation Browser in Simulation Center:

Overview

The Equation Browser consists of at least three tabs, each corresponding to its part of the simulation problem:

Equation Blocks and Equation Systems

An appearance of a variable in an equation is called an incidence. In order to identify the block structure shown at the bottom part of the block browser, only basic incidence information is needed (see Incidence Information). This information is collected for all equations and variables, resulting in the bipartite global incidence graph. Then, a (variable-equation) matching is used to turn the bipartite graph into an equation dependency graph, whose strong components are what is called the equation blocks. Sorting the strong components topologically reveals the lower triangular structure seen in the block browser.

Each equation block is associated with the variables matched to the equations in the block.

To solve the equations of a block, the equations and variables are organized into one or more equation systems. Here, varying structure of the equations can be handled, allowing equations to be simplified under various assumptions. This leads to a tree structure with simplifying assumptions in the tree nodes and equation systems in the leaves, and each equation or variable may be part of one or more equation systems.

Classification

Classification in the Equation Browser is found at several levels, and each level is considered in turn in this section, starting with variables and ending at the block level.

Variable Classification

In the Equation Browser, one is only concerned with variables that have values, meaning that external object variables will not be considered. Each remaining scalar variable then belongs to one of three categories, according to its value domain and time variability, with each category having its own symbol:

4.gif

A discrete-time variable can only change value at events, and a discrete-valued variable can only take on values from a discrete set. A continuous-time variable can change value continuously between events (which is why it cannot be discrete valued) and is allowed to have discontinuous changes. A clocked variable can only change value at clock ticks of its associated clock. The possible combinations correspond directly to Modelica scalar types and variability restrictions:

Real variable that is neither explicitly or implicitly discrete time.
discrete Real or Real variable that is implicitly discrete time.
Boolean,Integer or enumeration type and String.
clocked Real variable.
clocked Boolean,Integer or enumeration type and String.

Incidence Information

Depending on the application, information of different levels of detail may be associated with an incidence.

Basic Incidence Information

The basic incidence information used to identify the block structure consists of a classification as either:

Enriched Incidence Information

When more detailed incidence classification is needed for a continuous-valued variable, this happens in the context of a system of equations. The partial derivative of the equation's residual with respect to the variable is classified as one of the following, in increasing order of dominance:

Equation System Classification

An equation system is classified according to the value domain of the variables it solves for:

Block Classification and Homotopy Structure

Finally, the value domain, time variability and equation system class are propagated from the equation systems of a block to the block as a whole.

For characterization of block size, the size of the biggest equation system is used rather than the total rank of equations in the block.

Above the block structure shown in the block browser, blocks in the initialization problem may also be linked by homotopy initialization. This structure is currently not visible in the Equation Browser.

Block Browser

The block browser shows the equation blocks that belong to the selected part of the simulation problem (Initialization/Integration/Output/Clocked Partition N), sorted in the order that they will be solved. The blocks are laid out on the diagonal, and the dependency links between blocks are illustrated with a dot on the left side of the diagonal. If the block at position (i,i) depends on the block at (j,j), there will be a dependency link dot at (i,j). Click the dependency link dot to jump between the dependent block and dependee block. The tooltip for the dependency link will show the variables that are solved by the dependee block and used in the dependent block.

To get more information on a block, select the block by clicking it, and information about that block will be presented in the block view to the right. When a block is selected, all its incoming and outgoing dependency links are highlighted.

12.gif

The Equation Blocks view with the blocks laid out diagonally and dependency links shown on the left side of the diagonal.

Color Scheme

There is a user-selectable color scheme for each classification axis that can be used to quickly identify objects of a specific class. The selected color scheme is applied throughout the Equation Browser on blocks in the block browser, on systems in Block Summary and on incidences in the Incidence Graph.

Filtering

It is possible to filter blocks by the three classification axes: system class, value domain and time variability. When a filter item is unselected, it shows in parentheses how many blocks there are of that class within the subset selected by the other filter axes. This means that in addition to finding specific blocks, the Block Filter alone can also be used to get global model statistics like:

Block View

When a block is selected in the block browser, it is presented in more detail in the block view on the right side of the Equation Browser.

14.gif

The block view, with a highlighted equation system and an active selection of an incidence and its corresponding equation and variable.

Block Summary

The Block Summary shows the classification of the selected block along the three different classification axes, as well as the biggest equation system size before and after tearing. At the bottom, there is a tree structure with equation systems at the leaves. Checkboxes at the branches of the tree indicate active selections of simplifying assumptions, such as conditions of when-clauses, if-expressions or if-equations. At any time, there is a complete selection of simplifying assumptions, meaning that every selected branching node in the tree has an active selection beneath it. This means that there is always an active set of non-overlapping equation systems. In the active set, one equation system may be highlighted for increased focus on the equations, variables and incidences belonging to the system. Click the action button for system-specific actions like going to the generated code for the system. If Calculate Condition Estimates is enabled, it is also possible to plot the condition estimate for the system if the current block is in the Integration or Output tab. If it is in the Initialization tab, the condition estimate before and after initialization is available as a tooltip on the respective system.

15.gif

Click the systems action button in the Block Summary for system-specific actions like plotting the condition estimate for the system, or go to the generated code for the system.

Incidence Graph

The Incidence Graph shows the incidence graph for the active selection of equation systems (in the currently selected block), with rows corresponding to the equations listed in Equations in Block, and columns corresponding to variables listed in Variables Solved in Block. When an equation is selected in Equations in Block, the corresponding row is also selected in the Incidence Graph, and when a variable is selected in Variables Solved in Block, the corresponding column is also selected.

The Incidence Graph shows enriched incidence information, as well as a possible partitioning into sub-blocks. Partitioning indicated by gray lines corresponds to equation system tearing. Partitioning indicated by a yellow background corresponds to mixed equation grouping.

Equations in Block

The equations of the currently selected block are listed in Equations in Block. Variables belonging to the selected block are marked in bold. Clicking a variable shown in blue gives a menu with links to related places in the Equation Browser. There is also a contextual menu for the equation, containing links for all variables in the equation.

Variables Solved in Block

The variables solved in the selected block are listed in Variables Solved in Block. A variable that is not available in the simulation result is shown with a disabled look. A variable can be missing due to the current output settings, or because it is an internal help variable that is not stored, or because the model has not been simulated yet.

The Start Value column shows how a variable's start value is used and the actual start value; it's also possible to edit the start value directly here. The start value can be used in three possible ways:

initialized exactly from start value.

solved using iterative methods;start value is used as initial guess.

calculated directly from other variables; start value does not have any impact on initialization.

The Initialized To column shows the actual value after initialization (if simulation result is available for the variable).

Plotting

When the model has been simulated, all variables that are available in the simulation result will have a checkbox next to them. Click the checkbox to plot the variable in the currently active plot. For information on how to create new plot windows or subplots, see Plot Windows.

If there is more than one experiment with a similar variable structure, it is possible to enable automatic plotting from other selected experiments where the variable exists. To set up plotting from other experiments, click the experiment name in the Plot from label and select the experiments to plot from.