Skip to content

Fix Heaviside functions for <, >, >= and <=#2701

Merged
dweindl merged 4 commits intoAMICI-dev:developfrom
dweindl:fix_gt_lt
Apr 30, 2025
Merged

Fix Heaviside functions for <, >, >= and <=#2701
dweindl merged 4 commits intoAMICI-dev:developfrom
dweindl:fix_gt_lt

Conversation

@dweindl
Copy link
Copy Markdown
Member

@dweindl dweindl commented Apr 24, 2025

The value at 0 of the Heaviside functions for <, > <=, >= was incorrectly set to 1/2, leading to incorrect simulation results. Fixes #2700.

Requires/includes #2703 for the test.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.93%. Comparing base (9ea6aef) to head (a5a20db).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2701      +/-   ##
===========================================
+ Coverage    77.91%   77.93%   +0.01%     
===========================================
  Files          326      326              
  Lines        23004    23004              
  Branches      1479     1479              
===========================================
+ Hits         17924    17928       +4     
+ Misses        5069     5065       -4     
  Partials        11       11              
Flag Coverage Δ
cpp 74.79% <100.00%> (+0.02%) ⬆️
cpp_python 33.57% <82.35%> (ø)
petab 39.41% <35.29%> (-0.01%) ⬇️
python 72.98% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
python/sdist/amici/de_model.py 90.62% <100.00%> (+0.28%) ⬆️
python/sdist/amici/import_utils.py 81.44% <100.00%> (ø)
src/model.cpp 85.45% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

dweindl added 2 commits April 29, 2025 07:31
The value at 0 for the Heaviside function was incorrectly set to 1/2, leading to incorrect simulation results. Fixes AMICI-dev#2700.
dweindl added 2 commits April 29, 2025 09:39
Previously, `nx_solver=0` would have in a crash when calling `amici::SUNMatrixWrapper::capacity` on `SUNMatrixWrapper` of  0-sized sparse matrix.

Unrelated: Replace some unnecessary `std::vector::at` calls.
@dweindl dweindl marked this pull request as ready for review April 29, 2025 07:47
@dweindl dweindl requested a review from a team as a code owner April 29, 2025 07:47
@dweindl dweindl self-assigned this Apr 29, 2025
@dweindl dweindl marked this pull request as draft April 29, 2025 11:55
@dweindl dweindl marked this pull request as ready for review April 29, 2025 14:56
@dweindl dweindl added this pull request to the merge queue Apr 30, 2025
Merged via the queue into AMICI-dev:develop with commit d0a1f20 Apr 30, 2025
26 checks passed
@dweindl dweindl deleted the fix_gt_lt branch April 30, 2025 07:06
dweindl added a commit that referenced this pull request Apr 30, 2025
The value at 0 of the Heaviside functions for `<`, `>` `<=`, `>=` was incorrectly set to 1/2, leading to incorrect simulation results. Fixes #2700.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants