Skip to main content

How to Use VO

Check that you have all the necessary inputs

OpenSim Model
You will need to have a scaled, post-JMP OpenSim model.

NMSM Pipeline Model File (Optional)
If you included an .osimx file in your TO run, it should also be included in your VO run.

TO Results
Both your initial guess and tracked quantities directories should be your TO results directory. You do not need to change anything inside your TO results for VO to work.

Create your XML settings file and modify necessary parameters

You can create a VO settings file using the NMSM Pipeline GUI plugin in OpenSim. Alternatively, you may copy your TO settings file, change the outside xml headers to say VerificationOptimizationTool instead of TrackingOptimizationTool, and then change the relevant fields.

VO should typically have the same constraint terms as your TO run, but you can add more constraints if you forsee them being useful in DO. Importantly, the TO solution should already satisfy all of the constraints in your VO run.

Create your MATLAB file to run VO

You may now create a MATLAB script to run VO. This file should call the function VerificationOptimizationTool("settingsFileName.xml")

Make sure the nmsm-core project is running in MATLAB

If it is not already running, double click on ‘Project.prj’ in the root of the nmsm-core folder to open it up.

Press run in MATLAB

Analyze your results

Verification Optimization will output its results in a folder specified by the results_directory field in your settings file. To plot these results, run the code plotTreatmentOptimizationResultsFromSettingsFile("settingsFileName.xml"). This function will output plots depending on what elements your VO run included. For more details on the plots, go to the plotting results page.

VO should ideally converge in less than 50 iterations, and the results should very closely track the input TO results. If your VO run takes much longer than 50 iterations to converge and the results deviate from your TO results then you likely have a problem. Either the constraints that you added conflict with the original TO solution, or there was a problem with the TO solution itself. For example, too loose of a kinetic consistency constraint in TO has caused issues with VO in the past.

If your VO results converge quickly and closely match your TO results, you can safely move onto Design Optimization