Twin Builder C-Model Target with Dynamic Memory Allocation
The solver must be set to a fixed type. If the stop (end) time is set to Inf, the model uses the Twin Builder end time. This option guarantees the most flexibility and should be used instead of a fixed end time. If you do set a fixed end time, the model output will be constant after that time is passed. The fixed step influences the maximum integration time in Twin Builder. Twin Builder synchronizes to these time points. A small sample time here could slow down the simulation dramatically. This time should not be too large because between two samples, the output of the Simulink model is constant. A value change on an input port is not recognized by the Simulink model between two samples. The step size should be a compromise between accuracy and speed.
It is possible to interpolate the outputs of the Simulink model. Instead of constant values between two samples, the model uses interpolated values.
For another output, this option could be used. In some cases, the interpolation increases the number of iterations and reduces the accuracy. This could be the case, for example, if the model switches the output value or if the output is discrete.