メインコンテンツ

プログラムによるモデルの解析とアップグレード

この例では、モデルを解析してアップグレードし、自動修正が利用可能な場合に適用する方法を示します。

1. モデルを読み込み、upgrader オブジェクトを作成します。この例では、モデル例を読み込んで開くために、モデルを含むプロジェクトを開きます。

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

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

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

2. ライブラリ リンクとモデル参照に従って、モデルに対して推奨されるアップグレードを解析します。

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
### Searching for referenced models in model 'sldemo_mdlref_outdoor_temp'.
### Unable to find Simulink cache file "sldemo_mdlref_outdoor_temp.slxc".
### Unable to find Simulink cache file "sldemo_mdlref_F2C.slxc".
### Total of 2 models to build.
### Starting serial code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_F2C'.
### Model reference code generation target (sldemo_mdlref_F2C.c) for model sldemo_mdlref_F2C was out of date. sldemo_mdlref_F2C.c did 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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_F2C
### Invoking Target Language Compiler on sldemo_mdlref_F2C.rtw
### Using System Target File: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/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 1.949s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_F2C/sldemo_mdlref_F2C.mk' ...
### Building 'sldemo_mdlref_F2C_rtwlib': "/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64/gmake"  -j 4 -l 4 -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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_F2C -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/extern/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/simulink/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/_sharedutils -o "sldemo_mdlref_F2C.o" "/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/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: `u' modifier ignored since `D' is the default (see `U')
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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/sldemo_mdlref_F2C.slxc'.

Build Summary

Model reference code generation targets:

Model              Build Reason                                 Status                        Build Duration
============================================================================================================
sldemo_mdlref_F2C  Target (sldemo_mdlref_F2C.c) did not exist.  Code generated and compiled.  0h 0m 10.802s 

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 11.65s
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable

### Searching for referenced models in model 'sldemo_mdlref_outdoor_temp'.
### Total of 1 models to build.
### Starting serial model build.
### Successfully updated the model reference simulation target for: sldemo_mdlref_F2C

Build Summary

Model reference simulation targets:

Model              Build Reason                                          Status                        Build Duration
=====================================================================================================================
sldemo_mdlref_F2C  Target (sldemo_mdlref_F2C_msf.mexa64) did not exist.  Code generated and compiled.  0h 0m 6.6466s 

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 7.0477s
### Searching for referenced models in model 'sldemo_mdlref_outdoor_temp'.
### Total of 1 models to build.
### Starting serial model 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 1.3508s
(12/14) Analyzing Model "sldemo_mdlref_thermostat" using compile time information
(13/14) Analyzing Model "sldemo_mdlref_heater" using compile time information
### Searching for referenced models in model 'sldemo_mdlref_heater'.
### Unable to find Simulink cache file "sldemo_mdlref_heater.slxc".
### Skipped unpacking from Simulink cache file "sldemo_mdlref_F2C.slxc" because the relevant build artifacts on disk are up to date.
### Unable to find Simulink cache file "sldemo_mdlref_thermostat.slxc".
### Total of 3 models to build.
### Starting serial code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_F2C'.
### Checking for structural changes in sldemo_mdlref_F2C because the model reference rebuild option is set to 'If 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'.
### Model reference code generation target (sldemo_mdlref_thermostat.c) for model sldemo_mdlref_thermostat was out of date. sldemo_mdlref_thermostat.c did 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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_thermostat
### Invoking Target Language Compiler on sldemo_mdlref_thermostat.rtw
### Using System Target File: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/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 1.315s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_thermostat/sldemo_mdlref_thermostat.mk' ...
### Building 'sldemo_mdlref_thermostat_rtwlib': "/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64/gmake"  -j 4 -l 4 -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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_thermostat -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/extern/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/simulink/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/_sharedutils -o "sldemo_mdlref_thermostat.o" "/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/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: `u' modifier ignored since `D' is the default (see `U')
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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/sldemo_mdlref_thermostat.slxc'.

Build Summary

Model reference code generation targets:

