Set Up Muscle Analysis XML for Simulation
Source:R/setup_muscle_analysis_xml.R
setup_muscle_analysis_xml.Rd
This function modifies an XML configuration file for muscle analysis by updating various parameters related to the analysis setup. It updates the XML file with information such as the model file, force set files, results directory, analysis times, and other solver options. The modified XML file is saved to the specified setup filename.
Usage
setup_muscle_analysis_xml(
base_file = "setup_ma_base.xml",
model_file = "model_scaled.osim",
replace_force_set = "false",
force_set_files = "reserve_actuators.xml",
results_directory = ".",
output_precision = "12",
start_time,
end_time,
solve_for_equilibrium_for_auxiliary_states = "false",
maximum_number_of_integrator_steps = "20000",
maximum_integrator_step_size = "1",
minimum_integrator_step_size = "1e-05",
integrator_error_tolerance = "1e-05",
step_interval = "1",
in_degrees = "true",
muscle_list = "all",
moment_arm_coordinate_list = "all",
compute_moments = "true",
external_loads_file = "external_loads.xml",
coordinates_file = "ik.mot",
lowpass_cutoff_frequency_for_coordinates = "12",
setup_filename = "setup_ma.xml"
)
Arguments
- base_file
Character string. The path to the base XML file to be modified (default is "setup_ma_base.xml").
- model_file
Character string. The path to the model file to be used (default is "model_scaled.osim").
- replace_force_set
Character string. Whether to replace the force set ("true" or "false", default is "false").
- force_set_files
Character string. The path to the force set files to be used (default is "reserve_actuators.xml").
- results_directory
Character string. The directory where results should be saved (default is current directory, ".").
- output_precision
Character string. The desired precision for output (default is "12").
- start_time
Numeric. The start time of the analysis (in seconds).
- end_time
Numeric. The end time of the analysis (in seconds).
- solve_for_equilibrium_for_auxiliary_states
Character string. Whether to solve for equilibrium for auxiliary states ("true" or "false", default is "false").
- maximum_number_of_integrator_steps
Numeric. The maximum number of integrator steps (default is 20000).
- maximum_integrator_step_size
Numeric. The maximum size of each integrator step (default is 1).
- minimum_integrator_step_size
Numeric. The minimum size of each integrator step (default is 1e-05).
- integrator_error_tolerance
Numeric. The error tolerance for the integrator (default is 1e-05).
- step_interval
Numeric. The step interval for the muscle analysis (default is "1").
- in_degrees
Character string. Whether the results should be expressed in degrees ("true" or "false", default is "true").
- muscle_list
Character string. The list of muscles to include in the analysis (default is "all").
- moment_arm_coordinate_list
Character string. The list of coordinates for moment arm calculations (default is "all").
- compute_moments
Character string. Whether to compute muscle moments ("true" or "false", default is "true").
- external_loads_file
Character string. The path to the external loads file (default is "external_loads.xml").
- coordinates_file
Character string. The path to the coordinates file (default is "ik.mot").
- lowpass_cutoff_frequency_for_coordinates
Numeric. The cutoff frequency for lowpass filtering of coordinates (default is "12").
- setup_filename
Character string. The name of the XML file to save the modified configuration (default is "setup_ma.xml").