hi all,
I got the error " State Cache entry was out of date at Stage Dynamics. This entry depends on ver
ion 1 of Stage Dynamics but was last updated at version 0."
Does anyone know what "version 1 and 0" means?
Thanks in advance
Jiang
what's the meaning of stage version
- Michael Sherman
- Posts: 800
- Joined: Fri Apr 01, 2005 6:05 pm
Re: what's the meaning of stage version
Hi, Jiang. That means that a value is being referenced in a State that has not been realized to the stage that would have computed that value. The "version" numbers are not significant except that they don't match, which means the value is invalid. Basically whenever a state variable is changed the version number is incremented so that you won't accidentally reference an out-of-date value.
If you don't know what I mean by "realized" in the above context, please read the Simbody User Guide (in the doc directory).
Regards,
Sherm
If you don't know what I mean by "realized" in the above context, please read the Simbody User Guide (in the doc directory).
Regards,
Sherm
- Jiang Ping
- Posts: 132
- Joined: Sun Aug 26, 2012 4:09 am
Re: what's the meaning of stage version
Hi sherm
actually, I already called getMultibodySystem().realize(state, SimTK::Stage::Dynamics);, but this error still happened.
Do you have any idea about the possible reasons?
thanks again,
jiang
actually, I already called getMultibodySystem().realize(state, SimTK::Stage::Dynamics);, but this error still happened.
Do you have any idea about the possible reasons?
thanks again,
jiang
- Michael Sherman
- Posts: 800
- Joined: Fri Apr 01, 2005 6:05 pm
Re: what's the meaning of stage version
I would have to see more of your code, but most commonly, this occurs because the state that is being realized is not the one you are referencing. One confusing thing is that the integrators and time stepper keep their own state internally -- the one you pass in for initialization is copied into the integrator; after that anything you do to the original state does not affect the one being integrated.
- Jiang Ping
- Posts: 132
- Joined: Sun Aug 26, 2012 4:09 am
Re: what's the meaning of stage version
hi sherm,
Thanks for your reply. Actually, I was creating two OpenSim analyzers, one of which measures the velocity and acceleration; and the other one measures contact force. The error disappeared if I combined them to one analyzer. I don't know the reason why this happens. Anyhow, I solved problem. If I have time, I will investigate the reason for this error.
Thank you very much for your help
Jiang
Thanks for your reply. Actually, I was creating two OpenSim analyzers, one of which measures the velocity and acceleration; and the other one measures contact force. The error disappeared if I combined them to one analyzer. I don't know the reason why this happens. Anyhow, I solved problem. If I have time, I will investigate the reason for this error.
Thank you very much for your help
Jiang