Set output destination of a simulation

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
Kohei Kaminishi
Posts: 5
Joined: Wed Apr 06, 2016 8:11 am

Set output destination of a simulation

Post by Kohei Kaminishi » Mon Jun 08, 2020 10:18 pm

Hi,

I want to run simulations with different conditions (e.g. run gait simulations while increasing a delay parameter in a control model).
Taking a cue from a past forum post (viewtopic.php?f=1180&t=11680&sid=931f56 ... 9c153f95ee), I can change leg_load_sonsor_delay parameter of GH2020 gait control model and run a simulation by using the following command.

Code: Select all

sconecmd.exe -e "...\Tutorials\Tutorial 4a - Gait.scone" CmaOptimizer.SimulationObjective.GaitStateController.leg_load_sonsor_delay=0.1
However, the output of the result is always in the same file (e.g. Tutorial 4a - Gait.scone.sto). Is it possible to set this output destination with a command or scone file?

Also, is there a better way to run such simulations with different conditions?

Thanks,
Kohei

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

Re: Set output destination of a simulation

Post by Thomas Geijtenbeek » Tue Jun 09, 2020 12:07 am

If you change a scenario parameter, you need to run a new optimization using the -o switch for the changes to take effect:

Code: Select all

sconecmd.exe -o "...\Tutorials\Tutorial 4a - Gait.scone" CmaOptimizer.SimulationObjective.GaitStateController.leg_load_sonsor_delay=0.1
With a good initialization (using the init_file parameter), the optimization should not take too long to converge, depending on how large the change is.

Running an optimization is needed because a change in any of the parameters requires some adaptation before the gait becomes stable again.

By the way, there is also a parameter called sensor_delay_scaling_factor (see Model) that allows you to change the delays of all reflexes with a specific factor.

User avatar
Kohei Kaminishi
Posts: 5
Joined: Wed Apr 06, 2016 8:11 am

Re: Set output destination of a simulation

Post by Kohei Kaminishi » Thu Jun 11, 2020 1:23 am

As you say, when simulating a gait, we need to optimize parameters for each condition to make stable motions. The decrease in the time for optimizations with a good initialization seems important. I want to use it effectively.

(The filename of an output .sto file depends on the filename of a .scone file. It was a problem for my iterative process, but I solved it by renaming the .sto file each time.)

Thank you very much.

POST REPLY