what's the meaning of stage version

Simbody is useful for internal coordinate and coarse grained molecule modeling, large scale mechanical models like skeletons, and anything else that can be modeled as bodies interconnected by joints, acted upon by forces, and restricted by constraints.
POST REPLY
User avatar
Jiang Ping
Posts: 132
Joined: Sun Aug 26, 2012 4:09 am

what's the meaning of stage version

Post by Jiang Ping » Wed Apr 20, 2016 11:49 am

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

User avatar
Michael Sherman
Posts: 800
Joined: Fri Apr 01, 2005 6:05 pm

Re: what's the meaning of stage version

Post by Michael Sherman » Wed Apr 20, 2016 5:17 pm

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

User avatar
Jiang Ping
Posts: 132
Joined: Sun Aug 26, 2012 4:09 am

Re: what's the meaning of stage version

Post by Jiang Ping » Wed Apr 20, 2016 8:07 pm

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

User avatar
Michael Sherman
Posts: 800
Joined: Fri Apr 01, 2005 6:05 pm

Re: what's the meaning of stage version

Post by Michael Sherman » Wed Apr 20, 2016 9:40 pm

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.

User avatar
Jiang Ping
Posts: 132
Joined: Sun Aug 26, 2012 4:09 am

Re: what's the meaning of stage version

Post by Jiang Ping » Sat Apr 23, 2016 12:06 pm

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

POST REPLY