Main Content

Upgrade Advisor

Improve and upgrade models to the current release

Description

Use the Upgrade Advisor to improve and upgrade your models to the current release.

The Upgrade Advisor helps you:

  • Identify models that no longer work because of behavior changes or improvements in Simulink®.

  • Identify models that you can enhance by using newly released features and settings in Simulink.

  • Transition to new technologies and upgrade a model hierarchy by performing automatic upgrades or providing instructions for manual fixes.

For more information about using Upgrade Advisor with your models, see Consult the Upgrade Advisor.

Upgrade Advisor tool

Open the Upgrade Advisor

  • Simulink Editor: On the Modeling tab, select Model Advisor > Upgrade Advisor.

  • MATLAB® Command Window:

    upgradeadvisor("modelname")

  • Model Advisor: In the Model Advisor, click Upgrade Advisor.

Examples

expand all

  1. Open the Upgrade Advisor for the vdp example model.

    openExample("vdp.slx");
    upgradeadvisor("vdp")
    

  2. Open the Upgrade Advisor for the currently selected model.

    upgradeadvisor(bdroot)
    

This example shows how to analyze and upgrade your model, and then apply automatic fixes when they are available.

1. Load your model and create an upgrader object.

load_system("sldemo_mdlref_depgraph.slx");
upgrader = upgradeadvisor("sldemo_mdlref_depgraph.slx")
upgrader = 
  Upgrader with properties:

      ChecksToSkip: {}
     SkipLibraries: 0
     SkipBlocksets: 1
      OneLevelOnly: 0
        ShowReport: 1
    VerboseLogging: 0
         RootModel: 'sldemo_mdlref_depgraph'
        ReportFile: ''

Run "upgrade" on this Upgrader object to analyze and automatically upgrade your models.

2. Analyze the model for recommended upgrades, following library links and model references.

analyze(upgrader);
(1/-) Analyzing Model "sldemo_mdlref_depgraph"
Updating Model Advisor cache...
Model Advisor cache updated. For new customizations, to update the cache, use the Advisor.Manager.refresh_customizations method.
(2/14) Analyzing Model "sldemo_mdlref_heat2cost"
(3/14) Analyzing Model "sldemo_mdlref_house"
(4/14) Analyzing Model "sldemo_mdlref_F2C"
(5/14) Analyzing Model "sldemo_mdlref_outdoor_temp"
(6/14) Analyzing Model "sldemo_mdlref_thermostat"
(7/14) Analyzing Model "sldemo_mdlref_heater"
(8/14) Analyzing Model "sldemo_mdlref_heat2cost" using compile time information
(9/14) Analyzing Model "sldemo_mdlref_house" using compile time information
(10/14) Analyzing Model "sldemo_mdlref_F2C" using compile time information
(11/14) Analyzing Model "sldemo_mdlref_outdoor_temp" using compile time information
### Starting serial model reference simulation build.
### Successfully updated the model reference simulation target for: sldemo_mdlref_F2C

Build Summary

Simulation targets built:

