Page 1 of 1

Static Optmization Constrain Violation = -1

Posted: Wed Sep 28, 2011 12:12 am
by gphilips3
Hi Ayman.

I am running the modified model that you had helped me create previously, in version 2.4. It works and generates an ID output. However when I run Static Optimization on it, at everystep I get the message constraint violation = -1 #ND

What does the error mean? I understand that large constraint violations means that very large moments are being created that exceed the contraints of the model. Is it something similar in my case?

Re: Static Optmization Constrain Violation = -1

Posted: Wed Sep 28, 2011 12:15 pm
by gphilips3
Also when I run it, the model does not follow the input motion and direction while the Inverse Dynamics followed it. The muscles also dont stay connected to the bones but seem to extend well beyond the body of the model.

Re: Static Optmization Constrain Violation = -1

Posted: Wed Sep 28, 2011 12:56 pm
by aymanh
Hi Gregory,

Please file a bug report and attach the model, setup files and data files so that we can troubleshoot (and ideally fix) in version 2.4 before we make it public very shortly.

Thanks much,
-Ayman

Re: Static Optmization Constrain Violation = -1

Posted: Wed Sep 28, 2011 2:43 pm
by gphilips3
I have done so.

Re: Static Optmization Constrain Violation = -1

Posted: Mon Oct 03, 2011 11:30 pm
by aymanh
Hi Gregory,

The model has no mass properties, accordingly the accelerations that the Static Optimization is trying to match are infinite. We should provide a better diagnostic error message but in the meantime you should use a model with specified mass properties.

Hope this explains,
-Ayman

Re: Static Optmization Constrain Violation = -1

Posted: Tue Oct 04, 2011 5:54 am
by gphilips3
In the model I included the mass for the Humerus, Shadow Arm and Shadow hand as I wanted to concentrate the mass on those bodies.

Do I need to have a mass value for every body that is part of the motion (at the elbow and shoulder)?

Re: Static Optmization Constrain Violation = -1

Posted: Tue Oct 04, 2011 6:03 am
by gphilips3
Alternatively since I have the velocity and acceleration at the joints recorded in my experimental data, would adding it to the .mot file solve the problem?

Re: Static Optmization Constrain Violation = -1

Posted: Wed Oct 05, 2011 12:15 pm
by aymanh
Hi,
gphilips3 wrote:Alternatively since I have the velocity and acceleration at the joints recorded in my experimental data, would adding it to the .mot file solve the problem?
Unfortunately the static optimization tool doesn't take accelerations as input. You also need to specify mass properties for any segment that can move otherwise any force will lead to infinite acceleration and fail downstream.

Hope this helps,
-Ayman

Re: Static Optmization Constrain Violation = -1

Posted: Fri Feb 20, 2015 8:02 am
by jewing111
I was wondering if there have been any changes to opensim that may now allow for inputting accelerations into static optimization, or if there is some other workaround for wanting to compute muscle excitations based on desired accelerations.

Joe