From: Jeff on
I am trying to use the SimState object to break my simulations up into different pieces. I can save the complete SimState just fine and the variable is created in my workspace with all of the saved data. However, when I go to run the simulation again with the initial state data, I get the error - "??? Simulink cannot load the initial SimState because the model was changed after the SimState was saved. Run the simulation again and resave the SimState." Does anyone have any comments on what might be going wrong? I am making absolutely no changes to the model and as far as I can tell I don't break any of the rules in the "Limitations of the SimState" listed in the Simulink Users Guide.
From: Guy Rouleau on
"Jeff " <jeffrey.b.bench(a)l-3com.com> wrote in message <hrce65$1oe$1(a)fred.mathworks.com>...
> I am trying to use the SimState object to break my simulations up into different pieces. I can save the complete SimState just fine and the variable is created in my workspace with all of the saved data. However, when I go to run the simulation again with the initial state data, I get the error - "??? Simulink cannot load the initial SimState because the model was changed after the SimState was saved. Run the simulation again and resave the SimState." Does anyone have any comments on what might be going wrong? I am making absolutely no changes to the model and as far as I can tell I don't break any of the rules in the "Limitations of the SimState" listed in the Simulink Users Guide.

Hi Jeff,

Is it only for a specific model? Does that happens with a simple model like vdp.mdl or sf_car.mdl? If it is specific to a model, it looks like there is something that makes it modify itself.

I recommend looking at this doc page:

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/brc69t5-1.html

and the demo "slAccelDemoWhyRebuild". This will teach you how to explore the checksum and see which element of the model is modified.

If the model is all built of basic blocks, it should not happen. In that case I recommend contacting technical support. They will be able to explain why and see if it is legitimate or not.

HTH,
Guy
From: Jeff on
"Guy Rouleau" <guy.rouleau.nospam(a)mathworks.com> wrote in message <hrcudh$n4b$1(a)fred.mathworks.com>...
> "Jeff " <jeffrey.b.bench(a)l-3com.com> wrote in message <hrce65$1oe$1(a)fred.mathworks.com>...
> > I am trying to use the SimState object to break my simulations up into different pieces. I can save the complete SimState just fine and the variable is created in my workspace with all of the saved data. However, when I go to run the simulation again with the initial state data, I get the error - "??? Simulink cannot load the initial SimState because the model was changed after the SimState was saved. Run the simulation again and resave the SimState." Does anyone have any comments on what might be going wrong? I am making absolutely no changes to the model and as far as I can tell I don't break any of the rules in the "Limitations of the SimState" listed in the Simulink Users Guide.
>
> Hi Jeff,
>
> Is it only for a specific model? Does that happens with a simple model like vdp.mdl or sf_car.mdl? If it is specific to a model, it looks like there is something that makes it modify itself.
>
> I recommend looking at this doc page:
>
> http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/brc69t5-1.html
>
> and the demo "slAccelDemoWhyRebuild". This will teach you how to explore the checksum and see which element of the model is modified.
>
> If the model is all built of basic blocks, it should not happen. In that case I recommend contacting technical support. They will be able to explain why and see if it is legitimate or not.
>
> HTH,
> Guy

Guy,

The link you posted as well as the example on the checksum was exactly what I needed. It turns out that I had the randseed function creating a random noise seed in several places in my model. I did not know that would essentially cause a rebuild of the model every time.

I originally didn't think that this would cause any errors because I was running the model in the "normal" mode and not "accelerated", but the checksum functions from the example you pointed to verified that was my problem.

Thanks again,

Jeff