Model              Action                        Rebuild Reason                                
===============================================================================================
sldemo_mdlref_F2C  Code generated and compiled.  sldemo_mdlref_F2C_msf.mexa64 does not exist.  

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 22.743s
### Starting serial model reference code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_F2C' used in 'sldemo_mdlref_outdoor_temp'.
### Model reference code generation target (sldemo_mdlref_F2C.c) for model sldemo_mdlref_F2C is out of date because sldemo_mdlref_F2C.c does not exist.
### Updating model reference code generation target for: sldemo_mdlref_F2C
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_F2C
### Invoking Target Language Compiler on sldemo_mdlref_F2C.rtw
### Using System Target File: /mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/grt/grt.tlc
### Loading TLC function libraries
.......
### Initial pass through model to cache user defined code
.
### Caching model source code
......................................
### Writing header file sldemo_mdlref_F2C_types.h
### Writing header file sldemo_mdlref_F2C.h
.
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing source file sldemo_mdlref_F2C.c
### Writing header file sldemo_mdlref_F2C_private.h
### TLC code generation complete (took 4.481s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_F2C/sldemo_mdlref_F2C.mk' ...
### Building 'sldemo_mdlref_F2C_rtwlib': "/mathworks/devel/bat/Bdoc23a/build/matlab/bin/glnxa64/gmake"  -f sldemo_mdlref_F2C.mk all
gcc -c -fwrapv -fPIC -O0 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0  -DTID01EQ=1 -DMODEL=sldemo_mdlref_F2C -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988 -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_F2C -I/mathworks/devel/bat/Bdoc23a/build/matlab/extern/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/simulink/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/_sharedutils -o "sldemo_mdlref_F2C.o" "/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_F2C/sldemo_mdlref_F2C.c"
### Creating static library ./sldemo_mdlref_F2C_rtwlib.a ...
ar ruvs  ./sldemo_mdlref_F2C_rtwlib.a sldemo_mdlref_F2C.o
ar: creating ./sldemo_mdlref_F2C_rtwlib.a
a - sldemo_mdlref_F2C.o
### Created: ./sldemo_mdlref_F2C_rtwlib.a
### Successfully generated all binary outputs.
gmake: Nothing to be done for `all'.
### Successfully updated the model reference code generation target for: sldemo_mdlref_F2C
### Simulink cache artifacts for 'sldemo_mdlref_F2C' were created in '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/sldemo_mdlref_F2C.slxc'.

Build Summary

Code generation targets built:

Model              Action                        Rebuild Reason                       
======================================================================================
sldemo_mdlref_F2C  Code generated and compiled.  sldemo_mdlref_F2C.c does not exist.  

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 13.311s

### Starting serial model reference simulation build.
### Model reference simulation target for sldemo_mdlref_F2C is up to date.

Build Summary

0 of 1 models built (1 models already up to date)
Build duration: 0h 0m 2.631s
(12/14) Analyzing Model "sldemo_mdlref_thermostat" using compile time information
(13/14) Analyzing Model "sldemo_mdlref_heater" using compile time information
### Starting serial model reference simulation build.
### Successfully updated the model reference simulation target for: sldemo_mdlref_thermostat

Build Summary

Simulation targets built:

Model                     Action                        Rebuild Reason                                       
=============================================================================================================
sldemo_mdlref_thermostat  Code generated and compiled.  sldemo_mdlref_thermostat_msf.mexa64 does not exist.  

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 13.485s
### Starting serial model reference code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_F2C' used in 'sldemo_mdlref_heater'.
### Checking for structural changes in sldemo_mdlref_F2C because the model reference rebuild option is set to 'If any changes detected'. Structural changes cause the model reference code generation target to be rebuilt.
### Checking for structural changes in model reference code generation target for: sldemo_mdlref_F2C
### Generating code and artifacts to 'Model specific' folder structure
### Code for the model reference code generation target for model sldemo_mdlref_F2C is up to date because no functional changes were found in referenced model.
### Model reference code generation target for sldemo_mdlref_F2C is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_thermostat' used in 'sldemo_mdlref_heater'.
### Model reference code generation target (sldemo_mdlref_thermostat.c) for model sldemo_mdlref_thermostat is out of date because sldemo_mdlref_thermostat.c does not exist.
### Updating model reference code generation target for: sldemo_mdlref_thermostat
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_thermostat
### Invoking Target Language Compiler on sldemo_mdlref_thermostat.rtw
### Using System Target File: /mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/grt/grt.tlc
### Loading TLC function libraries
.......
### Initial pass through model to cache user defined code
.
### Caching model source code
.......................................
### Writing header file sldemo_mdlref_thermostat_types.h
### Writing header file sldemo_mdlref_thermostat.h
### Writing source file sldemo_mdlref_thermostat.c
### Writing header file sldemo_mdlref_thermostat_private.h
### TLC code generation complete (took 3.891s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_thermostat/sldemo_mdlref_thermostat.mk' ...
### Building 'sldemo_mdlref_thermostat_rtwlib': "/mathworks/devel/bat/Bdoc23a/build/matlab/bin/glnxa64/gmake"  -f sldemo_mdlref_thermostat.mk all
gcc -c -fwrapv -fPIC -O0 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0  -DTID01EQ=1 -DMODEL=sldemo_mdlref_thermostat -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988 -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_thermostat -I/mathworks/devel/bat/Bdoc23a/build/matlab/extern/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/simulink/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/_sharedutils -o "sldemo_mdlref_thermostat.o" "/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_thermostat/sldemo_mdlref_thermostat.c"
### Creating static library ./sldemo_mdlref_thermostat_rtwlib.a ...
ar ruvs  ./sldemo_mdlref_thermostat_rtwlib.a sldemo_mdlref_thermostat.o
ar: creating ./sldemo_mdlref_thermostat_rtwlib.a
a - sldemo_mdlref_thermostat.o
### Created: ./sldemo_mdlref_thermostat_rtwlib.a
### Successfully generated all binary outputs.
gmake: Nothing to be done for `all'.
### Successfully updated the model reference code generation target for: sldemo_mdlref_thermostat
### Simulink cache artifacts for 'sldemo_mdlref_thermostat' were created in '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/sldemo_mdlref_thermostat.slxc'.