Model                     Build Reason                                        Status                        Build Duration
==========================================================================================================================
sldemo_mdlref_thermostat  Target (sldemo_mdlref_thermostat.c) did not exist.  Code generated and compiled.  0h 0m 4.1754s 

1 of 2 models built (1 models already up to date)
Build duration: 0h 0m 5.2765s
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable

### Searching for referenced models in model 'sldemo_mdlref_heater'.
### Total of 1 models to build.
### Starting serial model build.
### Successfully updated the model reference simulation target for: sldemo_mdlref_thermostat

Build Summary

Model reference simulation targets:

Model                     Build Reason                                                 Status                        Build Duration
===================================================================================================================================
sldemo_mdlref_thermostat  Target (sldemo_mdlref_thermostat_msf.mexa64) did not exist.  Code generated and compiled.  0h 0m 4.3637s 

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 4.7505s
### Searching for referenced models in model 'sldemo_mdlref_heater'.
### Total of 1 models to build.
### Starting serial model 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 0.95762s
(14/14) Analyzing Model "sldemo_mdlref_depgraph" using compile time information
### Searching for referenced models in model 'sldemo_mdlref_depgraph'.
### Unable to find Simulink cache file "sldemo_mdlref_depgraph.slxc".
### Skipped unpacking from Simulink cache file "sldemo_mdlref_heat2cost.slxc" because the file does not have the relevant build artifacts.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_heater.slxc" because the file does not have the relevant build artifacts.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_F2C.slxc" because the relevant build artifacts on disk are up to date.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_thermostat.slxc" because the relevant build artifacts on disk are up to date.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_house.slxc" because the file does not have the relevant build artifacts.
### Unable to find Simulink cache file "sldemo_mdlref_outdoor_temp.slxc".
### Total of 7 models to build.
### Starting serial code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_heat2cost'.
### Model reference code generation target (sldemo_mdlref_heat2cost.c) for model sldemo_mdlref_heat2cost was out of date. sldemo_mdlref_heat2cost.c did 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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_heat2cost
### Invoking Target Language Compiler on sldemo_mdlref_heat2cost.rtw
### Using System Target File: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/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 1.289s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_heat2cost/sldemo_mdlref_heat2cost.mk' ...
### Building 'sldemo_mdlref_heat2cost_rtwlib': "/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64/gmake"  -j 4 -l 4 -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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_heat2cost -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/extern/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/simulink/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/_sharedutils -o "sldemo_mdlref_heat2cost.o" "/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/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: `u' modifier ignored since `D' is the default (see `U')
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_F2C'.
### 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'.
### 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_house'.
### Model reference code generation target (sldemo_mdlref_house.c) for model sldemo_mdlref_house was out of date. sldemo_mdlref_house.c did 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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_house
### Invoking Target Language Compiler on sldemo_mdlref_house.rtw
### Using System Target File: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/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 1.192s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_house/sldemo_mdlref_house.mk' ...
### Building 'sldemo_mdlref_house_rtwlib': "/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64/gmake"  -j 4 -l 4 -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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_house -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/extern/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/simulink/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/_sharedutils -o "sldemo_mdlref_house.o" "/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/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: `u' modifier ignored since `D' is the default (see `U')
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'.
### Model reference code generation target (sldemo_mdlref_heater.c) for model sldemo_mdlref_heater was out of date. sldemo_mdlref_heater.c did 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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_heater
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
### Invoking Target Language Compiler on sldemo_mdlref_heater.rtw
### Using System Target File: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/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 1.22s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_heater/sldemo_mdlref_heater.mk' ...
### Building 'sldemo_mdlref_heater_rtwlib': "/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64/gmake"  -j 4 -l 4 -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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_thermostat -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_F2C -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_heater -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/extern/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/simulink/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/_sharedutils -o "sldemo_mdlref_heater.o" "/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/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: `u' modifier ignored since `D' is the default (see `U')
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'.
### Model reference code generation target (sldemo_mdlref_outdoor_temp.c) for model sldemo_mdlref_outdoor_temp was out of date. sldemo_mdlref_outdoor_temp.c did 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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_outdoor_temp
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
### Invoking Target Language Compiler on sldemo_mdlref_outdoor_temp.rtw
### Using System Target File: /mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/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 1.085s).
### Saving binary information cache.
### Using toolchain: GNU gcc/g++ | gmake (64-bit Linux)
### Creating '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_outdoor_temp/sldemo_mdlref_outdoor_temp.mk' ...
### Building 'sldemo_mdlref_outdoor_temp_rtwlib': "/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/bin/glnxa64/gmake"  -j 4 -l 4 -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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_F2C -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/sldemo_mdlref_outdoor_temp -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/extern/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/simulink/include -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src -I/mathworks/devel/bat/filer/batfs2566-0/Bdoc25a.2974004/build/runnable/matlab/rtw/c/src/ext_mode/common -I/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/slprj/grt/_sharedutils -o "sldemo_mdlref_outdoor_temp.o" "/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/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: `u' modifier ignored since `D' is the default (see `U')
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/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/sldemo_mdlref_heat2cost.slxc'.
### Simulink cache artifacts for 'sldemo_mdlref_house' were created in '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/sldemo_mdlref_house.slxc'.
### Simulink cache artifacts for 'sldemo_mdlref_heater' were created in '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/sldemo_mdlref_heater.slxc'.
### Simulink cache artifacts for 'sldemo_mdlref_outdoor_temp' were created in '/tmp/Bdoc25a_2974004_3515615/tp4356f472/simulink-ex10270988/ModelReferenceHierarchy/sldemo_mdlref_outdoor_temp.slxc'.

