Error explanation
The error message means that a structural change was made to the model between when the Operating Point was captured and when it was applied. Structural changes can include:
- Adding or removing of blocks or signals
- Changes to signal datatype or dimension
Example
For example, consider the model below where "myVar" is "true", this makes the output signal type "boolean".
Now consider if we override that variable as shown below
sim_input = sim_input.setVariable('myVar', 1);
The '1' here is interpreted as double. Since this variable is used in other Constant blocks in the model, and each of these blocks is set to "Inherit: Inherit from 'Constant value'". This changes the datatype of some signals in the model, which then changes the model checksum from when the operating point was captured and thus throwing the error.
You may change the line below and the simulation should run without error:
sim_input = sim_input.setVariable('myVar', true);
R2025a and later
Starting in R2025a, Simulink provides more flexibility when a model has changed between saving and restoring an operating point.
The Operating point contents checksum mismatch model configuration parameter controls what happens when the model contents no longer match the contents of the saved operating point. By default, a mismatch produces an error, which preserves the behavior from earlier releases. However, you can set this diagnostic to warning or none to enable flexible operating point initialization. In this case, Simulink initializes the simulation using as much compatible information from the saved operating point as possible.
If you set the diagnostic to warning, Simulink also reports information about specific differences between the current model and the saved operating point. Additional details are available in the Simulink.SimulationMetadata returned with the simulation results. The ModelInfo.OperatingPointMismatches information can identify differences such as:
- Operating point data that was not used
- Blocks in the current model that could not be initialized from the operating point
R2024b and earlier
If you are struggling to find the exact change in your model that is causing the issue, you can use the checksum details (similar to the doc page below), to compare the checksum of the model from the Operating Point capture to operating point apply.
Attached is a simplified example that hopefully demonstrates the issue and also includes an example tool called getChecksumDiff(), which is an example of how you can compare the checksum of the two versions of the model to hopefully better diagnose these types of issues in the future.