Build Summary

Code generation targets built:

Model                     Action                        Rebuild Reason                              
====================================================================================================
sldemo_mdlref_thermostat  Code generated and compiled.  sldemo_mdlref_thermostat.c does not exist.  

1 of 2 models built (1 models already up to date)
Build duration: 0h 0m 12.004s

### Starting serial model reference simulation build.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.

Build Summary

0 of 1 models built (1 models already up to date)
Build duration: 0h 0m 1.9288s
(14/14) Analyzing Model "sldemo_mdlref_depgraph" using compile time information
### Starting serial model reference simulation build.
### Model reference simulation target for sldemo_mdlref_F2C is up to date.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Successfully updated the model reference simulation target for: sldemo_mdlref_heat2cost
### Successfully updated the model reference simulation target for: sldemo_mdlref_house
### Successfully updated the model reference simulation target for: sldemo_mdlref_outdoor_temp

Build Summary

Simulation targets built:

Model                       Action                        Rebuild Reason                                         
=================================================================================================================
sldemo_mdlref_heat2cost     Code generated and compiled.  sldemo_mdlref_heat2cost_msf.mexa64 does not exist.     
sldemo_mdlref_house         Code generated and compiled.  sldemo_mdlref_house_msf.mexa64 does not exist.         
sldemo_mdlref_outdoor_temp  Code generated and compiled.  sldemo_mdlref_outdoor_temp_msf.mexa64 does not exist.  

