Studies with multiple steps

Hello everyone
I’m using the AnyBody modeling system (version 7.2.3) to create a Knee Simulator-like system.

In order to measure the Antero-Posterior Laxity of the knee, I want to make a 4-step analysis.
I have written the codes for each test, and I can select each test manually and run the InverseDynamics tests.
The problem I have now is that I want each study to run sequentially, but when I select each test, the joint position will always start from the initial position.
(For example, I want to pull-out the tibia, then push the tibia from the drawn-out position, but the analysis will start from the original position)

Is there a way to run multi-step studies without manually toggling the start positions?

I have read the GitHub page on "Running several files as batch", but couldn't understand how to make it work from my unfamiliarity in code.
URL = https://github.com/AnyBody/support/wiki/Running-several-files-as-batch
If somebody could lead me to a page where I can find out how to make this work, it would be great.

Thank You in advance.

Kazuki

Hi Kazuki,

As i understand you would like start the analysis where the previous analysis stopped right?

To do that you can use this property which can be set in the study, the default value is On.

InitialConditions.UseStartGuessOnOff = Off
Kinematics.UseStartGuessOnOff = Off

So i guess in your case the first of the studies will have default settings and the subsequent studies will use settings as above.

There are also ways to transfer values between studies, which might be useful

I hope this is what you need

Best regards
Søren

Hello Søren
Thank you for your swift reply.

Yes, that is what I intend, and thank you for providing me with help.
So, if I have multiple studies as shown below, would my understanding be correct?

AnyBodyStudy FirstStudy = { [The Original Test Conditions] };
AnyBodyStudy SecondStudy = {
[The Original Test Conditions]
InitialConditions.UseStartGuessOnOff = Off;
Kinematics.UseStartGuessOnOff = Off;
}; (the same goes for my ThirdStudy, and FourthStudy)

In this case, would I still have to run each "InverseDynamics" study manually, or would I just have to run the last (or first) "InverseDynamics" study?

I have tried running the FirstStudy.InverseDynamics, then SecondStudy.InverseDynamics, manually in this order, but the starting position seems to be unchanged.

I'm sorry if I misunderstood.

Best Regards
Kazuki

Hi Kwazuki,

Your code is correct.

Please note that in the first study the model will load into the loading position like normal and you will not see any change.

Then when running the second study it will use the position from the first study as the starting guess instead of the load position. So you will see a difference if the end position of the first study is different from load position.

Please note that analysis results will be the same this is only a way to get a different initial position that is taken from previous study.

If you want analysis results to depend on results from previous study, you need to transfer values between studies using AnyOperationSetValue

Best regards
Søren

Hello Søren

Thank you for your help.
I have tried running my "FirstStudy", then "SecondStudy" back to back, but upon starting the Second Study, the position keeps reverting to the starting position of the First Study.

Could there be something else that I need to change within the study, like the DriverPos within AnyKinEqSimpleDriver for example?
Or is the fact that I am using FDK causing some other problem?

Best Regards
Kazuki

Hi Kwazuki,

I understand, please note that this is only initial positioning, so solving the first frame will give same results with this setting, it is only the starting guess which is different. So if you just run kin of first frame it will be the same.

Best regards

Søren

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.