Main Content

importModels

Class: mbcrunner

Import new models into CAGE project

Since R2024b

Description

[models,updatedItems,updatedTables,diagnosticsMessage] = importModels(obj,mdls) imports the models specified by mdls to the CAGE project specified by obj and reruns optimizations and feature filling.

example

[models,updatedItems,updatedTables,diagnosticsMessage] = importModels(obj,mdls,Name=Value) import models to a CAGE project using additional options specified by name-value arguments.

Input Arguments

expand all

Handle to the CAGE project, specified as an mbcrunner object.

Models to import, specified as an mbcmodel.project object, mbcmodel.testplan object, or a cell array of mbcmodel.model objects.

Name-Value Arguments

expand all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: models = importModels(mbcrunner,model,RunUpdates=true)

Option to import a composite model, specified as false or true.

Example: Composite=true

Data Types: logical

Option to rerun optimizations and feature filling, specified as true or false.

Example: RunUpdates=false

Data Types: logical

Output Arguments

expand all

Imported models, returned as a 1-by-n vector of strings.

Updated features and optimizations, returned as a 1-by-n vector of strings.

Updated lookup tables, returned as a 1-by-n vector of strings.

Diagnostic message from the import, returned as a character array.

Data Types: char

Examples

expand all

Import models from the GasolineOneStage model project to the GasolineOneStage CAGE model template.

proj = mbcmodel.LoadProject(fullfile(matlabroot,'toolbox', 'mbc', 'mbctraining', 'gasolineOneStage.mat'));
r = mbcrunner(fullfile(matlabroot, 'toolbox', 'mbc', 'mbctraining', 'gasolineOneStage.cag'));
[models, updatedItems, updatedTables] = importModels(r,proj);

Version History

Introduced in R2024b