Highlight Functional Dependencies
Large models often contain many levels of hierarchy, complicated signals, and complex mode logic. You can use Model Slicer to understand which parts of your model are significant for a particular behavior. This example shows how to use Model Slicer to explore the behavior of the sldvSliceClimateControlExample
model. You first select an area of interest, and then highlight the related blocks in the model. In this example, you trace the dependency paths upstream of Out1
to highlight which portions of the model affect.
Open the model
Open the model and highlight the functional dependencies of a signal in the system.
1. Open the sldvSliceClimateControlExample
model.
open_system("sldvSliceClimateControlExample");
2. To open the Model Slicer, on the Apps tab, under Model Verification, Validation, and Test gallery, click Model Slicer.
When you open the Model Slicer, Model Slicer compiles the model. You then configure the model slice properties.
3. In the Model Slicer, click the arrow to expand the Slice configuration list.
4. Set the slice properties:
(a) Name: Out1Slice
(b) Color: (magenta)
(c) Signal Propagation: upstream
Model Slicer can also highlight the constructs downstream of or bidirectionally from a block in your model, depending on which direction you want to trace the signal propagation.
5. Add Out1
as a starting point. In the model, right-click Out1
and select Model Slicer > Add as Starting Point.
The Model Slicer now highlights the upstream constructs that affect Out1.
If you create two slice configurations, you can highlight the intersecting portions of their highlights. Create a new slice configuration and view the intersecting portions of the slice configuration you created above and the new slice configuration:
1. Create a new slice configuration with the following properties
(a) Name: Out3Slice
(b) Color: (red)
(c) Signal Propagation: upstream
(d) Starting Point: Out3
2. In the Model Slicer, select both the Out1Slice
slice configuration and the Out3Slice
slice configuration.
Model Slicer highlights portions of the model as follows:
The portions of the model that are exclusively upstream of
Out1
are highlighted in magenta.The portions of the model that are exclusively upstream of
Out3
are highlighted in red.The portions of the model that are upstream of both
Out1
andOut3
are highlighted in black.
After you highlight a portion of your model, you can then refine the highlighted model to an area of interest. Or, you can create a simplified standalone model containing only the highlighted portion of your model.
To view the details of the highlighted model in web view, click Export to Web in the Model Slicer. The web view HTML file is stored in <current folder>\<model_name>\webview.html