Skip to content

Commit

Permalink
(test) add test for OS4.x. NOTE that loss function is ~0.01 - require…
Browse files Browse the repository at this point in the history
…s new expected model
  • Loading branch information
modenaxe committed May 6, 2021
1 parent a5be866 commit 9931ed4
Show file tree
Hide file tree
Showing 2 changed files with 2,110 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/TESTS_MusOptTool.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@
% optimize
[osimModel_opt, SimsInfo] = optimMuscleParams(reference_model, target_model, N_eval, log_folder);

% test
expected_model = './models/test2_expected.osim';
% test: note that from OpenSim 3.3 to 4.x results are slightly different
% if compared to 'test2_expected.osim', a model optimized with OpenSim 4
% would have a loss function ~ 0.001.
if getOpenSimVersion()<4
expected_model = './models/test2_expected.osim';
else
expected_model = './models/test2_expected_v4.osim';
end

osimExp = Model(expected_model);
% load muscles
exp_mus = osimExp.getMuscles();
Expand Down
Loading

0 comments on commit 9931ed4

Please sign in to comment.