Script Measure

SCONE is a software tool for predictive simulations of biomechanical movement. It uses OpenSim for modeling and simulation, and performs optimization using various control strategies, including feed-forward control, proprioceptic feedback control, and bal
POST REPLY
User avatar
Samane Amini
Posts: 97
Joined: Sun Jan 12, 2020 3:48 am

Script Measure

Post by Samane Amini » Tue Feb 06, 2024 4:02 am

Hello

I want to know when we use script measure to minimize a cos function, how we can determine what variable should be minimized in composite measure?

I have created a variable that I am going to minimize it by name MetabolicCost. But I doubt where I should write the MetabolicCost in composite measure. For example, the following code determines that MetabolicCost should be minimized?

CompositeMeasure {

<< import/measures/SelfSelectedSpeed.scone >>

ScriptMeasure {
name = MetabolicCost
weight = 1
minimize = 1
script_file = "import/measures/measureFUN.lua"
}


best

User avatar
Thomas Geijtenbeek
Posts: 425
Joined: Wed Mar 12, 2014 8:08 am

Re: Script Measure

Post by Thomas Geijtenbeek » Tue Feb 06, 2024 7:53 am

You can always add "minimize = 1" in the top-level CompositeMeasure, just to be sure. Otherwise, the CompositeMeasure will try to determine this from the minimize setting of the child measures.

POST REPLY