Skip to content

Fix check for sign change, fix Heaviside update#2927

Merged
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:fix_2926
Jul 28, 2025
Merged

Fix check for sign change, fix Heaviside update#2927
dweindl merged 1 commit intoAMICI-dev:mainfrom
dweindl:fix_2926

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Jul 28, 2025

The old check for sign changes did not work if one values was zero.

Heaviside state has to be updated independent of whether the event occurs at the initial timepoint or not.

Fixes #2926.

@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.01%. Comparing base (9be5026) to head (e64ef5d).
⚠️ Report is 45 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2927      +/-   ##
==========================================
- Coverage   79.57%   79.01%   -0.57%     
==========================================
  Files         362      362              
  Lines       23156    23157       +1     
  Branches     1589     1588       -1     
==========================================
- Hits        18427    18297     -130     
- Misses       4717     4848     +131     
  Partials       12       12              
Flag Coverage Δ
cpp 74.94% <100.00%> (+<0.01%) ⬆️
cpp_python 33.12% <50.00%> (+<0.01%) ⬆️
petab 38.78% <0.00%> (-0.01%) ⬇️
python 73.80% <100.00%> (+<0.01%) ⬆️
sbmlsuite-jax ?

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

Files with missing lines Coverage Δ
include/amici/misc.h 91.30% <100.00%> (+0.39%) ⬆️
src/forwardproblem.cpp 90.60% <100.00%> (-0.02%) ⬇️

... and 6 files with indirect coverage changes

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

@dweindl dweindl marked this pull request as ready for review July 28, 2025 13:14
@dweindl dweindl requested a review from a team as a code owner July 28, 2025 13:14
The old check for sign changes did not work if one values was zero.

Heaviside state has to be updated independent of whether the event occurs at the initial timepoint or not.

Fixes AMICI-dev#2926.
@dweindl dweindl self-assigned this Jul 28, 2025
@dweindl dweindl merged commit 08d0c95 into AMICI-dev:main Jul 28, 2025
18 of 19 checks passed
@dweindl dweindl deleted the fix_2926 branch July 28, 2025 18:25
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.

Incorrect handling of Heavisides if simultaneous event changes trigger state

2 participants