padv.builtin.task.GenerateModelComparison Class
Namespace: padv.builtin.task
Superclasses: padv.Task
Task for generating model comparison report
Description
This class requires CI/CD Automation for Simulink Check.
The padv.builtin.task.GenerateModelComparison
class provides a task that
can compare models in the project to their ancestors in Git™ and publish a comparison report using the Comparison Tool.
The task compares your version of the model to either the latest or previous
version on the main branch in Git:
If you make a change to a model and run the task, the task compares your version of the model to either the head of the current branch or latest version on the main branch in Git.
If you do not make changes to a model and then run the task, the task compares the model to the previous version available on the main branch in Git.
You can use the task properties to specify different report options, filtering options, and the name of the Git branch used for the comparison.
You can add the task to your process model by using the
method addTask
. After you add the task to your process model, you can run the
task from the Process Advisor app or
by using the function runprocess
.
To view the source code for this built-in task, in the MATLAB® Command Window, enter:
open padv.builtin.task.GenerateModelComparison
The padv.builtin.task.GenerateModelComparison
class is a handle
class.
Creation
Description
creates a task for comparing models using the Comparison Tool.task
= padv.builtin.task.GenerateModelComparison()
sets certain properties using one or more name-value arguments. For
example, task
= padv.builtin.task.GenerateModelComparison(Name=Value
)task = padv.builtin.task.GenerateModelComparison(Name =
"MyModelComparisonTask")
creates a task with the specified name.
You can use this syntax to set property values for InputQueries
,
Name
, IterationQuery
,
InputDependencyQuery
, Licenses
,
LaunchToolAction
, and LaunchToolText
.
The padv.builtin.task.GenerateModelComparison
class also has other properties, but you cannot set
those properties during task creation.
Properties
Methods
Examples
Tips
To find and compare model ancestors, this task requires that you use Git source control for your project. For information on how to add a project to Git source control, see Use Source Control with Projects.
If you run MATLAB using the
-nodisplay
option or you use a machine that does not have a display (like many CI runners and Docker® containers), you should set up a virtual display server before you include this task in your process model. For information, see Set Up Virtual Display Machines Without Displays.