Skip to content

Fix variable-rate jumps for DAE problems - #627

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-dae-variable-rate-jump
Draft

Fix variable-rate jumps for DAE problems#627
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-dae-variable-rate-jump

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Aug 11, 2026

Copy link
Copy Markdown
Member

Please ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed and why

VR_FRM extended a DAE's u0 with the integrated jump-intensity states but left du0 at its original size, so constructing the resulting DAEProblem threw a size mismatch. The DAE wrapper also still used DDE-style function signatures instead of the SciML DAE residual interface.

This extends du0 and differential_vars, evaluates the augmented equations as du_jump - rate(u, p, t) = 0, and preserves the input DAEFunction specialization policy. The regression test covers in-place and out-of-place residual evaluation under FullSpecialize; it also solves the in-place problem with DFBDF.

The OrdinaryDiffEqBDF addition is test-only. It is MIT-licensed and adds no runtime dependency.

Regression evidence

The same official test fails with src/variable_rate.jl restored to the unfixed version:

$ julia +release --startup-file=no --project=. test/extended_jump_array.jl
ERROR: LoadError: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
ArgumentError: Sizes of u0 and du0 must be the same.
Test Summary:             | Error  Total  Time
DAE with VariableRateJump |     1      1  2.1s

With this commit applied:

$ julia +release --startup-file=no --project=. test/extended_jump_array.jl
Test Summary:             | Pass  Total   Time
DAE with VariableRateJump |    9      9  17.3s

The historical boundary was bisected to a336dc6, which introduced the DAE remake with an extended u0 but not du0. The original hybrid-problem work at #72 requested DAE coverage but did not add it.

Verification

$ GROUP=InterfaceI JULIA_NUM_PRECOMPILE_TASKS=1 julia +release --startup-file=no --project=. -e 'using Pkg; Pkg.test(coverage=false)'
869 passed across 21 test blocks
Testing JumpProcesses tests passed

$ /home/crackauc/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/bin/julia --startup-file=no --project=/home/crackauc/.julia/environments/format-check -e 'using JuliaFormatter; format(".", SciMLStyle(), verbose=true)'
[JuliaFormatter 2.2.0; no tracked diff]

$ git diff --check
[exit 0]

$ git diff --unified=0 upstream/master...HEAD | typos -
[exit 0]

Local GROUP=QA currently reports 16 passed and 1 failed on both this branch and clean upstream/master: SciMLTesting 2.4 enabled the public-reexport check without a repository allowlist. The independent fix is #623; it passes 17/17 locally on SciMLTesting 2.4 and 2.7. That mechanical QA change is intentionally not bundled here, so this PR's CI QA job is expected to remain red until that prerequisite merges.

CI reproduced only that expected failure: 16/17, with No unapproved public reexports as the sole failure in https://github.com/SciML/JumpProcesses.jl/actions/runs/31543893598/job/93952232035.

Not verified

I did not run InterfaceII, GPU, Julia prerelease, or the full Everything matrix locally. The out-of-place DAE residual is evaluated directly by the regression test; an out-of-place DFBDF callback solve is not claimed because that solver configuration does not currently provide the callback's temporary-cache interface.

No documentation build was run because this changes no public API, docstring, or rendered documentation.

Links

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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