Page 1 of 1

Fiber Length of 0 Errors in Jumping Simulations

Posted: Tue Sep 24, 2024 10:48 am
by bkperrin
Hello,

I am currently running maximal jump height simulations using JumpMeasure, a feedforward piecewise controller, and a fairly simple model I created. When running batches of simulations, I often find that many of the trials terminate due to one of the 2012MillardEquilibriumMuscles having a fiber length of 0. When plotting fiber length vs joint angle in OpenSim, I don't find any points where muscle fiber length is 0 so I am confused as to how it could be happening in these simulations. I was wondering if anyone has seen anything like this before, and if so, what could be done to remedy the situation. Is it possible to just skip and discard the generation without terminating the whole process if this happens? Thank you for the help!

Best,
Ben Perrin

Re: Fiber Length of 0 Errors in Jumping Simulations

Posted: Wed Sep 25, 2024 12:09 am
by tgeijten
If the error occurs only rarely, you can adjust the max_errors setting the CmaOptimizer:

https://scone.software/doku.php?id=ref:cma_optimizer

This will allow the optimization to continue in the case of errors. Use negative numbers if you want to specify the minimum number of successful evaluations (e.g. -4 equals at least 4 successful evaluations).

If you wish to find out where the error occurs, you can temporarily enable the "output .par files for all search points" setting (in Settings -> Advanced -> Optimizer). This will output all .par files before evaluation, allowing you
(after the optimization has terminated) to replicate the simulation that causes the issue.