3 of 5 models built (2 models already up to date)
Build duration: 0h 0m 45.864s
### Starting serial model reference code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_F2C' used in 'sldemo_mdlref_depgraph:sldemo_mdlref_heater'.
### Model reference code generation target for sldemo_mdlref_F2C is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_thermostat' used in 'sldemo_mdlref_depgraph:sldemo_mdlref_heater'.
### Model reference code generation target for sldemo_mdlref_thermostat is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_heat2cost' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target (sldemo_mdlref_heat2cost.c) for model sldemo_mdlref_heat2cost is out of date because sldemo_mdlref_heat2cost.c does not exist.
### Updating model reference code generation target for: sldemo_mdlref_heat2cost
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heat2cost
### Invoking Target Language Compiler on sldemo_mdlref_heat2cost.rtw
### Using System Target File: /mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/grt/grt.tlc
### Loading TLC function libraries
.......
### Initial pass through model to cache user defined code
.
### Caching model source code
................................................
### Writing header file sldemo_mdlref_heat2cost_types.h
### Writing header file sldemo_mdlref_heat2cost.h
.
### Writing source file sldemo_mdlref_heat2cost.c
### Writing header file sldemo_mdlref_heat2cost_private.h
### TLC code generation complete (took 4.571s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heat2cost/sldemo_mdlref_heat2cost.mk' ...
### Building 'sldemo_mdlref_heat2cost_rtwlib': "/mathworks/devel/bat/Bdoc23a/build/matlab/bin/glnxa64/gmake"  -f sldemo_mdlref_heat2cost.mk all
gcc -c -fwrapv -fPIC -O0 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0  -DTID01EQ=0 -DMODEL=sldemo_mdlref_heat2cost -DNUMST=1 -DNCSTATES=1 -DHAVESTDIO -DRT -DUSE_RTMODEL -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988 -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heat2cost -I/mathworks/devel/bat/Bdoc23a/build/matlab/extern/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/simulink/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/_sharedutils -o "sldemo_mdlref_heat2cost.o" "/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heat2cost/sldemo_mdlref_heat2cost.c"
### Creating static library ./sldemo_mdlref_heat2cost_rtwlib.a ...
ar ruvs  ./sldemo_mdlref_heat2cost_rtwlib.a sldemo_mdlref_heat2cost.o
ar: creating ./sldemo_mdlref_heat2cost_rtwlib.a
a - sldemo_mdlref_heat2cost.o
### Created: ./sldemo_mdlref_heat2cost_rtwlib.a
### Successfully generated all binary outputs.
gmake: Nothing to be done for `all'.
### Successfully updated the model reference code generation target for: sldemo_mdlref_heat2cost
### Checking status of model reference code generation target for model 'sldemo_mdlref_house' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target (sldemo_mdlref_house.c) for model sldemo_mdlref_house is out of date because sldemo_mdlref_house.c does not exist.
### Updating model reference code generation target for: sldemo_mdlref_house
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_house
### Invoking Target Language Compiler on sldemo_mdlref_house.rtw
### Using System Target File: /mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/grt/grt.tlc
### Loading TLC function libraries
.......
### Initial pass through model to cache user defined code
.
### Caching model source code
.....................................................
### Writing header file sldemo_mdlref_house_types.h
### Writing header file sldemo_mdlref_house.h
.
### Writing source file sldemo_mdlref_house.c
### Writing header file sldemo_mdlref_house_private.h
### TLC code generation complete (took 4.431s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_house/sldemo_mdlref_house.mk' ...
### Building 'sldemo_mdlref_house_rtwlib': "/mathworks/devel/bat/Bdoc23a/build/matlab/bin/glnxa64/gmake"  -f sldemo_mdlref_house.mk all
gcc -c -fwrapv -fPIC -O0 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0  -DTID01EQ=0 -DMODEL=sldemo_mdlref_house -DNUMST=1 -DNCSTATES=1 -DHAVESTDIO -DRT -DUSE_RTMODEL -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988 -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_house -I/mathworks/devel/bat/Bdoc23a/build/matlab/extern/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/simulink/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/_sharedutils -o "sldemo_mdlref_house.o" "/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_house/sldemo_mdlref_house.c"
### Creating static library ./sldemo_mdlref_house_rtwlib.a ...
ar ruvs  ./sldemo_mdlref_house_rtwlib.a sldemo_mdlref_house.o
ar: creating ./sldemo_mdlref_house_rtwlib.a
a - sldemo_mdlref_house.o
### Created: ./sldemo_mdlref_house_rtwlib.a
### Successfully generated all binary outputs.
gmake: Nothing to be done for `all'.
### Successfully updated the model reference code generation target for: sldemo_mdlref_house
### Checking status of model reference code generation target for model 'sldemo_mdlref_heater' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target (sldemo_mdlref_heater.c) for model sldemo_mdlref_heater is out of date because sldemo_mdlref_heater.c does not exist.
### Updating model reference code generation target for: sldemo_mdlref_heater
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heater
### Invoking Target Language Compiler on sldemo_mdlref_heater.rtw
### Using System Target File: /mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/grt/grt.tlc
### Loading TLC function libraries
.......
### Initial pass through model to cache user defined code
.
### Caching model source code
...........................................
### Writing header file sldemo_mdlref_heater_types.h
### Writing header file sldemo_mdlref_heater.h
### Writing source file sldemo_mdlref_heater.c
### Writing header file sldemo_mdlref_heater_private.h
.
### TLC code generation complete (took 4.588s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heater/sldemo_mdlref_heater.mk' ...
### Building 'sldemo_mdlref_heater_rtwlib': "/mathworks/devel/bat/Bdoc23a/build/matlab/bin/glnxa64/gmake"  -f sldemo_mdlref_heater.mk all
gcc -c -fwrapv -fPIC -O0 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0  -DTID01EQ=1 -DMODEL=sldemo_mdlref_heater -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_thermostat -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_F2C -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988 -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heater -I/mathworks/devel/bat/Bdoc23a/build/matlab/extern/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/simulink/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/_sharedutils -o "sldemo_mdlref_heater.o" "/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_heater/sldemo_mdlref_heater.c"
### Creating static library ./sldemo_mdlref_heater_rtwlib.a ...
ar ruvs  ./sldemo_mdlref_heater_rtwlib.a sldemo_mdlref_heater.o
ar: creating ./sldemo_mdlref_heater_rtwlib.a
a - sldemo_mdlref_heater.o
### Created: ./sldemo_mdlref_heater_rtwlib.a
### Successfully generated all binary outputs.
gmake: Nothing to be done for `all'.
### Successfully updated the model reference code generation target for: sldemo_mdlref_heater
### Checking status of model reference code generation target for model 'sldemo_mdlref_outdoor_temp' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target (sldemo_mdlref_outdoor_temp.c) for model sldemo_mdlref_outdoor_temp is out of date because sldemo_mdlref_outdoor_temp.c does not exist.
### Updating model reference code generation target for: sldemo_mdlref_outdoor_temp
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: /tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_outdoor_temp
### Invoking Target Language Compiler on sldemo_mdlref_outdoor_temp.rtw
### Using System Target File: /mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/grt/grt.tlc
### Loading TLC function libraries
.......
### Initial pass through model to cache user defined code
.
### Caching model source code
..............................................
### Writing header file sldemo_mdlref_outdoor_temp_types.h
.
### Writing header file sldemo_mdlref_outdoor_temp.h
### Writing header file model_reference_types.h
### Writing source file sldemo_mdlref_outdoor_temp.c
### Writing header file sldemo_mdlref_outdoor_temp_private.h
### TLC code generation complete (took 4.305s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_outdoor_temp/sldemo_mdlref_outdoor_temp.mk' ...
### Building 'sldemo_mdlref_outdoor_temp_rtwlib': "/mathworks/devel/bat/Bdoc23a/build/matlab/bin/glnxa64/gmake"  -f sldemo_mdlref_outdoor_temp.mk all
gcc -c -fwrapv -fPIC -O0 -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=0 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0  -DTID01EQ=1 -DMODEL=sldemo_mdlref_outdoor_temp -DNUMST=2 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_F2C -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988 -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_outdoor_temp -I/mathworks/devel/bat/Bdoc23a/build/matlab/extern/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/simulink/include -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src -I/mathworks/devel/bat/Bdoc23a/build/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/_sharedutils -o "sldemo_mdlref_outdoor_temp.o" "/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/slprj/grt/sldemo_mdlref_outdoor_temp/sldemo_mdlref_outdoor_temp.c"
### Creating static library ./sldemo_mdlref_outdoor_temp_rtwlib.a ...
ar ruvs  ./sldemo_mdlref_outdoor_temp_rtwlib.a sldemo_mdlref_outdoor_temp.o
ar: creating ./sldemo_mdlref_outdoor_temp_rtwlib.a
a - sldemo_mdlref_outdoor_temp.o
### Created: ./sldemo_mdlref_outdoor_temp_rtwlib.a
### Successfully generated all binary outputs.
gmake: Nothing to be done for `all'.
### Successfully updated the model reference code generation target for: sldemo_mdlref_outdoor_temp
### Simulink cache artifacts for 'sldemo_mdlref_heat2cost' were created in '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/sldemo_mdlref_heat2cost.slxc'.
### Simulink cache artifacts for 'sldemo_mdlref_house' were created in '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/sldemo_mdlref_house.slxc'.
### Simulink cache artifacts for 'sldemo_mdlref_heater' were created in '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/sldemo_mdlref_heater.slxc'.
### Simulink cache artifacts for 'sldemo_mdlref_outdoor_temp' were created in '/tmp/Bdoc23a_2213998_2911895/tpdf4cdf2c/simulink-ex10270988/sldemo_mdlref_outdoor_temp.slxc'.

