Skip to content

v1.2.0

Latest

Choose a tag to compare

@VDB-Bram VDB-Bram released this 07 Jul 16:33
· 24 commits to master since this release
a50fb31

What is new in PredSim v1.2.0?

  • Updates
    • Added Linux support
    • Reduced simulation time
    • Updated polynomial approximation of musculoskeletal geometry
    • New and updated settings
    • Quality of life
    • License
  • Documentation
  • Bugfixes

Updates

Added Linux support

PredSim now runs on Linux machines (#198). Simulations on Linux rely on a different version of OpenSimAD (i.e., opensimAD_linux instead of the opensimAD), enabling running PredSim on your own linux machine. This also enables running PredSim on the Vlaams Supercomputer Centrum (VSC) cluster part of KU Leuven's High Performance Computing service. We added documentation on how to run PredSim on the VSC and examples.

Reduced simulation time

Two relatively small changes to make simulations three times as fast.

1. Enable CasADi's built-in methods for faster function evaluation

Added the possibility for OpenSimAD to generate a serialised CasADi function (containing the expression graph) instead of a compiled library (containing functions to evaluate the inverse dynamics and their Jacobian)
S.OpenSimADOptions.useSerialisedFunction = true; (#220).

This change makes it possible to call CasADi's expand method on the NLP functions (objective, objective gradient, constraints, constraint Jacobian) to expand them into a single expression graph of elementary operations. These are much faster to evaluate, although the initialisation time and RAM usage increase.

To use the expanded NLP functions, add these settings:

S.OpenSimADOptions.useSerialisedFunction = true;
S.solver.nlpsol_options.expand = true;

2. Using faster linear solvers

While configuring ipopt to use a different linear solver was always supported, we now added information about how to request access to the HSL solver library.
These solvers have a more strict copyright license and are not distributed with CasADi. In general, solvers from this library perform better than the linear solvers distributed with CasADi (e.g. MUMPS).

To use the ma97 linear solver, add these settings:

S.solver.ipopt_options.hsllib = 'C:/path/to/folder/bin/libhsl.dll';
S.solver.linear_solver = 'ma97';

Example simulations for model Falisse_et_al_2022 with its default settings.
Wall time in minutes.

NLP functions linear solver Total simulation time [minutes] Evaluating constraint Jacobian [minutes] Number of iterations
default MUMPS 64 18 957
expand MUMPS 43 1.8 851
expand HSL ma97 19 1.6 748

Updated polynomial approximation of musculoskeletal geometry

The implementation behind fitting the polynomial approximation of the musculoskeletal geometry has been updated.
All changes are outlined in #231 and #233.
Some highlights:

  • The moment arm of the muscle-tendon unit is now correctly sampled in models with kinematic constraints (see figure in #231).
  • A muscle-tendon unit can now cross any number of coordinates. Previously, this was limited to six.
  • Added a setting to reduce the number of coefficients of the fitted polynomial, based on statistical significance. S.misc.reduce_coeff_fit = true; This method is based on work by Harba, Badia, and Serrancolí.

New and updated settings

  • New datetime_job savename option (#196)
  • Added 'all' keyword to apply values to every element (muscles, joints, etc.), e.g., S.subject.muscle_strength = {'all', 1.3}; (#207)
  • Added specific_tension settings. Specific tensions can now be changed for all muscles simultaneously, or for specific individual muscles. Values can be read from a csv file (#249)
  • Added the option to generate a new expression graph of the inverse dynamics, even if a suitable file already exists S.OpenSimADOptions.always_generate = true;.
  • Added the option to generate a new polynomial approximation of the musculoskeletal geometry, even if a suitable file already exists S.misc.msk_geom_always_new_fit = true;.

Quality of life

  • Display additional information when OpenSimAD encounters an error (#241)
  • Detect and use Visual Studio 2026 when it is installed (#251)
  • Disable OpenSim logfile (#254)

License

As part of our commitment to open science and open source software, PredSim is now distributed under the AGPLv3.0 license. In short: if you distribute software or provide an online service that includes code taken from PredSim 1.2.0 or later, you have to make the source code of your entire software available. For details, see the license text included with your copy of the PredSim code.

Documentation

  • Created a list of publications that use PredSim. Users are encouraged to add their works that used PredSim to the publication list (#201)
  • Added instructions on how to obtain linear solvers from HSL (#250)
  • Updated documentation about creating and updating a private fork (#203)
  • Added documentation on how to use the VSC cluster (#263)
  • Fixed several typos and small mistakes.

Bugfixes

  • Fixed bug where orthosis forces where not applied (#174)
  • Models with asymmetric muscles (number, name) no longer cause errors (#192)
  • Fixed bug where plotting functions would call settings that did not exist (#206)
  • Fixed bugs when PredSim could not find a git hash (#216, by @VDB-Bram and #244)
  • Corrected the figure plotted by ankleExoZhang2017.m (#222)
  • Fixed a bug where the example result files for Falisse 2022 were based on the wrong velocity (#225)
  • Fixed bug causing errors with recent CMake versions (#245)

Full Changelog: v1.1.0 → v1.2.0