Dynamic libraries – changes in the model file are not applied

Summary

When adjusting a model file locally (e.g., adding the parameter 'Ko' to the Severi model), creating a dynamic library and trying to load and execute a simulation, the changes are not applied as long as the model has the same name as an already existing model.

What version of carputils and/or openCARP are you using?

carputils: commit fe7ca803 openCARP: commit a21176ce8349e5a84d50d476493a66bde492b23e

What operating system and processor architecture are you using?

MacOS (ARM64)

Steps to reproduce

  1. move or download a model e.g., Severi.model and add a parameter 'Ko'.
  2. create dynamic library: /openCARP/physics/limpet/src/make_dynamic_model.sh Severi.model
  3. load the model and try to change the parameter: bench --load-module /Downloads/Severi.so --duration 5000 --dt 0.01 --imp-par Ko=4.4

What is the current bug behavior?

The changes are not applied. When debugging bench.cc I could see that at some point my locally generated_functions.cc was used and there the parameter was not added, which means that I get the warning:

Ionic model: Severi L5 : Unrecognized parameter: Ko.

L5 : Run bench --imp=YourModel --imp-info to get a list of all parameters.

The complete workflow works correctly in case I chose another name for the model, e.g., Severi2.model.

What is the expected correct behavior?

Changes are applied. Like it is correctly done when using a differnt name for the model.

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)

Possible fixes

  1. correct model should be loaded
  2. at least there should be a warning and hint to rename the model.
Assignee Loading
Time tracking Loading