Reactive Systems logo
Reactis API V2022.2

API - Reactis (MATLAB Bindings):
Running Reactis Tests in Simulink

rsRunTestsRun a Reactis test suite in Simulink.
rsSignalBuilderImportImport a Reactis test suite into a Signal Builder block.
rsInterpolateOffTurn interpolation off for all top-level inputs of a model.


Run a Reactis test suite in Simulink.


rsRunTests(mdlFile, mFile)
rsRunTests(mdlFile, mFile, eps)
rsRunTests(mdlFile, mFile, eps, logFile)
rsRunTests(mdlFile, mFile, eps, logFile, wrapPortsFlag)


The rsRunTests function can be used to execute Reactis-generated tests in Simulink. Prior to using tests in rsRunTests, the suite must be exported from Reactis into .m or .mat format.

rsRunTests starts a GUI from which tests can be run.

rsRunTests(mdlFile, mFile) executes the test suite mFile (an .m or .mat file exported from Reactis) on model mdlFile. mdlFile and mFile may include path specifiers. The error tolerance will be taken from mFile (see below).

rsRunTests(mdlFile, mFile, eps) works the same as above, except uses an error tolerance value of eps.

rsRunTests(mdlFile, mFile, eps, logFile) works the same as above and outputs details of the run in a log file named logFile. If the file extension of logFile is .csv, then the output will be written in machine-parsable CSV format. If extension is not .csv, then the output will be human-readable.

rsRunTests(mdlFile, mFile, eps, logFile, '-WRAPPORTS') will modify fixpoint inports and outports to allow feeding in and logging 'double' values.

If no eps argument is given, or if eps is negative, then the tolerance stored in mFile is used. If mFile does not contain an eps value, or the eps value stored in mFile is negative, then a default value of 1e-10 is used. A difference between and output value stored in a test suite and the corresponding output value computed by the model is flagged if it exceeds the the error tolerance specified by eps. More precisely, for an outport p, let

v1be the value computed by Reactis for outport p
v2be the value computed by Simulink for outport p
then an error is reported for outport p if
| v1 - v2 | > | eps * v1 |
or| v1 - v2 | > | eps * v2 |


Import a Reactis test suite into a Signal Builder block.


rsSignalBuilderImport(blockPath, exportedTestSuite)
rsSignalBuilderImport(blockPath, testSuite, testModel)
rsSignalBuilderImport(blockPath, testSuite, testModel, rsiFile)


rsSignalBuilderImport(blockPath, exportedTestSuite)

Is the path to the Signal Builder block in the model. If a Signal Builder block SB1 resides at the top level of a model foo then the path would simply be foo/SB1. If the specified block does not exist, a new block will be added to the model.
Is the name of the .m or .mat file containing the test suite to be imported. This file must have been generated by exporting a test suite from Reactis.

rsSignalBuilderImport(blockPath, testSuite, testModel)

Is the path to the Signal Builder block as described above.
Is the name of the .rst file containing a Reactis test suite.
Is the name of the model from which testSuite was generated. The inputs, outputs, and configuration variables of this model must match testSuite. If testModel is foo.slx, then foo.rsi will be used to export the .rst to .mat and then import the .mat into the Signal Builder block.

rsSignalBuilderImport(blockPath, testSuite, testModel, rsiFile) Same as above except you may specify an alternative .rsi file.


Turn interpolation off for all top-level inputs of a model.




rsInterpolateOff turns of interpolation for all top-level input ports of the model currently open in Simulink. This is necessary to run Reactis-exported test suites in Simulink.

rsInterpolateOff(modelName) turns of interpolation for all top-level input ports of modelName.