SQL Error in Simulink Test when executing a parameter sweep test case with too many iterations

I am trying to perform thousands of verification tests on my Simulink model, where each test has a different testing parameter. To achieve this, I have set up a Simulink Test project with one test case and 4000+ iterations. The test sweeps through the testing parameters by creating a parameter set for each iteration.
However, when the test is executed, it fails and I receive the following error message:
SQL error or missing database C:\Users\{PLACEHOLDER_USER}\AppData\Local\Temp\0a0c-dbd5-a17f-87e3.dmr. (too many SQL variables)
My testing indicates that Simulink Test only supports a maximum of 1000 iterations for each test case. Why do I receive an SQL error when I perform a parameter sweep with more than 1000 iterations?

 Accepted Answer

The parameter sweep workflow described here involves creating a parameter set for each iteration of the test case. This workflow is not recommended when sweeping through parameters in Simulink Test, as it causes an internal SQLite limit to be reached when there are too many parameters.
Instead, the "setVariable" function is recommended when performing parameter sweeps in Simulink Test. "setVariable" lets you configure a parameter in the workspace for each iteration and can avoid the SQL error while improving testing performance.
Further detail on the usage of "setVariable" with scripted test iterations can be found on the following documentation page:
https://www.mathworks.com/help/releases/R2020a/sltest/ug/run-multiple-combinations-of-tests-using-iterations.html#buy14j3

More Answers (0)

Products

Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!