Build Summary

Code generation targets built:

Model                       Action                        Rebuild Reason                                
========================================================================================================
sldemo_mdlref_heat2cost     Code generated and compiled.  sldemo_mdlref_heat2cost.c does not exist.     
sldemo_mdlref_house         Code generated and compiled.  sldemo_mdlref_house.c does not exist.         
sldemo_mdlref_heater        Code generated and compiled.  sldemo_mdlref_heater.c does not exist.        
sldemo_mdlref_outdoor_temp  Code generated and compiled.  sldemo_mdlref_outdoor_temp.c does not exist.  

4 of 6 models built (2 models already up to date)
Build duration: 0h 0m 39.076s

### Starting serial model reference simulation build.
### Model reference simulation target for sldemo_mdlref_F2C is up to date.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Model reference simulation target for sldemo_mdlref_heat2cost is up to date.
### Model reference simulation target for sldemo_mdlref_house is up to date.
### Model reference simulation target for sldemo_mdlref_outdoor_temp is up to date.

Build Summary

0 of 5 models built (5 models already up to date)
Build duration: 0h 0m 0.81969s

3. Specify an output to find the location of the report.

reportLocation = upgrader.ReportFile;

4. Configure options before you analyze or upgrade your model.

  • To skip a check, in the Upgrade Advisor, right-click the check, select Send Check ID to Workspace, and set the ChecksToSkip property.

