Change objective function

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Weronika R
Posts: 2
Joined: Tue Mar 12, 2019 12:12 pm

Change objective function

Post by Weronika R » Tue Apr 16, 2019 1:53 pm

Hi,

I'm scripting in C++. I want to change objective function in Static Optimization and Computed Muscle Control. Is it necessary to build OpenSim from source whether can I do this using the OpenSim API?
Is it possible to write the objective function as in the example:
https://simtk-confluence.stanford.edu:8 ... timization
and define it as a public member of the class?

Which solution will be the best and the simplest?

Thanks,
Weronika

Tags:

User avatar
Thomas Uchida
Posts: 1110
Joined: Wed May 16, 2012 11:40 am

Re: Change objective function

Post by Thomas Uchida » Tue Apr 16, 2019 6:36 pm

You could write a plugin. See, for example, these projects on simtk:
- "An OpenSim plugin to minimize joint reaction forces and muscle activations" (https://simtk.org/projects/jointloadopt)
- "Synergy Optimization: A plug-in to couple muscle activity in OpenSim" (https://simtk.org/projects/synergy)

User avatar
Weronika R
Posts: 2
Joined: Tue Mar 12, 2019 12:12 pm

Re: Change objective function

Post by Weronika R » Sat May 25, 2019 3:44 pm

I'd like to use plugin "An OpenSim plugin to minimize joint reaction forces and muscle activations". In the example plugins and tutorials which I tried to use there were the source files, but in this plugin there are only two 3D models in the "Download" section. I can't figure out how to use them to build a project with CMake and Visual Studio. Could you give me any help in this matter?

Thanking you in advance

User avatar
Thomas Uchida
Posts: 1110
Joined: Wed May 16, 2012 11:40 am

Re: Change objective function

Post by Thomas Uchida » Sun May 26, 2019 7:36 am

The code can be found here: https://simtk.org/svn/jointloadopt/Trunk/ (go to "Source Code" > "Browse source code"). Instructions for building a plugin are here: https://simtk-confluence.stanford.edu:8 ... ng+Plugins. Note that you may need to update the code if you are using a newer version of OpenSim than the author.

POST REPLY