reduceModel
类:金宝appSimulink.VariantManager
包:金宝app
配置生成减少模型指定的变体
语法
金宝appSimulink.VariantManager.reduceModel(模型)
金宝appSimulink.VariantManager.reduceModel (模型,名称,值)
描述
金宝appSimulink.VariantManager.reduceModel (
创建一个减少模型为指定的配置。被引用的模型和库块也减少了。默认情况下,减少模型和任何减少孩子的名字引用模型的名字是原始模型名称后缀为模型
)_r
。
金宝appSimulink.VariantManager.reduceModel (
减少指定参数名称和值的参数形式。模型
,名称,值
)
输入参数
例子
%减少模型基于其变异控制变量值的基本工作空间。金宝appSimulink.VariantManager.reduceModel (“sldemo_variant_subsystems”);%减少模型与变体相关配置数据对象和配置减少模型中被保留。金宝appSimulink.VariantManager.reduceModel (”slexVariantManagement', ... 'NamedConfigurations', {'LinInterStd', 'NonLinExterHighFid'}) % Reduce the model by specifying variant control variable values. Here, two groups are specified corresponding to % {V==1, W==1}, and {V==2, W==2} respectively. Simulink.VariantManager.reduceModel('iv_model', ... 'VariableGroups',... {{'V',1,'W',1},{'V',2,'W',2}}); % Reduce the model by specifying variant control variable values where 'W' is a full-range variant control variable and 'V' is 1. Here, Variant Reducer % automatically maps the specification to correspond to the following four explicit groups: {V==1, W==1}, {V==1, W==2}, {V==1, W==3} and {V==1, W==0} respectively. Simulink.VariantManager.reduceModel('slexVariantReducer',... 'VariableGroups',... {'V',1},... 'FullRangeVariables',{'W',1}); % Reduce the model by specifying the compilation mode as code generation. Simulink.VariantManager.reduceModel... ('slexVariantReducer','NamedConfigurations', {'config1'},'CompileMode','codegen','OutputFolder','L:\Models');