Hi,
I have solved some optimizations, and afterwards want to calculate the fitness of the optimal solution again in MATLAB, based on the activation and excitation in the .sto file. However, I get a slightly different result compared to the objective in the history.txt file.
- Is the muscle activation or excitation the same as the input (muscle1:input())? The activation is most similar.
- What other reasons could there be for the result to be slightly different?
Thanks!
Anne
Fitness calculation
- Thomas Geijtenbeek
- Posts: 461
- Joined: Wed Mar 12, 2014 8:08 am
Re: Fitness calculation
Hi Anne,
An important difference between muscle excitation and muscle input is that excitation is always clamped between a minimum value (0.01 by default) and 1, while the muscle input can be any value (also negative).
Another factor could be that the recording frequency of the .sto is different from the frequency at which the measure is called. The sto frequency is set via Preferences -> Advanced -> Data output frequency, while the measure frequency is set through fixed_measure_step_size. The recording frequency is typically lower (to save disk space), which means it doesn't contain all the samples used to calculate the fitness measure.
Let me know if this helps!
An important difference between muscle excitation and muscle input is that excitation is always clamped between a minimum value (0.01 by default) and 1, while the muscle input can be any value (also negative).
Another factor could be that the recording frequency of the .sto is different from the frequency at which the measure is called. The sto frequency is set via Preferences -> Advanced -> Data output frequency, while the measure frequency is set through fixed_measure_step_size. The recording frequency is typically lower (to save disk space), which means it doesn't contain all the samples used to calculate the fitness measure.
Let me know if this helps!
- Anne Koelewijn
- Posts: 14
- Joined: Tue Aug 26, 2014 6:42 am
Re: Fitness calculation
Thanks! It did. I also figured out now that one of the columns in the .sto file is input, and by using the input and the same frequency, I get the exact same result.