Build Summary

Model reference code generation targets:

Model                       Build Reason                                          Status                        Build Duration
==============================================================================================================================
sldemo_mdlref_heat2cost     Target (sldemo_mdlref_heat2cost.c) did not exist.     Code generated and compiled.  0h 0m 3.6634s 
sldemo_mdlref_house         Target (sldemo_mdlref_house.c) did not exist.         Code generated and compiled.  0h 0m 3.115s  
sldemo_mdlref_heater        Target (sldemo_mdlref_heater.c) did not exist.        Code generated and compiled.  0h 0m 4.4266s 
sldemo_mdlref_outdoor_temp  Target (sldemo_mdlref_outdoor_temp.c) did not exist.  Code generated and compiled.  0h 0m 3.1596s 

4 of 6 models built (2 models already up to date)
Build duration: 0h 0m 15.132s
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable

### Searching for referenced models in model 'sldemo_mdlref_depgraph'.
### Total of 5 models to build.
### Starting serial model build.
### Successfully updated the model reference simulation target for: sldemo_mdlref_heat2cost
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Successfully updated the model reference simulation target for: sldemo_mdlref_house
### Model reference simulation target for sldemo_mdlref_F2C is up to date.
### Successfully updated the model reference simulation target for: sldemo_mdlref_outdoor_temp

Build Summary

Model reference simulation targets:

Model                       Build Reason                                                   Status                        Build Duration
=======================================================================================================================================
sldemo_mdlref_heat2cost     Target (sldemo_mdlref_heat2cost_msf.mexa64) did not exist.     Code generated and compiled.  0h 0m 4.1147s 
sldemo_mdlref_house         Target (sldemo_mdlref_house_msf.mexa64) did not exist.         Code generated and compiled.  0h 0m 4.7473s 
sldemo_mdlref_outdoor_temp  Target (sldemo_mdlref_outdoor_temp_msf.mexa64) did not exist.  Code generated and compiled.  0h 0m 5.8828s 

3 of 5 models built (2 models already up to date)
Build duration: 0h 0m 15.977s
### Searching for referenced models in model 'sldemo_mdlref_depgraph'.
### Total of 5 models to build.
### Starting serial model build.
### Model reference simulation target for sldemo_mdlref_heat2cost is up to date.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Model reference simulation target for sldemo_mdlref_house is up to date.
### Model reference simulation target for sldemo_mdlref_F2C 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.17257s

