run
Execute CGV object
Syntax
result = cgvObj.run()
Description
executes
the model once for each input data that you added to the object. result = cgvObj.run() is
a boolean value that indicates whether the run completed without execution
error. result is a handle
to a cgvObjcgv.CGV object.
After each execution of the model, the object captures and writes the following metadata to a file in the output folder:
ErrorDetails — If errors occur,
the error information. |
status — The execution status. |
ver — Version information for MathWorks® products. |
hostname — Name of computer. |
dateTime — Date and time of execution. |
warnings — If warnings occur, the
warning messages. |
username — Name of user. |
runtime — The amount of time that
lapsed for the execution. |
Tips
Only call
runonce for eachcgv.CGVobject.The cgv.CGV methods that set up the object are ignored after a call to
run. See thecgv.CGVfor details.You can call
runonce without first callingaddInputData. However, it is recommended that you first save the required data for execution to a MAT-file, including the model inputs and parameters. Then useaddInputDatato pass the MAT-file to the CGV object before callingrun.The
cgv.CGVobject supports callback functions that you can define and add to thecgv.CGVobject. These callback functions are called duringcgv.CGV.run()in the following order:Callback function Add to object using... cgv.CGV.run()executes callback function...HeaderReportFcn addHeaderReportFcnBefore executing input data in cgv.CGVPreExecReportFcn addPreExecReportFcnBefore executing each input data file in cgv.CGVPreExecFcn addPreExecFcnBefore executing each input data file in cgv.CGVPostExecReportFcn addPostExecReportFcnAfter executing each input data file in cgv.CGVPostExecFcn addPostExecFcnAfter executing each input data file in cgv.CGVTrailerReportFcn addTrailerReportFcnAfter the input data is executed in cgv.CGV