Set Up Static Optimization XML for Simulation
Source:R/setup_static_optimisation_xml.R
setup_static_optimisation_xml.Rd
This function modifies an XML configuration file for static optimization analysis. It updates the XML file with various parameters such as model file, force set files, analysis times, integrator settings, muscle physiology, and other configuration parameters specific to static optimization. The modified XML file is then saved to the specified setup filename.
Usage
setup_static_optimisation_xml(
base_file = "setup_so_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",
use_model_force_set = "true",
activation_exponent = "2",
use_muscle_physiology = "true",
external_loads_file = "external_loads.xml",
coordinates_file = "ik.mot",
lowpass_cutoff_frequency_for_coordinates = "12",
setup_filename = "setup_so.xml"
)
Arguments
- base_file
Character string. The path to the base XML file to be modified (default is "setup_so_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 static optimization analysis (default is "1").
- use_model_force_set
Character string. Whether to use the model's force set for optimization ("true" or "false", default is "true").
- activation_exponent
Numeric. The activation exponent to be used in the optimization (default is "2").
- use_muscle_physiology
Character string. Whether to use muscle physiology for optimization ("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_so.xml").