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
Fiber Length of 0 Errors in Jumping Simulations
- Ben Perrin
- Posts: 1
- Joined: Wed Oct 04, 2023 7:05 am
- Thomas Geijtenbeek
- Posts: 445
- Joined: Wed Mar 12, 2014 8:08 am
Re: Fiber Length of 0 Errors in Jumping Simulations
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.
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.