Класс: Simulink .VariantManager
Пакет: Simulink
Сгенерируйте уменьшенную модель для заданных строений варианта
Simulink.VariantManager.reduceModel(Model)
Simulink.VariantManager.reduceModel(Model, Name, Value)
Simulink.VariantManager.reduceModel( создает уменьшенную модель для заданного строения. Указанные модели и библиотечные блоки также уменьшаются. По умолчанию имя уменьшенной модели и любое уменьшенное дочернее имя модели-ссылки является исходным именем модели, суффиксованным с Model)_r.
Simulink.VariantManager.reduceModel( задает параметры сокращения в форме Аргументы Имя и Значение.Model, Name, Value)
% Reduce model based on its variant control variable values in the base workspace.
Simulink.VariantManager.reduceModel('sldemo_variant_subsystems');
% Reduce the model associated with a variant configuration data object and configurations to be retained in the reduced model.
Simulink.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});