upgrader.ChecksToSkip = {"mathworks.design.CSStoVSSConvert"};
  • To analyze or upgrade the current model without analyzing library links, model references, or test harnesses that are saved as external models, enable the OneLevelOnly property.

upgrader.OneLevelOnly = true;
  • To analyze or upgrade the current model and model references but not library links, enable the SkipLibraries property.

upgrader.SkipLibraries = true;
  • To analyze and upgrade the current models and files in blocksets or toolboxes, set the disable the SkipBlocksets property. By default, the Upgrade Advisor does not upgrade files in blocksets or toolboxes. The Upgrade Advisor detects blocksets from the output of the ver function and the existence of the Contents file.

upgrader.SkipBlocksets = false;
  • To turn off showing the report after you analyze or upgrade your model, disable the ShowReport property.

upgrader.ShowReport = false;

5. Upgrade the model and apply automatic fixes when they are available.

upgrade(upgrader);
(1/2) Upgrading Model "sldemo_mdlref_depgraph"
(2/2) Upgrading Model "sldemo_mdlref_depgraph" using compile time information
### Starting serial model reference simulation build.
### Model reference simulation target for sldemo_mdlref_F2C is up to date.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Model reference simulation target for sldemo_mdlref_heat2cost is up to date.
### Model reference simulation target for sldemo_mdlref_house is up to date.
### Model reference simulation target for sldemo_mdlref_outdoor_temp is up to date.

Build Summary

0 of 5 models built (5 models already up to date)
Build duration: 0h 0m 0.61372s
### Starting serial model reference code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_F2C' used in 'sldemo_mdlref_depgraph:sldemo_mdlref_heater'.
### Model reference code generation target for sldemo_mdlref_F2C is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_thermostat' used in 'sldemo_mdlref_depgraph:sldemo_mdlref_heater'.
### Model reference code generation target for sldemo_mdlref_thermostat is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_heat2cost' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target for sldemo_mdlref_heat2cost is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_house' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target for sldemo_mdlref_house is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_heater' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target for sldemo_mdlref_heater is up to date.
### Checking status of model reference code generation target for model 'sldemo_mdlref_outdoor_temp' used in 'sldemo_mdlref_depgraph'.
### Model reference code generation target for sldemo_mdlref_outdoor_temp is up to date.

Build Summary

0 of 6 models built (6 models already up to date)
Build duration: 0h 0m 1.3787s

### Starting serial model reference simulation build.
### Model reference simulation target for sldemo_mdlref_F2C is up to date.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Model reference simulation target for sldemo_mdlref_heat2cost is up to date.
### Model reference simulation target for sldemo_mdlref_house is up to date.
### Model reference simulation target for sldemo_mdlref_outdoor_temp is up to date.

Build Summary

0 of 5 models built (5 models already up to date)
Build duration: 0h 0m 0.97764s

The Upgrade Advisor displays the list of found issues and automatic fixes.

The Upgrade Advisor saves fixes to the model files.

Related Examples

Programmatic Use

expand all

upgradeadvisor("modelname") opens the Upgrade Advisor for the model specified by modelname. This command loads the model if necessary, but does not open it in the Simulink Editor. Use the Upgrade Advisor to upgrade and improve models with features in the current release.

upgrader = upgradeadvisor("modelname") returns an object that you can use to analyze and upgrade a hierarchy of models programmatically. If you specify an output, then the Upgrade Advisor does not open. You can use the analyze and upgrade object functions with the upgrader object that the upgradeadvisor function returns.

  • To programmatically analyze a model for recommended upgrades, create an upgrader object and use the analyze object function.

  • To programmatically analyze and upgrade a model, create an upgrader object and use the upgrade object function.

  • For information about how to configure options before you analyze or upgrade your model, see Programmatically Analyze and Upgrade Model.

Tips

For an example that shows how to upgrade your entire project, see Upgrade Simulink Models Using a Project.

Version History

Introduced in R2012b

See Also