Static Optmization Constrain Violation = -1

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Gregory Philips
Posts: 33
Joined: Thu Aug 07, 2008 12:49 am

Static Optmization Constrain Violation = -1

Post by Gregory Philips » Wed Sep 28, 2011 12:12 am

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?

User avatar
Gregory Philips
Posts: 33
Joined: Thu Aug 07, 2008 12:49 am

Re: Static Optmization Constrain Violation = -1

Post by Gregory Philips » Wed Sep 28, 2011 12:15 pm

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.

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Static Optmization Constrain Violation = -1

Post by Ayman Habib » Wed Sep 28, 2011 12:56 pm

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

User avatar
Gregory Philips
Posts: 33
Joined: Thu Aug 07, 2008 12:49 am

Re: Static Optmization Constrain Violation = -1

Post by Gregory Philips » Wed Sep 28, 2011 2:43 pm

I have done so.

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Static Optmization Constrain Violation = -1

Post by Ayman Habib » Mon Oct 03, 2011 11:30 pm

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

User avatar
Gregory Philips
Posts: 33
Joined: Thu Aug 07, 2008 12:49 am

Re: Static Optmization Constrain Violation = -1

Post by Gregory Philips » Tue Oct 04, 2011 5:54 am

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)?

User avatar
Gregory Philips
Posts: 33
Joined: Thu Aug 07, 2008 12:49 am

Re: Static Optmization Constrain Violation = -1

Post by Gregory Philips » Tue Oct 04, 2011 6:03 am

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?

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Static Optmization Constrain Violation = -1

Post by Ayman Habib » Wed Oct 05, 2011 12:15 pm

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

User avatar
Joseph Ewing
Posts: 7
Joined: Fri Feb 24, 2012 11:47 am

Re: Static Optmization Constrain Violation = -1

Post by Joseph Ewing » Fri Feb 20, 2015 8:02 am

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

POST REPLY