Класс: Simulink. VariantManager
Пакет: Simulink
Сгенерируйте упрощенную модель для заданных различных настроек
Simulink.VariantManager.reduceModel(Model)
Simulink.VariantManager.reduceModel(Model, Name, Value)
Simulink.VariantManager.reduceModel( создает упрощенную модель для заданной настройки. Модели, на которые ссылаются, и библиотечные блоки также уменьшаются. По умолчанию имя упрощенной модели и имени модели любого уменьшаемого дочернего элемента, на которое ссылаются, является исходным именем модели, снабженным суффиксом Model)_r.
Simulink.VariantManager.reduceModel( задает параметры сокращения в форме аргументов Name и Value.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('slexVariantManagementExample', ...
'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});