3. 出力を指定してレポートの場所を検索します。

reportLocation = upgrader.ReportFile;

4. モデルを解析またはアップグレードする前にオプションを構成します。

  • 既定では、upgradeadvisor はアップグレード プロセス時にモデルのバックアップ コピーを生成します。バクアップ ファイルの生成をオフにするには、EnableBackups プロパティを設定します。

upgrader.EnableBackups = false;
  • チェックをスキップするには、アップグレード アドバイザーでチェックを右クリックして [ワークスペースにチェック ID を送信] を選択し、ChecksToSkip プロパティを設定します。

upgrader.ChecksToSkip = {"mathworks.design.CSStoVSSConvert"};
  • ライブラリ リンク、モデル参照、または外部モデルとして保存されたテスト ハーネスを解析せずに現在のモデルを解析またはアップグレードするには、OneLevelOnly プロパティを有効にします。

upgrader.OneLevelOnly = true;
  • 現在のモデルとモデル参照をライブラリ リンクなしで解析またはアップグレードするには、SkipLibraries プロパティを有効にします。

upgrader.SkipLibraries = true;
  • 現在のモデルとブロックセットまたはツールボックスのファイルを解析またはアップグレードするには、SkipBlocksets プロパティを無効にします。既定では、アップグレード アドバイザーはブロックセットまたはツールボックスのファイルをアップグレードしません。アップグレード アドバイザーは、関数 ver の出力と Contents ファイルの存在から、ブロックセットを検出します。

upgrader.SkipBlocksets = false;
  • モデルの解析またはアップグレードの後のレポートの表示をオフにするには、ShowReport プロパティを無効にします。

upgrader.ShowReport = false;

5. モデルをアップグレードし、自動修正が利用可能な場合は適用します。

upgrade(upgrader);
(1/2) Upgrading Model "sldemo_mdlref_depgraph"
(2/2) Upgrading Model "sldemo_mdlref_depgraph" using compile time information
### Searching for referenced models in model 'sldemo_mdlref_depgraph'.
### Unable to find Simulink cache file "sldemo_mdlref_depgraph.slxc".
### Skipped unpacking from Simulink cache file "sldemo_mdlref_heat2cost.slxc" because the relevant build artifacts on disk are up to date.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_heater.slxc" because the relevant build artifacts on disk are up to date.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_F2C.slxc" because the relevant build artifacts on disk are up to date.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_thermostat.slxc" because the relevant build artifacts on disk are up to date.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_house.slxc" because the relevant build artifacts on disk are up to date.
### Skipped unpacking from Simulink cache file "sldemo_mdlref_outdoor_temp.slxc" because the relevant build artifacts on disk are up to date.
### Total of 7 models to build.
### Starting serial code generation build.
### Checking status of model reference code generation target for model 'sldemo_mdlref_heat2cost'.
### 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_F2C'.
### 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'.
### 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_house'.
### 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'.
### 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'.
### 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 0.24639s
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable
codeInterfacePackaging: Nonreusable function
codeInterfacePackaging: NonReusable

### Searching for referenced models in model 'sldemo_mdlref_depgraph'.
### Total of 5 models to build.
### Starting serial model build.
### Model reference simulation target for sldemo_mdlref_heat2cost is up to date.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Model reference simulation target for sldemo_mdlref_house is up to date.### Searching for referenced models in model 'sldemo_mdlref_depgraph'.
### Total of 5 models to build.
### Starting serial model build.
### Model reference simulation target for sldemo_mdlref_heat2cost is up to date.
### Model reference simulation target for sldemo_mdlref_thermostat is up to date.
### Model reference simulation target for sldemo_mdlref_house is up to date.
### Model reference simulation target for sldemo_mdlref_F2C 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.11109s

アップグレード アドバイザーで見つかった問題と自動修正のリストが表示されます。

アップグレード アドバイザーでモデル ファイルに対する修正が保存されます。

参考

トピック