# EffortMeasure

Measures the energy consumption of a model during simulation, according to various models.

Supported effort models:

`Constant`

: constant energy measure`TotalForce`

: total muscle force`Wang2012`

: metabolic energy measure as defined in [Wang et al. 2012]`Uchida2016`

: metabolic energy measure as defined in [Uchida et al. 2012]`SquaredMuscleStress`

: summed squared muscle stress: (force / PCSA)^2`CubedMuscleStress`

: summed squared muscle stress: (force / PCSA)^3`SquaredMuscleActivation`

: summed squared muscle activation: (activation)^2`CubedMuscleActivation`

: summed cubed muscle activation: (activation)^3`MechnicalWork`

: mechanical work of muscles = sum of muscle moment * dof velocity

All effort models can be used to compute cost-of-transport, by setting `use_cost_of_transport = 1`

.

**Inherits from** Measure.

### Public Attributes

Parameter | Type | Description |
---|---|---|

measure_type | EffortMeasureType | Energy model to be used, can be: `Constant` , `TotalForce` , `Wang2012` , `Uchida2016` , `SquaredMuscleStress` , `CubedMuscleStress` , `SquaredMuscleActivation` , `CubedMuscleActivation` , `MechanicalWork` . |

use_cost_of_transport | bool | Flag indicating to use (energy / distance) as a result; default = 0. |

specific_tension | Real | Value to use for specific tension; default = 0.25e6. |

muscle_density | Real | Value to use for muscle density; default = 1059.7. |

default_muscle_slow_twitch_ratio | Real | Default slow / twitch ratio if not defined per muscle (used by Uchida2016); default = 0.5. |

use_symmetric_fiber_ratios | bool | Indicate if fiber ratios are the same for left and right (used by Uchida2016); default = true. |

min_distance | Real | Minimum distance used for cost of transport computation; default = 1.0. |

use_average_per_muscle | bool | Divide result by number of muscles, useful for muscle activation measures; default = false. |

omnidirectional | bool | Use omnidirectional distance measure instead of distance along the x-axis; default = 0. |

order | Real | Value for mechanical work power. |

name | String | Name of the Measure, to be used in reporting; defaults to measure type. |

weight | Real | Weighting factor applied to the result of the measure; default = 1. |

threshold | Real | Threshold above / below which the measure becomes zero; default = 0. |

threshold_transition | Real | Transition range above `threshold` between which the measure linearly decreases to zero; default = 0. |

result_offset | Real | Offset added to measure result; default = 0. |

minimize | bool | Indicate whether this measure should be minimized; default value depends on the measure type (usually true). |

start_time | TimeInSeconds | Time [s] at which Controller becomes active; default = 0. |

stop_time | TimeInSeconds | Time [s] at which Controller becomes inactive; default = until simulation ends. |

signature_prefix | String | Prefix signature with custom string. Special tags: DATE_TIME, DATE_TIME_EXACT, SCONE_VERSION. |

signature_postfix | String | Append custom string to signature. Special tags: DATE_TIME, DATE_TIME_EXACT, SCONE_VERSION. |

signature | String | Set custom signature and omit the auto-generated signature. |

### Public Functions

Function | Description |
---|---|

double GetCurrentResult(const Model &model) override | Get last computed measure value, for use in rewards. |

double GetResult(const Model &model) | Get final result. |

_{Converted from doxygen using dokugen}