Main Content

Simplify Model for Targeted Analysis of Complex Models using Model Slicer Tool

You can simplify simulation, debugging, and formal analysis of large, complex models by focusing on areas of interest in your model. After highlighting a portion of your model using the Model Slicer, you can generate a simplified standalone model. The simplified model contains the blocks and dependency paths in the highlighted portion. Apply changes to the simplified standalone model based on simulation, debugging, and formal analysis, and then apply these changes back to the original model.

  1. The example model sldemo_mdlref_basic contains three instances of the model sldemo_mdlref_counter. To open the model, at the MATLAB command prompt, enter:


  2. To open the Model Slicer Manager, on the Model Verification, Validation, and Test section of the Apps tab, click Model Slicer.

  3. In the Model Slice Manager, click the arrow to expand the Slicer configuration list.

  4. Set the slice properties:

    • Name: Slice1

    • Color: (magenta)

    • 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 CounterC as a starting point. In the model, right-click CounterC and select Model Slicer > Add as Starting Point.

    The Model Slicer now highlights the upstream constructs that affect CounterC.

  6. In the Model Slice Manager, click Generate slice.

  7. In the Select File to Write dialog box, select the save location and enter a model name. The simplified standalone model contains the highlighted model items.

  8. To remove highlighting from the model, close the Model Slice Manager.

You can now analyze the simplified standalone model and apply any changes to the source model.

Related Topics