-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix get_model_settings for initial states + sensitivities (#1751)
Fixes a couple of issues in `amici.{get,set}_model_settings` * Initial states and initial state sensitivities should only be included if custom values have been set. Otherwise, `set_model_settings(model, get_model_settings(model))` will permanently set the given values, preventing evaluation of `Model::fx0` / `Model::fsx0`. Fixes ICB-DCM/pyPESTO#837 * If a model had custom initial state sensitivities set, those would not have been set correctly by `set_model_settings(model, get_model_settings(model))`, because `setParameter{List,Scale}` was called after `setInitialStateSensitivities` and cleared initial state sensitivities. (Even if they would have been set, they would have been wrong in case of scaled parameters, due to using `setInitialStateSensitivities` instead of `setUnscaledInitialStateSensitivities`).
- Loading branch information
Showing
2 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters