This error message is displayed when the option "Simulation->Configuration Parameters->Diagnostics->Solver Data Inconsistency" is selected as "error". This diagnostic tool should be mainly used for debugging models as it affects the performance (upto 40%).
One of the main uses of consistency checking is to make sure that S-functions adhere to the same rules as Simulink built-in blocks. You can use this check to validate your S-functions and to help you determine the cause of unexpected simulation results.
Another purpose of consistency checking is to ensure that blocks produce constant output when called with a given value of t (time). This is important for the stiff solvers (ode23s and ode15s) because, while calculating the Jacobian matrix, the block's output functions can be called many times at the same value of t.
When consistency checking is enabled, Simulink recomputes the appropriate values and compares them to the cached values. If the values are not the same, a consistency error occurs.
See Attached example which illustrates this behavior.
Best Answer