Search found 99 matches

by Sina Porsa
Sun Feb 10, 2013 6:48 pm
Forum: OpenSim
Topic: Does OpenSim report state equations?
Replies: 33
Views: 8864

Re: Does OpenSim report state equations?

Hi again, It seems that I was not clear enough! I'll try to reword my question and I hope this time it will be crystal clear and let's hope someone knows the answer(fingers crossed!) let's assume I know the states and excitations at a specific time t=t0, in other words, X(t=t0) and U(t=t0) are known...
by Sina Porsa
Tue Feb 05, 2013 5:23 pm
Forum: OpenSim
Topic: Does OpenSim report state equations?
Replies: 33
Views: 8864

Does OpenSim report state equations?

Hi every one. I was wondering if I can have the state equations of a model? either explicit or implicit. It would be great if I could have the state equations in one of these forms: dx/dt = f(x,u) or f(x,u,dx/dt)=0 where u is the excitation matrix. to be more clear: these are the same equations that...
by Sina Porsa
Tue Dec 04, 2012 6:17 pm
Forum: OpenSim
Topic: how can I remove a prescribedForce from my model?
Replies: 7
Views: 961

Re: how can I remove a prescribedForce from my model?

just to finish this post, this is the final code which works. I had to replace testModel.getForceSet() with testModel.updForceSet() PiecewiseLinearFunction *armForceY = new PiecewiseLinearFunction(73, time, armForceVec); PrescribedForce& armForce = dynamic_cast<PrescribedForce&>(testModel.updForceSe...
by Sina Porsa
Tue Dec 04, 2012 5:18 pm
Forum: OpenSim
Topic: how can I remove a prescribedForce from my model?
Replies: 7
Views: 961

Re: how can I remove a prescribedForce from my model?

Hi Sherm and Ayman,
Thanks. It was a great help and I appreciate it.
Sina
by Sina Porsa
Mon Dec 03, 2012 6:50 pm
Forum: OpenSim
Topic: how can I remove a prescribedForce from my model?
Replies: 7
Views: 961

Re: how can I remove a prescribedForce from my model?

HI Ayman, Here is what I tried to do. I made an osim file(test.osim) which has a prescribedforce named armForce under the ForceSet tag: <ForceSet name=""> <objects> <PrescribedForce name="armForce"> <isDisabled> false </isDisabled> <body> torso </body> <pointIsGlobal> false </pointIsGlobal> <forceIs...
by Sina Porsa
Mon Dec 03, 2012 3:18 pm
Forum: OpenSim
Topic: how can I remove a prescribedForce from my model?
Replies: 7
Views: 961

Re: how can I remove a prescribedForce from my model?

Hi dear Ayman and thanks for your reply I want to edit the "ForceFunctions". here is my code: double time[73], armForceVec[73]; // @ each iteration I have to edit time[73] and armForceVec[73] const BodySet& theBodySet = OsimModel.getBodySet(); OpenSim::Body& torso = theBodySet.get(12); PiecewiseLine...
by Sina Porsa
Sun Dec 02, 2012 11:32 pm
Forum: OpenSim
Topic: how can I remove a prescribedForce from my model?
Replies: 7
Views: 961

how can I remove a prescribedForce from my model?

Hi everyone, I am trying to find an optimal force pattern which minimizes a cost function in my model. As all optimization routines, it is obvious that it is an iterative procedure. Here is a the algorithm that I am using: 1- create a prescribedForce object 2- while (not minimum) 2-1- add the prescr...
by Sina Porsa
Wed Nov 14, 2012 6:13 pm
Forum: OpenSim
Topic: Manager::integrate VS. Manager::doIntegration
Replies: 1
Views: 232

Manager::integrate VS. Manager::doIntegration

Hi everybody; I was wondering what is the difference between these two methods: bool integrate (SimTK::State &s, double dtFirst=1.0e-6) bool doIntegration (SimTK::State &s, int step , double dtFirst) it seems that they have the same output results. I was also wondering what is the second input in th...
by Sina Porsa
Tue Sep 25, 2012 11:02 pm
Forum: OpenSim
Topic: Prescribed kinematics in forward dynamics
Replies: 1
Views: 408

Prescribed kinematics in forward dynamics

Hi All,
I was wondering if I can apply a prescribed trajectory to a link during a forward dynamics simulation?
What I am trying to do, is to give muscle excitation patterns and pelvis trajectory as INPUTS to my forward dynamic simulation.
Thanks,
Sina
by Sina Porsa
Wed Sep 12, 2012 5:28 pm
Forum: OpenSim
Topic: Running Opensim parallel
Replies: 17
Views: 1583

Re: Running Opensim parallel

based on your previous post, I assume you want to create a NEW analysis at each iteration, which leads to memory leakage. What I can suggest is this: 1- create a base analysis 2- modify the base analysis 3- add the modified version to your model and perform the calculations 4- undo the modifications...