Main Content

Upgrade Models Using Upgrade Advisor

This example shows you how to fix your Simulink® models and upgrade them to the current release using Upgrade Advisor. The Upgrade Advisor tool runs checks, fixes errors, and incorporates new Simulink functionality.

Open Upgrade Advisor

Open the model you want to upgrade.

openExample("sldemo_mdladv")
To open the Upgrade Advisor, on the Modeling tab, select Model Advisor > Upgrade Advisor.

Select and Run Upgrade Checks

Use the Upgrade Advisor to run all selected checks.

  1. Select the Upgrade Advisor node.

  2. In the toolstrip, click Run Checks.

The Upgrade Advisor tool shows the list of checks in the left pane with the Upgrade Advisor node selected and the Run Summary in the right pane.

Tip

For models with no hierarchy, by default, the Upgrade Advisor selects and runs all checks except the Analyze model hierarchy and continue upgrade sequence check.

For model hierarchies, use the Analyze model hierarchy and continue upgrade sequence check to guide you through upgrade checks. You must first run checks that do not require compile time information and do not trigger an Update Diagram. You then run the compile checks. For more information, see Analyze model hierarchy and continue upgrade sequence.

The Upgrade Advisor runs the selected checks and shows a summary in the Run Summary section on the right.

The Run Summary section in the Upgrade Advisor shows the date and time of the last run, the number of checks, and the number of checks with the status of Warning, Passed, and Not Run.

To run one individual check, right-click the check and select Run This Check. Alternatively, select the check and use the button in the right pane.

Upgrade Advisor with one check selected in the left pane and Run this check button in the right pane.

Save Upgrade Check Results in Report

To save the results of all checks you run in a report, follow these steps:

  1. Select the Upgrade Advisor node.

  2. In the Share section, click Report. Then, select from the available options.

  3. Specify the name and location of the report.

Tip

After you fix a check with warnings or failures, rerun the check before you create an Upgrade Advisor report.

Investigate and Fix Check Warnings and Failures

Inspect the summary of the checks you run by selecting the Upgrade Advisor node. In this example, one check shows a warning.

To view only the checks that show a warning, filter the checks in the Check Selector pane.

Pointer on the filter icon with the Warning check box selected

To investigate and fix a warning or a failure in a check, follow these steps:

  1. Select a check that did not pass.

  2. Inspect the details in the right pane to view the analysis and the recommended fixes.

  3. Fix the warning or failure manually by following the recommended steps. In some cases, you can fix issues automatically by clicking the Fix button in the toolstrip.

The Upgrade Advisor shows the list of checks with a warning status in the left pane, the warning details in the right pane, and the pointer on the Fix button in the toolstrip at the top.

If you do not want to fix a check, follow these steps to mark the violation as justified instead.

  1. Select the check. Then, click Justify.

  2. Enter the rationale for justification in the Justifications field in the Result Inspector.

  3. Click Add Justification.

Tip

For more information on individual upgrade advisor checks, see Model Upgrades.

See Also

Topics